T09 · Insecure Skill Coding Practices
- Location
SKILL.md:434- Finding
Global Plaintext Storage of Git Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:434
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: HighVulnerable Code
bash git config --global credential.helper storeTechnical Analysis
The Skill recommends configuring Git's
storecredential helper globally. This helper persistently writes HTTPS credentials, including passwords or personal access tokens, to a local credential file without encryption.Because the configuration uses
--global, it affects all repositories and subsequent Git operations under the user's account rather than only the repository involved in the current task. Any process or user capable of reading the affected user's files may recover the stored credentials.This contradicts the Skill's stated protection against sensitive-data exposure and expands the security consequences beyond a single Skill execution.
Attack Path
- A user or agent executes the documented global configuration command.
- The user authenticates to an HTTPS Git remote during a later pull, fetch, or push.
- Git stores the supplied username and token or password unencrypted in the user's credential file.
- Malware, a compromised development tool, an unauthorized local user, or an exposed backup reads the credential file.
- The attacker extracts the credentials and authenticates to the associated Git service.
- The attacker performs any repository or organization operation permitted by the credential's scopes.
Impact Assessment
Exploitation requires the ability to read files belonging to the affected local account or access an unprotected copy of those files. Successful exploitation exposes the full authority granted to the stored credential. Depending on token scopes, this may permit reading private source code, cloning repositories, modifying branches, pushing malicious commits, accessing package registries, or performing organization-level operations ...[truncated 200 chars]
- Remediation
View remediation
Remediation Suggestions
-
Remove the recommendation to use
credential.helper store. -
Recommend Git Credential Manager or an operating-system-backed credential helper, such as macOS Keychain, Windows Credential Manager, or an appropriate Linux secret service.
-
Alternatively, recommend SSH authentication with a passphrase-protected private key managed through
ssh-agent. -
Avoid making global Git configuration changes automatically. Explain their scope and require explicit user confirmation.
-
Use narrowly scoped, short-lived personal access tokens when HTTPS authentication is necessary.
-
Document how to remove the insecure configuration and stored credentials:
bash git config --global --unset credential.helper -
Instruct affected users to delete any plaintext credential file after migrating to a secure helper and revoke or rotate credentials that may have been exposed.
-
