·
Last changedVersion:
No hardening report available.
gh attach uploads a file to GitHub's internal user-attachments endpoint (no public API exists) and prints the URL, which GitHub auto-renders (image/video/file) wherever it's pasted. The URL inherits the repo's visibility, so private-repo uploads stay private.
Authentication: This skill requires standard gh CLI authentication. Ensure you are logged in (gh auth login) before use. Only scoped OAuth tokens (GH_TOKEN) are acceptable credential mechanisms.
The gh-attach extension must be installed and audited by a human operator before this skill is used. The operator must:
gh extension install sudosubin/gh-attach --pin <reviewed-commit-sha>The agent will never auto-install this extension. If it is absent, the skill exits with an error. Never run gh extension install autonomously within an agent session.
Path policy: $FILE (upload source and download destination) must always resolve to a safe, expected location. The agent must never pass sensitive system paths (e.g. ~/.ssh/, ~/.config/gh/, /etc/) to any gh attach command. On download, $URL must match the github.com/user-attachments/ or GHES equivalent pattern.
1. Upload: Use an absolute quoted path. -R is optional inside a repository. For GHES, use -R host/owner/repo. The command prints the URL on one line. GitHub auto-renders it (image/video/file), so use it as-is:
2. Embed (always --body-file -, e.g. gh pr comment/edit, gh issue comment/edit):
3. Download: Specify the destination explicitly. Validate the URL before downloading. Private attachments use the active gh token:
<img width="800" src="$URL"> instead of the bare URL.Need this version hardened?
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
—
—
MIT
HARDENING.md
LICENSE
SKILL.md