Back to skill

Security audit

supply-chain-advisory

Security checks for vulnerabilities and agentic risk

Overview

This supply-chain incident-response skill is mostly coherent, but it includes unsafe guidance that can expose credentials by dumping the full environment into /tmp.

Review this skill before installing. Its supply-chain audit guidance is useful, but do not run the environment snapshot command as written; use a private evidence directory, restrictive permissions, redaction, and credential rotation if any secrets are captured. Also expect the skill to activate for broad security and dependency topics.

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

Error
Location
modules/incident-response.md:16
Finding
Plaintext Exposure of Sensitive Environment Variables in a Shared Temporary Directory## Vulnerability Details **File Location**: `modules/incident-response.md`, line 16 **Vulnerability Type**: Plaintext sensitive-data exposure and unsafe temporary-file handling **Risk Level**: High ### Vulnerable Code ```bash env > /tmp/env_snapshot_$(date +%s).txt ``` ### Technical Analysis The incident-response procedure instructs the operator to copy the process's entire environment into a plaintext file in `/tmp`. Environment variables frequently contain cloud credentials, database passwords, API tokens, Kubernetes tokens, SSH-related configuration, and other secrets. The same document explicitly recognizes that environment variables may contain such credentials. The command does not: - Filter or redact secret-bearing variables. - Set a restrictive `umask` or explicit file permissions. - Use a private, access-controlled evidence directory. - Encrypt the captured evidence. - Define secure retention and deletion requirements. - Create the file using a mechanism designed to resist temporary-file attacks. The timestamp-based name is predictable. Depending on operating-system temporary-directory protections and shell behavior, an attacker with local access may monitor for the resulting file or attempt to prepare a matching path. Even without such manipulation, the plaintext snapshot can persist after incident handling and may be collected by backups, forensic utilities, support bundles, or unrelated processes with sufficient filesystem access. ### Attack Path 1. A suspected supply-chain incident causes an operator or automation agent to follow the documented containment procedure. 2. The affected process has sensitive credentials in its environment. 3. The operator executes: ```bash env > /tmp/env_snapshot_$(date +%s).txt ``` 4. The complete environment, including any credential values, is written to a predictable plaintext path in the shared temporary directory. 5. A local user, compromised process, privileged diagnostic tool, backup process, ...[truncated 1144 chars]
Remediation
## Remediation Suggestions 1. Do not capture the complete environment by default. Record only an explicit allowlist of non-sensitive diagnostic variables. 2. Redact values for variable names associated with passwords, secrets, tokens, keys, credentials, cookies, and connection strings. 3. If a complete snapshot is strictly necessary for authorized forensic work: - Create a dedicated evidence directory owned by the incident responder. - Set `umask 077` before creating evidence. - Ensure directories use mode `0700` and files use mode `0600`. - Generate filenames with a secure temporary-file facility rather than timestamps alone. - Encrypt evidence at rest with access restricted to the incident-response team. 4. Document chain-of-custody, retention, transfer, and secure-deletion requirements. 5. Rotate any credentials included in a captured environment immediately after evidence preservation. 6. Replace the unsafe instruction with an allowlist-based example, such as: ```bash umask 077 evidence_dir="$(mktemp -d "${HOME}/incident-evidence.XXXXXX")" { printf 'PATH=%s\n' "$PATH" printf 'SHELL=%s\n' "$SHELL" printf 'LANG=%s\n' "$LANG" } > "${evidence_dir}/environment-summary.txt" ``` The allowlist must be reviewed for the actual deployment because even normally benign variables can contain sensitive paths or identifiers.
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 (2)

Vague Triggers

Medium
Confidence
91% confidence
Finding
The manifest trigger list is broad enough to activate on many routine security or dependency discussions, which can cause the skill to run in more contexts than intended. Over-broad automatic activation increases the attack surface for any risky guidance or future changes in the skill, and may expose users to unnecessary command suggestions during unrelated workflows.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The checklist tells responders to write the complete process environment to a file under /tmp, which commonly includes secrets such as API keys, cloud credentials, database passwords, and session tokens. On many systems, /tmp is broadly accessible and persistent long enough for other local users, malware, backup tooling, or incident artifacts to exfiltrate those secrets, worsening a supply-chain incident.

Static analysis

No suspicious patterns detected.