Back to skill

Security audit

dfseo-cli

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent SEO/DataForSEO helper, but it installs unpinned third-party code and under-explains credential and local storage risks.

Review before installing. Use an isolated environment such as pipx or a virtual environment, avoid running installation as root, and prefer a pinned or otherwise verified dfseo package. Do not paste real API passwords into command-line flags on shared or logged systems; use safer credential handling where available and inspect/remove ~/.config/dfseo/config.toml if you use interactive setup. Avoid submitting sensitive internal URLs, customer domains, private keyword lists, or regulated data unless sending them to DataForSEO is approved.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
scripts/install.sh:5
Finding
Unpinned Third-Party Package Installation Enables Supply-Chain Compromise<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install.sh:5-16`; `SKILL.md:13-18` **Vulnerability Type**: Unpinned and unverified third-party dependency installation **Risk Level**: Medium ### Vulnerable Code `scripts/install.sh:5-16`: ```bash if command -v pip &> /dev/null; then pip install dfseo elif command -v pip3 &> /dev/null; then pip3 install dfseo else echo "Error: pip not found. Install Python 3.11+ first." >&2 exit 1 fi if command -v dfseo &> /dev/null; then echo "✓ dfseo-cli installed successfully" dfseo --version ``` `SKILL.md:13-18`: ```yaml install: - id: pip kind: pip package: dfseo bins: - dfseo ``` ### Technical Analysis The installation process retrieves the package named `dfseo` from the active pip package index without specifying an audited version or cryptographic hash. It also does not verify the package publisher, source repository, or artifact provenance. Consequently, the effective code installed by the Skill can change after this repository has been reviewed. The repository does not contain the implementation of the `dfseo` CLI, so its network destinations, credential handling, and local behavior cannot be independently verified from the audited files. The installation script immediately invokes the installed executable with `dfseo --version`. A malicious or compromised package could therefore receive code execution during installation, build processing, or subsequent executable invocation. This is not direct evidence that the current `dfseo` package is malicious. The vulnerability is the absence of dependency pinning and integrity controls around a package that handles DataForSEO credentials and performs authenticated network operations. ### Attack Path 1. An attacker compromises the `dfseo` package, its publisher account, or a package index configured in the victim's pip environment. 2. The attacker publishes a modified release under the package name expected by ...[truncated 1341 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specifically reviewed version, such as: ```bash python3 -m pip install "dfseo==X.Y.Z" ``` 2. Use a requirements or lock file containing cryptographic hashes and install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Document the verified official package publisher and source repository so users can validate provenance. 4. Install the CLI in an isolated virtual environment or through `pipx` rather than modifying the invoking user's general Python environment. 5. Avoid privileged or root installation. Explicitly abort if the script is run as root unless elevated installation is demonstrably required. 6. Review the pinned package source and distribution artifacts, especially its API endpoints, credential storage, logging behavior, build configuration, and transitive dependencies. 7. Consider vendoring an audited implementation or including its source in the review scope so runtime behavior does not depend entirely on unaudited external code. 8. Add automated dependency monitoring and require a new security review before changing the pinned version or hashes. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
references/serp.md:21
Finding
API Credentials Can Be Supplied Through Exposed Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `references/serp.md:21-22`; `references/keywords.md:24-25`; `references/site.md:33-34`; `references/backlinks.md:29-30` **Vulnerability Type**: Sensitive credentials exposed through process arguments and command history **Risk Level**: Low ### Vulnerable Code `references/serp.md:17-23`: ```text --raw Output raw API response without parsing --login TEXT DataForSEO login (overrides config) --password TEXT DataForSEO password (overrides config) --verbose -v Verbose output on stderr --quiet -q Suppress non-error output ``` `references/keywords.md:21-26`: ```text --dry-run Show estimated cost without executing --output -o TEXT Output format: json, table, csv --login TEXT DataForSEO login --password TEXT DataForSEO password --verbose -v Verbose output ``` `references/site.md:30-35`: ```text --fields -f TEXT Comma-separated fields to include --output -o TEXT Output format: json, table --login TEXT DataForSEO login --password TEXT DataForSEO password --verbose -v Verbose output ``` `references/backlinks.md:26-31`: ```text --raw-params TEXT Raw JSON payload --output -o TEXT Output format: json, table [default: auto] --login TEXT DataForSEO login --password TEXT DataForSEO password --verbose -v Verbose output ``` ### Technical Analysis The documented CLI interface permits the DataForSEO login and password to be supplied directly as command-line arguments. Command-line secrets may be exposed through shell history, process inspection, terminal capture, audit telemetry, command logging, CI logs, or diagnostic reports ...[truncated 1817 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove or deprecate the `--password` command-line option across all commands. 2. Accept passwords through a non-echoing interactive prompt, standard input, an operating-system credential manager, or a dedicated secret-management integration. 3. If environment variables remain supported, document that they should be injected only for the target process rather than exported broadly into long-lived interactive shells. 4. Ensure interactive configuration writes credentials with owner-only permissions, such as mode `0600` on Unix-like systems. 5. Store credentials in an operating-system keychain where available instead of plaintext configuration files. 6. Ensure verbose output, exception traces, telemetry, and HTTP diagnostics redact credentials and authorization headers. 7. Add prominent documentation warning users not to place passwords in command arguments, scripts, CI configuration, screenshots, or shell history. 8. Provide token rotation and revocation guidance for users who have previously supplied credentials through command-line arguments. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill encourages users to submit domains, URLs, keywords, and site audit targets to a third-party API, but it does not clearly disclose that this data leaves the local environment and is sent to DataForSEO. This can expose confidential research terms, internal URLs, customer domains, or unreleased campaign data to an external service, creating privacy, compliance, and trust risks even if the API usage is otherwise legitimate.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The examples repeatedly force `--location "Italy"` and `--language "Italian"`, which is a natural-language locale constraint. The file does not state that this skill is Italy-specific or provide any opt-in or alternative locale guidance, so it appears to impose a specific locale by default.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The reference documents `--login` and `--password` as command-line options without warning that secrets passed via argv may be exposed through shell history, process listings, audit logs, or terminal recording. In a terminal-focused skill, users are especially likely to paste real API credentials directly into commands, increasing the chance of credential leakage and subsequent unauthorized use of the DataForSEO account.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The reference explicitly documents interactive credential setup and states that credentials are saved to ~/.config/dfseo/config.toml, but it gives no warning about plaintext secret storage, filesystem permissions, or safer alternatives. In a CLI skill context, this can lead users to persist API credentials on disk in a discoverable location, increasing exposure through local compromise, backups, shell demos, or accidental file sharing.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation explicitly encourages passing DataForSEO credentials via `--login` and `--password` command-line options without warning that CLI arguments are commonly exposed through shell history, process listings, logging, and CI job output. In an agent or terminal-automation context, this increases the likelihood of credential leakage to other local users, monitoring tools, or transcripts.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The markdown repeatedly uses `--location "Italy"` for keyword and SERP analysis, which imposes a specific locale in the workflow instructions. Because the file does not present this as an optional example or ask the user to choose a target market, it can violate the policy against forcing a locale without user opt-in.

Missing User Warnings

Low
Confidence
89% confidence
Finding
This markdown file documents use of `--login` and `--password` for an external service, which can expose credentials via shell history, process listings, or shared terminals if entered directly on the command line. The reference does not include any warning or safer usage guidance despite repeatedly listing these options.

Missing User Warnings

Low
Confidence
82% confidence
Finding
The authentication status example shows a login email, account balance, and rate-limit information without any privacy or output-handling warning. While the example uses placeholder data, normalizing this output can encourage users to display or log account-identifying and billing-related information in shared terminals, transcripts, CI logs, or screenshots.

Static analysis

No suspicious patterns detected.