T09 · Insecure Skill Coding Practices
- Location
SKILL.md:27- Finding
API Token Exposure Through Configuration Inspection
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27-31; duplicated inreferences/cli-commands.md, lines 43-47
Vulnerability Type: Credential exposure through command output
Risk Level: MediumVulnerable Code
In
SKILL.md, lines 27-31:markdown **Step 0.1: Check Token Configuration Status** ```bash daxiapi config get tokentext The same behavior is documented in `references/cli-commands.md`, lines 43-47: ```markdown ### View Token Configuration ```bash daxiapi config get tokentext ### Technical Analysis The Skill directs the Agent to run a command that retrieves the configured API token when the workflow only needs to determine whether authentication is available. If the CLI prints the token value, the secret enters Agent-visible command output and may subsequently be retained in terminal logs, execution traces, model context, or conversation history. This violates least-exposure principles for credentials. Authentication status should be checked without reading or displaying the underlying secret. Although the reviewed files contain no evidence that the token is transmitted to an unauthorized party, exposing it through command output creates a reusable credential-disclosure path. ### Attack Path 1. A user invokes the sector heatmap analysis Skill. 2. The Agent follows Step 0.1 and executes `daxiapi config get token`. 3. If the CLI returns the configured token without redaction, its value appears in Agent-visible output. 4. The output may be retained in command logs, traces, conversation records, or model context. 5. An attacker or unauthorized operator with access to those records extracts the token. 6. The attacker reuses it against services available through the `daxiapi` credential. Exploitation therefore requires both an unredacted CLI response and access to the resulting output or retained records. ### Impact Assessment A successfully exposed ...[truncated 518 chars]- Remediation
View remediation
Remediation Suggestions
-
Replace token retrieval with a status-only command that never returns the secret, such as:
bash daxiapi config has token -
If no status-only command exists, verify authentication by running the required API operation directly:
bash daxiapi sector heatmapHandle authentication failures by status or error code without printing the stored token.
-
Modify the CLI so
config get tokenreturns only a presence indicator or a masked value, such as****abcd. -
Prevent secrets from being included in Agent prompts, command transcripts, telemetry, diagnostic output, and persistent conversation records.
-
Update both
SKILL.mdandreferences/cli-commands.mdso they do not instruct users or Agents to display credentials. -
Rotate any token that may previously have appeared in execution logs or conversation history, and restrict replacement tokens to the minimum required API permissions and usage limits.
-
