Gandalf the Greybeard (PE) 5f3f0ab94d fix(agent-setup, github-app-token): guard against inherited GH_CONFIG_DIR outside AGENT_HOME
Contamination class: a stale GH_CONFIG_DIR inherited from a prior
session or a different agent's workspace caused generate-token.sh to
write .gh-token into a foreign workspace, silently granting that
agent's gh config access to the wrong token.

Three hardening changes:

1. agent-setup/scripts/setup.sh — before deriving GH_CONFIG_DIR from
   AGENT_HOME, warn and unset any inherited value that points outside
   AGENT_HOME. This prevents the contaminated value from leaking into
   the derived path or the dotfile.

2. agent-setup/SKILL.md — correct the sourcing example from `source ~/.env`
   to `source "$AGENT_HOME/.env"` so the dotfile is sourced from the
   documented location (setup.sh writes to $AGENT_HOME/.env, not ~/
   which may differ).

3. github-app-token/scripts/generate-token.sh — (a) add a hard die()
   guard that refuses to write the token when GH_CONFIG_DIR is outside
   AGENT_HOME; (b) pin GH_CONFIG_DIR="$GH_TOKEN_DIR" on the gh auth
   login invocation so it cannot fall back to any inherited config dir.

Verified:
- bash -n passes on both modified scripts
- With GH_CONFIG_DIR=/tmp/someone-elses/.github AGENT_HOME=/tmp/me,
  setup.sh warns + overrides; generate-token.sh dies before writing.
- With GH_CONFIG_DIR unset and a valid AGENT_HOME, behaviour is
  unchanged (token lands in $AGENT_HOME/.github).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-16 21:10:26 +00:00
2026-05-27 09:59:50 -04:00
2026-05-27 09:59:50 -04:00
2026-05-27 09:59:50 -04:00
2026-05-27 13:20:46 +00:00
2026-05-27 09:59:50 -04:00

Skills

A collection of Claude Code skills — reusable tools that extend Claude Code's capabilities. Each skill lives in its own top-level directory and ships a SKILL.md (the entry point Claude Code reads when invoking the skill) plus any supporting scripts or references.

Available skills

Skill What it does
github-app-token Generate a short-lived GitHub App installation access token and authenticate the gh CLI with it.
trebuchet Start AI-powered penetration test scans, check scan status, and retrieve security findings reports via the Trebuchet API.
kubernetes-reflector Reference for Kubernetes Reflector annotations that mirror secrets and configmaps across namespaces.
minimax-image-generation Generate images from MiniMax's image-01 model via the /v1/image_generation endpoint.

Skill layout

<skill-name>/
├── SKILL.md              # Required. YAML frontmatter (name, description) + usage docs.
├── CLAUDE.md             # Optional. Maintainer / implementation notes.
└── scripts/              # Optional. Bash or other implementation scripts.

Scripts use set -euo pipefail and a shared die() pattern for error handling. Scripts are invoked via bash scripts/<name>.sh (not ./scripts/<name>.sh) so that they work even when the executable bit did not survive deployment.

No build / test / lint tooling

There is no centralized build, test, or lint system. Each skill is self-contained and pulls in only standard Unix tools as declared in its SKILL.md.

Contributing

  • New skills get a new top-level directory with at minimum a SKILL.md that starts with YAML frontmatter on line 1.
  • Keep SKILL.md focused on decision flow + user-facing usage. Move implementation details, API references, and rarely-needed tables into CLAUDE.md or a references/ subdirectory to keep per-invocation token cost low.
  • Add a row to the table above.
S
Description
No description provided
Readme AGPL-3.0 151 KiB
Languages
Shell 100%