T09 · Insecure Skill Coding Practices
- Location
SKILL.md:75- Finding
Authentication Token Disclosed Through Terminal Output
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:75
Vulnerability Type: Secret exposure through insecure environment-variable inspection
Risk Level: MediumVulnerable snippet:
markdown First, check if the `SEAART_TOKEN` environment variable is set. You can do this by running a simple bash command: `echo $SEAART_TOKEN`.Technical Analysis
The skill explicitly instructs the agent to execute
echo $SEAART_TOKEN. This command prints the complete SeaArt session token to standard output instead of merely testing whether the variable is defined.Agent tool output may be displayed in the conversation or retained in execution transcripts, CI logs, terminal recordings, debugging systems, or other monitoring infrastructure. Consequently, this instruction can disclose a credential that the same document identifies as password-equivalent. It also conflicts with the document's guidance not to expose the token in chat messages or logs.
Attack Path
- A user configures a valid SeaArt session token in
SEAART_TOKEN. - The agent follows the token-checking procedure in
SKILL.md. - The agent runs
echo $SEAART_TOKEN. - The complete token is written to visible or retained command output.
- An attacker with access to the conversation, terminal transcript, execution log, or monitoring platform obtains the token.
- The attacker supplies the stolen value as the SeaArt
Tauthentication cookie and performs actions under the victim's SeaArt session, subject to the permissions and lifetime of that session.
Impact Assessment
Successful exploitation discloses the user's SeaArt session credential. An attacker may impersonate the affected SeaArt session and invoke account-accessible API operations until the token expires or is revoked. The scope is limited to the privileges associated with the compromised SeaArt account; no evidence indicates local privilege escalation or access to unrelated services ...[truncated 1 chars]
- A user configures a valid SeaArt session token in
- Remediation
View remediation
Remediation Suggestions
Replace the disclosure-prone command with a check that never prints the token value:
bash if [ -n "${SEAART_TOKEN:-}" ]; then echo "SEAART_TOKEN is set" else echo "SEAART_TOKEN is not set" fiAdditionally:
- Explicitly prohibit printing, logging, or interpolating the token into diagnostic messages.
- Redact authentication cookies from HTTP debugging output and exception reports.
- Ensure agent and terminal logs do not retain secrets.
- Advise users to revoke and rotate the SeaArt token if it has previously been printed.
- Prefer a secret manager or protected credential facility over broadly inherited environment variables where supported.
