You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security: GitHub token exposed in .git/config of cloned repositories #1026
Any process that runs inside the cloned repository with filesystem access can read .git/config and extract the token. This includes:
AI CLI tools (Claude, Gemini, Cursor) running with permissive flags
Custom check run commands
Tox/pre-commit executions
Any code in the repository itself during builds
With AI features that grant filesystem access (--dangerously-skip-permissions, --yolo, --force), a malicious PR author could craft content that tricks the AI into reading and exfiltrating the token via prompt injection.
Requirements
Remove GitHub token from .git/config after cloning
Use a secure credential delivery mechanism for subsequent git operations
Ensure all existing clone/fetch/push operations continue to work
Suggested Solutions
Git credential helper — Use git credential store or git credential cache instead of embedding tokens in URLs
Remove token from config after clone — Run git remote set-url origin <clean-url> after cloning, use token only for fetch/push via env vars
SSH URLs — Use SSH keys instead of HTTPS tokens
GIT_ASKPASS — Use a script that provides the token via GIT_ASKPASS environment variable
This is a pre-existing architectural issue affecting all operations that run in cloned repos, not specific to any single feature. The scope covers all clone operations in webhook_server/libs/github_api.py.
Activity