T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/github-permissions.json:24- Finding
Overprivileged GitHub Token Guidance Violates the Read-Only Security Model
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:19-21,SKILL.md:55, andscripts/github-permissions.json:15-16,24-25
Vulnerability Type: Excessive GitHub token permissions
Risk Level: MediumVulnerable Code and Configuration
SKILL.md:19-21:markdown ## Prerequisites - GitHub personal access token with read-only permissions (or classic token with `repo`, `read:org`, `security_events`) - Set as `GITHUB_TOKEN` environment variableSKILL.md:55:markdown **Classic token alternative:** If fine-grained tokens unavailable, use scopes: `repo`, `read:org`, `security_events`scripts/github-permissions.json:15-16:json "code_scanning_alerts": {"access": "read", "reason": "Code scanning (CodeQL) results"}, "actions": {"access": "read", "reason": "GitHub Actions workflow permissions and security"},scripts/github-permissions.json:24-25:json "classic_token_scopes": ["repo", "read:org", "security_events"], "classic_token_note": "If fine-grained tokens are not available, use a classic token with these 3 scopes"Technical Analysis
The Skill declares a read-only security model, but its fallback setup instructions recommend a classic personal access token with the broad
reposcope. A classic token carrying this scope is not constrained to the read-only API operations used by the Skill and can provide extensive access to private repositories, including modification capabilities.The fine-grained permission manifest also requests Code Scanning Alerts and Actions permissions that are not exercised by the reviewed implementation. The CI/CD check reads workflow files through the repository Contents API, while no module retrieves CodeQL alerts or calls GitHub Actions APIs.
Recommending unused or write-capable permissions violates least privilege. Although the audited code only performs read operations, the credential itself remains usable outside the Skill ...[truncated 1161 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the classic
repoPAT recommendation or clearly state that it does not provide a read-only security boundary. - Require fine-grained PATs restricted to the specific organization and repositories being audited.
- Grant only the permissions required by the checks the user enables.
- Remove Code Scanning Alerts permission until the implementation actually performs a CodeQL or code-scanning check.
- Remove Actions permission unless an Actions-specific API is introduced; workflow-file inspection currently uses Contents access.
- Separate checks into permission profiles so high-sensitivity checks such as audit-log and 2FA inspection do not force every user to grant organization-administration access.
- Keep tokens short-lived, rotate them regularly, and document immediate revocation procedures.
- Prefer a GitHub App with explicitly selected read-only permissions where operationally feasible.
- Remove the classic
