github-gist
Publish files or Obsidian notes as GitHub Gists. Use when user wants to share code/notes publicly, create quick shareable snippets, or publish markd…
它会碰到什么
逐条看命中(8 条严重或高危)
- 高
scripts/publish_gist.py:20exec-spawnresult = subprocess.run(
- 高
scripts/publish_gist.py:43exec-spawnresult = subprocess.run(cmd, capture_output=True, text=True)
- 高
scripts/publish_gist.py:94cred-envreadreturn os.environ.get("GITHUB_GIST_TOKEN") or os.environ.get("GITHUB_TOKEN") - 高
scripts/publish_gist.py:94cred-envreadreturn os.environ.get("GITHUB_GIST_TOKEN") or os.environ.get("GITHUB_TOKEN") - 高
scripts/publish_gist.py:170exec-spawnsubprocess.run(["open", result["url"]])
- 高
scripts/publish_gist.py:172exec-spawnsubprocess.run(["xdg-open", result["url"]])
- 高
scripts/publish_gist.py:174exec-spawnsubprocess.run(["start", result["url"]], shell=True)
- 高
scripts/publish_gist.py:174exec-shell-truesubprocess.run(["start", result["url"]], shell=True)
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
GitHub Gist Publisher
Publish any file as a GitHub Gist for easy sharing.
Prerequisites
Uses gh CLI by default. Ensure you're authenticated:
gh auth status
# If not authenticated: gh auth login
Fallback: Set GITHUB_GIST_TOKEN env var with gist scope.
Usage
# Publish file as secret (unlisted) gist - DEFAULT
python3 scripts/publish_gist.py /path/to/file.md
# Publish as public gist (visible in your profile)
python3 scripts/publish_gist.py /path/to/file.md --public
# Custom description
python3 scripts/publish_gist.py /path/to/file.md -d "My awesome note"
# Override filename in gist
python3 scripts/publish_gist.py /path/to/file.md -f "readme.md"
# From stdin
echo "Hello" | python3 scripts/publish_gist.py - -f "hello.txt"
# Just get URL
python3 scripts/publish_gist.py /path/to/file.md --url-only
# Create and open in browser
python3 scripts/publish_gist.py /path/to/file.md --open
Options
| Flag | Description |
|------|-------------|
| --public | Create public gist (default is secret/unlisted) |
| -d, --description | Gist description |
| -f, --filename | Override filename |
| --url-only | Output only URL |
| --open | Open in browser |
| --api | Force API instead of gh CLI |
Output
{
"url": "https://gist.github.com/user/abc123",
"id": "abc123",
"public": false,
"filename": "file.md"
}
Example
Session log published with this skill: https://gist.github.com/glebis/3faaae6b907123929220e81add51a567
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。