Back to skill

Security audit

Automation Runner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed automation helper, but it combines shell execution, Bitwarden secret retrieval, and persistent raw output logging without enough safeguards.

Review before installing. This should only be used with tightly controlled scripts, a least-privilege Bitwarden identity, explicit approval for each secret identifier, and logging that excludes or redacts stdout/stderr containing credentials.

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
SKILL.md:22
Finding

Unrestricted Secret Retrieval Combined with Persistent Output Logging

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22-26
Vulnerability Type: Unconstrained secret access and potential plaintext secret retention
Risk Level: High

Complete Code Snippet:

text
## Workflow
1. Receive a script or command request.
2. Use `bws secret get` to fetch necessary environment variables.
3. Execute the command.
4. If a prompt appears, wait for Paul to type `/approve`.
5. Log the output to `memory/YYYY-MM-DD.md`.

Technical Analysis

The workflow instructs the agent to retrieve secrets for a received script or command request, but it does not restrict which Bitwarden secrets may be requested or define a per-script secret allowlist. It also does not require separate authorization for each secret, constrain how retrieved values are supplied to subprocesses, or prevent commands from printing those values.

The subsequent requirement to log command output to memory/YYYY-MM-DD.md creates a sensitive-data retention hazard. A command that prints its environment, arguments, configuration, error context, or retrieved secret can cause that value to be stored in plaintext persistent memory. The general execution-approval requirement does not fully mitigate this issue because the specification does not state that approvals disclose or constrain the requested secret set, nor does it require output redaction.

This behavior exceeds minimum privilege for the declared automation function: each approved script should receive only explicitly authorized secret values needed for that specific operation, while logs should exclude those values.

The audited file does not establish that secrets are sent to an untrusted network destination. bws secret get may communicate with Bitwarden as part of its legitimate retrieval function, but direct network exfiltration is not confirmed by the available content.

Attack Path

  1. An attacker or untrusted user submits a plausible script or command ...[truncated 1346 chars]
Remediation
View remediation

Remediation Suggestions

  1. Define an explicit allowlist mapping each approved script to the exact secret identifiers it may use.
  2. Require separate, informed authorization for every secret retrieval, displaying the script identity and secret identifier without displaying the value.
  3. Configure the Bitwarden runtime identity with least-privilege access to only the secrets required for supported automation tasks.
  4. Reject free-form commands that request secrets; permit secret injection only for reviewed scripts with fixed interfaces.
  5. Supply secrets through a narrowly scoped mechanism, such as protected standard input or a dedicated file descriptor, rather than command-line arguments or a broadly inherited environment.
  6. Ensure child processes cannot unintentionally propagate secrets to unrelated subprocesses.
  7. Redact retrieved secret values and known encodings from standard output, standard error, exception messages, and diagnostic logs before persistence.
  8. Replace unconditional raw-output logging with structured, allowlisted audit events containing command identity, approval status, exit status, and timestamps only.
  9. Apply restrictive permissions, retention limits, and secure deletion procedures to memory logs.
  10. Abort execution and logging if output redaction cannot be guaranteed, and test controls against environment dumps, shell tracing, crash reports, and verbose error modes.
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
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill description is broad enough to invite general-purpose command execution requests without clearly constrained triggers, which increases the chance of unsafe or unintended invocation. In a skill that can execute shell commands and retrieve secrets, ambiguous activation scope materially raises misuse risk because the agent may be engaged for actions beyond a narrowly approved automation context.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Logging all command output to memory files can capture secrets, tokens, environment variables, command arguments, or sensitive system data emitted during execution. This is especially dangerous here because the skill explicitly retrieves secrets via Bitwarden and runs shell commands, so sensitive material may be exposed both at retrieval time and through downstream command output, creating durable plaintext retention.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.