T09 · Insecure Skill Coding Practices
- Location
SKILL.md:78- Finding
Authentication Token Exposed Through Shell Output
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:78
Vulnerability Type: Secret exposure through terminal and agent execution output
Risk Level: HighVulnerable Code 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 reveals the complete SeaArt session token in plaintext rather than merely checking whether the variable is configured.Tool output may be retained in agent conversation records, execution transcripts, CI logs, terminal captures, monitoring systems, or debugging output. The instruction therefore contradicts the security guidance elsewhere in
SKILL.md, which states that the token should not appear in chat messages or logs.The Python implementation does not require the token to be printed. It retrieves the credential directly from the environment and uses it as the SeaArt
Tauthentication cookie.Attack Path
- A user configures a valid SeaArt session token in
SEAART_TOKEN. - The agent follows the instructions in
SKILL.md. - The agent executes
echo $SEAART_TOKEN. - The plaintext credential appears in terminal output or the agent's captured tool transcript.
- An attacker or unauthorized operator with access to those records obtains the token.
- The attacker supplies the stolen value as the SeaArt
Tcookie and makes authenticated requests as the victim until the token expires or is revoked.
Impact Assessment
Successful exploitation exposes the user's SeaArt session credential. An attacker may gain the privileges associated with that SeaArt session, including submitting authenticated generation tasks, consuming account credits or quotas, and accessing any account functionality authorized by the token.
The issue does not directly grant local oper ...[truncated 127 chars]
- A user configures a valid SeaArt session token in
- Remediation
View remediation
Remediation Suggestions
Replace the token-printing command with a non-disclosing presence check:
bash if test -n "${SEAART_TOKEN:-}"; then echo "SEAART_TOKEN is configured" else echo "SEAART_TOKEN is not configured" fiAdditional hardening measures:
- Explicitly prohibit printing, logging, or returning the token in agent output.
- Redact
SEAART_TOKENin tool execution logs and error-reporting systems. - Avoid commands such as
env,printenv, shell tracing, or debugging output that could reveal the credential. - Revoke and replace tokens that may already have appeared in retained logs.
- Prefer a dedicated, narrowly scoped API credential over a browser session cookie if SeaArt supports one.
