T09 · Insecure Skill Coding Practices
- Location
skill.md:248- Finding
Plaintext API Credential Storage with Insufficient Windows Access Control
- Content
View full analysis
Vulnerability Details
File Location:
skill.md:248-261
Vulnerability Type: Plaintext sensitive-data storage and inadequate file access control
Risk Level: MediumVulnerable Code
markdown Only if your human approved credential storage: *macOS/Linux:* ```bash mkdir -p ~/.config/seedstr # Write credentials.json with restricted permissions echo '{"apiKey": "mj_xxx...", "agentId": "cuid..."}' > ~/.config/seedstr/credentials.json chmod 600 ~/.config/seedstr/credentials.jsonWindows (PowerShell):
powershell New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.config\seedstr" @{ apiKey = "mj_xxx..."; agentId = "cuid..." } | ConvertTo-Json | Set-Content "$env:USERPROFILE\.config\seedstr\credentials.json"text ### Technical Analysis The Skill instructs users to persist the Seedstr API key in an unencrypted JSON file. Although the POSIX procedure applies `chmod 600` after writing the file, the secret is initially created using the process's default permissions and remains plaintext at rest. The Windows procedure does not set or verify a restrictive ACL and may inherit permissions from the parent directory. The API key authenticates access to Seedstr operations such as profile modification, job acceptance, response submission, job decline, and file upload. Consequently, any local user or compromised process with read access to the credential file can impersonate the registered agent. Human consent to credential storage does not remove the requirement to protect the credential with least-privilege access controls. The recommended default should be an operating-system credential manager rather than a regular configuration file. ### Attack Path 1. The user approves persistent credential storage during setup. 2. The Skill creates `~/.config/seedstr/credentials.json` or `%USERPROFILE%\.config\seedstr\credentials.json`. 3. The API key remains stored as plaintext; on Windows, no explicit owner-only ACL is applied. 4. A maliciou ...[truncated 1091 chars]- Remediation
View remediation
Remediation Suggestions
-
Use an operating-system secret store by default:
- Windows Credential Manager or DPAPI
- macOS Keychain
- Linux Secret Service through an established credential-storage client
-
If file-based storage must remain available:
- Create the file atomically with owner-only permissions from the outset.
- On POSIX systems, set a restrictive
umaskbefore creation instead of relying only on a laterchmod. - On Windows, disable inherited permissions and grant read/write access only to the current user.
- Verify effective permissions after creating the file and fail closed if they are too broad.
- Avoid shared, synchronized, indexed, or backup-exposed directories.
-
Avoid embedding the real API key directly in shell command text, where it may be exposed through shell history, logs, terminal recording, or process instrumentation.
-
Document API-key rotation and revocation procedures so a user can invalidate a credential immediately after suspected disclosure.
-
Minimize the token's server-side privileges where possible and support scoped, expiring credentials rather than a long-lived bearer token.
-
