Back to skill

Security audit

Blog Cross-Publisher Lite

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned for publishing to Dev.to, but its instructions expose an API key through command-line usage and default the example to immediate public posting.

Review the article for secrets before publishing, avoid putting the Dev.to API key directly on the command line, prefer a secure secret prompt or protected environment/secret store, and omit `--publish` until you are ready for the post to go live. Also note that the referenced publishing script was not included in the inspected artifact.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:22
Finding

Dev.to API Key Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 22
Vulnerability Type: Sensitive credential exposure through process arguments and shell history
Risk Level: Medium

Vulnerable Code

bash
python scripts/publish_devto.py article.md --api-key YOUR_API_KEY --publish

Technical Analysis

The documented publishing workflow instructs users to supply their Dev.to API key directly through the --api-key command-line argument. Although YOUR_API_KEY is only a placeholder and no hardcoded credential is present in the repository, users following the instructions would replace it with a real secret.

Command-line arguments can be exposed through shell history, process-inspection utilities, process-accounting systems, terminal recordings, debugging output, or operational monitoring. On a shared or insufficiently isolated host, another user or monitoring process may capture the API key while the publishing command is running or retrieve it from retained logs afterward.

Attack Path

  1. A user replaces YOUR_API_KEY with a valid Dev.to API key and runs the documented command.
  2. The complete command is retained in shell history, captured by command auditing, or temporarily exposed in the process argument list.
  3. An attacker with access to the same account, relevant host telemetry, history files, or process information obtains the key.
  4. The attacker sends authenticated requests to the Dev.to API using the stolen credential.
  5. The attacker performs operations permitted by the API key, potentially including unauthorized article publication or modification.

Exploitation requires access to the host's process information, command history, terminal logs, or monitoring records; the documentation does not itself transmit the credential externally.

Impact Assessment

A compromised API key may permit an attacker to act through the Dev.to API with the privileges associated with that key. The practica ...[truncated 480 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the API key from command-line arguments.

  • Prefer an interactive secret prompt that does not echo input, or retrieve the credential from an operating-system credential manager or secrets-management service.

  • If environment-variable support is provided for automation, document the residual exposure risks and avoid placing the assignment directly in shell history. For example, the script could read a predefined variable such as DEVTO_API_KEY without printing it.

  • Ensure the implementation never logs, serializes, or includes the key in exception messages.

  • Redact authorization headers and secret values from debugging output and HTTP traces.

  • Advise users to restrict credential-file permissions where file-based configuration is unavoidable.

  • Update the documented invocation to omit the secret, for example:

    bash
    python scripts/publish_devto.py article.md --publish
    

    The script should then securely obtain the API key from an interactive prompt, credential store, or protected automation secret.

  • Rotate any Dev.to API key that may already have been entered into shell history or captured in logs.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs users to invoke a command that transmits both article content and a Dev.to API key to a third-party service, but it does not clearly warn about that data disclosure or the consequences of immediate publication. This is dangerous because users may unintentionally send sensitive draft content or expose operational secrets through normal skill usage without informed consent.

Content

No source excerpt is available for this finding.