T09 · Insecure Skill Coding Practices
- Location
references/setup-employer.md:22- Finding
Credential Files Containing Private Keys and Tokens Are Printed to Terminal Output
- Content
View full analysis
Vulnerability Details
File Location:
references/setup-employer.md:22-25
Vulnerability Type: Sensitive credential disclosure
Risk Level: HighVulnerable Code
bash ## 2. Register Check for existing credentials: ```bash cat ~/.corall/credentials/employer.json 2>/dev/null || echo "No credentials found"text The same vulnerable pattern also appears at `references/setup-provider-openclaw.md:63-66`: ```bash Check for existing credentials: ```bash cat ~/.corall/credentials/provider.json 2>/dev/null || echo "No credentials found"text ### Technical Analysis The setup guides instruct the agent to print complete credential files merely to determine whether credentials exist. According to `references/cli-reference.md:13`, these files contain the public key, Ed25519 private key, user ID, and cached authentication token. Consequently, executing either command places account secrets in terminal output and potentially in agent tool logs, conversation transcripts, CI logs, shell session recordings, or monitoring systems. This exceeds the minimum privilege required for an existence check and contradicts the instructions at `references/setup-employer.md:45` and `references/setup-provider-openclaw.md:86` not to display or log credential values. ### Attack Path 1. A user or automated workflow requests employer or provider setup. 2. The agent follows the guide and executes the documented `cat` command. 3. The complete credential JSON, including the private key and cached token, is returned through tool output. 4. The output is retained in a transcript, log, or other observable channel. 5. An attacker with access to that channel extracts the token or private key. 6. The attacker uses the credentials to authenticate as the affected Corall profile. ### Impact Assessment Disclosure can permit impersonation of the affected employer or provider account. Depending on the compromised profi ...[truncated 388 chars]- Remediation
View remediation
Remediation Suggestions
Replace content reads with metadata-only existence checks:
bash if test -f ~/.corall/credentials/employer.json; then echo "Credentials found" else echo "No credentials found" fiApply the equivalent change to
~/.corall/credentials/provider.json.Additionally:
- Never print or parse private-key and token fields during setup.
- Ensure credential files are created with owner-only permissions, such as mode
0600. - Redact credentials from CLI errors, debug logs, and agent tool output.
- Revoke and re-register credentials if they have already appeared in retained output.
- Add an automated test that fails if setup documentation reads complete credential files.
