T09 · Insecure Skill Coding Practices
- Location
SKILL.md:226- Finding
DataForSEO Basic Credential Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 226–233
Vulnerability Type: Plaintext credential exposure in process arguments
Risk Level: MediumVulnerable Code
bash curl -s -X POST "https://api.dataforseo.com/v3/dataforseo_labs/google/keyword_overview/live" \ -H "Authorization: Basic $DATA_FOR_SEO_API_BASE64" -H "Content-Type: application/json" \ -d '[{"keywords":["<kw1>","<kw2>","..."],"location_code":2840,"language_code":"en"}]'The environment variable is explicitly defined as a reusable credential:
text The env value is `base64(login:password)` and is used verbatim as the HTTP Basic credential.Technical Analysis
The Skill instructs the agent to expand
DATA_FOR_SEO_API_BASE64directly inside acurlcommand-line argument. The expandedAuthorizationheader may consequently be visible to local process-inspection facilities, execution telemetry, shell tracing, command audit systems, or wrappers that log argument vectors.Base64 encoding provides no confidentiality: anyone who obtains the value can decode the underlying
login:passwordpair or replay the Basic credential directly. The outbound request itself is necessary for the optional DataForSEO enrichment feature and targets the declared official API; the issue is the insecure credential-passing mechanism rather than unexplained network exfiltration.Attack Path
- A user configures
DATA_FOR_SEO_API_BASE64with valid DataForSEO credentials. - The Skill performs keyword enrichment and invokes the documented
curlcommand. - The shell expands the variable into the
Authorizationargument before startingcurl. - A local user, monitoring agent, command wrapper, audit service, or other process with sufficient process-inspection access captures the expanded argument while the request is running or from retained telemetry.
- The observer extracts or replays the Basic credential.
- The observer authenticates to DataForSEO as the victim ...[truncated 654 chars]
- A user configures
- Remediation
View remediation
Remediation Suggestions
- Do not place the expanded
Authorizationheader directly in command-line arguments. - Prefer a maintained API client that reads the credential from a protected environment variable internally without exposing it through the process argument vector.
- If
curlmust be used, provide sensitive configuration through a permission-restricted temporary file or private standard-input mechanism, subject to platform support:- Create the file with owner-only permissions such as mode
0600. - Avoid predictable file names and symlink-following behavior.
- Delete the file immediately after use, including on errors or interruption.
- Create the file with owner-only permissions such as mode
- Disable shell tracing around credential-bearing operations and ensure command wrappers, CI systems, and audit tooling redact
Authorizationheaders andDATA_FOR_SEO_API_BASE64. - Prefer scoped, revocable API tokens over reusable username/password credentials if DataForSEO supports them.
- Run the Skill under a dedicated low-privilege account and restrict access to process metadata and execution logs.
- Rotate the DataForSEO credential if the current command has already been used in an environment where arguments or commands are retained.
- Do not place the expanded
