T09 · Insecure Skill Coding Practices
- Location
SKILL.md:68- Finding
Documented Plaintext Storage of an Apollo API Key in a Shell Startup File
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 68-70
Vulnerability Type: Plaintext credential storage in user configuration
Risk Level: MediumThe documentation states that the Apollo API key is configured as an environment variable in the user's
.zshrcshell startup file:text Apollo API key used for lead enrichment: - Environment variable: APOLLO_API_KEY - Location: ~/.zshrcTechnical Analysis
Shell startup files are not appropriate secret-storage mechanisms. A key stored directly in
~/.zshrcis available to any process or script with permission to read files under the affected user account. It may also be exposed through configuration backups, support bundles, dotfile repositories, terminal diagnostics, or accidental file disclosure.Loading the credential into a broadly scoped environment variable also increases its exposure to child processes that do not require Apollo access. The project does not contain the actual
.zshrcfile or credential value, so the credential's presence and permissions cannot be independently verified from the supplied artifact. The vulnerable storage practice is nevertheless explicitly documented.Attack Path
- An attacker gains the ability to execute a malicious process, Skill, script, or dependency under the affected local user account.
- The attacker reads
~/.zshrcor obtains the inheritedAPOLLO_API_KEYenvironment variable from an accessible process context. - The attacker extracts the Apollo credential.
- The attacker authenticates to Apollo using the stolen key.
- The attacker performs actions allowed by the key, potentially including consuming API quota or accessing lead-enrichment resources and associated account data.
This path requires local user-context access or another disclosure of the shell configuration or process environment; the reviewed files do not independently provide such access.
Impact Assessment
Expl ...[truncated 383 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the API key from
~/.zshrcand from any other shell startup files. - Store the credential in an operating-system keychain, dedicated secret manager, or another access-controlled credential store.
- Inject the secret only into the specific Apollo client process at execution time rather than exporting it globally to every interactive shell and child process.
- Apply least privilege to the Apollo key and restrict it to only the API operations required for lead enrichment.
- Rotate the currently configured key because its historical exposure through shell configuration cannot be ruled out.
- Review dotfile repositories, backups, logs, shell diagnostics, and support archives for previous copies of the credential. Remove exposed copies and purge repository history where necessary.
- Ensure any fallback secret file has restrictive permissions, such as owner-only read access, and is excluded from version control and backups that lack equivalent protection.
- Update
SKILL.mdto describe secure secret injection without identifying a plaintext shell-file location.
- Remove the API key from
