T09 · Insecure Skill Coding Practices
- Location
SKILL.md:430- Finding
Global Plaintext Storage of Git Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 430
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code:
bash # HTTPS git config --global credential.helper storeTechnical Analysis
The skill recommends globally enabling Git's
storecredential helper. This helper persists HTTPS credentials without encryption, typically in the user's~/.git-credentialsfile. Depending on the remote service and authentication flow, the stored value may contain a repository password or personal access token.Because the setting is global, it affects subsequent Git operations across all repositories for that operating-system account, not only the repository associated with the current skill invocation. Any local process or user capable of reading the account's credential file could recover and reuse the stored secret.
Attack Path
- A user follows the documented command and enables the global
storecredential helper. - The user authenticates to an HTTPS Git remote with a password or access token.
- Git writes the credential to the user's credential file without encryption.
- A malicious process, compromised development tool, or local principal with access to the user's files reads the credential.
- The attacker reuses the credential against the Git hosting service, subject to the token's validity and granted permissions.
Impact Assessment
Successful exploitation can disclose Git hosting credentials and permit unauthorized actions available to the compromised account or token. Depending on the credential's scope, this may include reading private repositories, cloning proprietary source code, pushing unauthorized changes, modifying repository content, or accessing other resources authorized by the same token.
The issue does not itself grant elevated operating-system privileges. Its scope is bounded by local access to the credential file and by ...[truncated 56 chars]
- A user follows the documented command and enables the global
- Remediation
View remediation
Remediation Suggestions
- Remove the recommendation to use
credential.helper store. - Prefer an operating-system-backed credential manager, such as Git Credential Manager, macOS Keychain, or an appropriate Linux secret service.
- Alternatively, recommend SSH authentication with a passphrase-protected key managed by an SSH agent.
- Use repository-specific configuration where practical rather than changing global authentication behavior.
- Apply least privilege and expiration to personal access tokens.
- Warn users that Git's
storehelper saves credentials unencrypted if it must be documented for compatibility reasons. - Advise affected users to disable the helper, remove exposed entries from
~/.git-credentials, and rotate any credentials that were stored there.
- Remove the recommendation to use
