T09 · Insecure Skill Coding Practices
- Location
SKILL.md:16- Finding
GitHub personal access token exposed through persistent remote configuration and process arguments
- Content
View full analysis
@github.com/rez0/kiloclaw-workspace.git" curl -s -H "Authorization: token $TOKEN" https://api.github.com/user ``` ### Technical Analysis The instructions place a GitHub personal access token directly in the repository's remote URL. Git stores that URL in `.git/config`, causing the credential to remain in plaintext after the operation completes. It may subsequently appear in configuration output, diagnostic logs, workspace archives, backups, screenshots, or support records. The health-check command also expands the token into a command-line argument. On systems where process arguments are visible to other users or monitoring software, the expanded authorization header may be captured while `curl` is running. Although the request is sent to the legitimate GitHub API over HTTPS, passing the secret this way unnecessarily expands its local exposure. The workflow requires GitHub authentication, but persistent storage in the remote URL and exposure through command arguments exceed the minimum credential access necessary for authenticated Git operations. ### Attack Path 1. The operator retrieves a GitHub PAT from 1Password. 2. The operator embeds that PAT in the Git remote URL. 3. Git persists the complete credential-bearing URL in `.git/config`. 4. An attacker with access to the workspace, a backup, diagnostic output, or another local process reads the token from `.git/config` or captures it from process arguments. 5. The attacker authenticates to GitHub using the recovered PAT. 6. The attacker reads or modifies repositories and other resources permitted by the PAT's scopes. ### Impact ...[truncated 395 chars]- Remediation
View remediation
