T09 · Insecure Skill Coding Practices
- Location
SKILL.md:16- Finding
Insecure Collection and Handling of GitHub Personal Access Tokens
- Content
View full analysis
" ``` - Never save tokens to disk or log files. When finished, run `unset GITHUB_TOKEN`. ``` `SKILL.md:69-73`: ```markdown ## 8. Daily automation & cron jobs - Store long-lived secrets outside the skill (e.g., `.env.github-chat-ops` with `GITHUB_CHAT_OPS_TOKEN`, repo, timezone). - Build reusable scripts under `scripts/` (see `scripts/github_chat_ops_daily.py`) that load env vars, call the same APIs, and print a ready-to-send summary. - When scheduling via `cron`, run the script from the workspace root, capture stdout verbatim for the message, and surface errors if the script exits non-zero. - Let end users customize repo/timezone by editing the env file; document that in the skill release notes so downstream consumers know where to look. ``` `references/github-api-cheatsheet.md:3-8`: ```bash ## Shared curl flags ```bash BASE="https://api.github.com" OWNER="" REPO="" AUTH=(-H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github+json") ``` ``` `references/github-api-cheatsheet.md:97`: ```bash - Always `unset GITHUB_TOKEN` after finishing: `unset GITHUB_TOKEN && history ...[truncated 3076 chars]- Remediation
View remediation
