Back to skill

Security audit

gsd

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent project automation workflow, but it gives the agent risky authority over secrets, external tools, deployments, and long-running automation that users should review carefully.

Install only if you are comfortable with a highly autonomous coding workflow. Before using it on private or production projects, disable or tightly gate autopilot/YOLO behavior, avoid pasting live secrets into chat, use secret stores or interactive auth instead of command-line key insertion, review any global tool installs such as CCR, and require confirmation before deployments, destructive git commands, or external-service changes.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
references/verification-patterns.md:309
Finding

Environment Verification Commands Expose Plaintext Secrets

Content
View full analysis

Vulnerability Details

File Location: references/verification-patterns.md:309-319
Vulnerability Type: Plaintext sensitive-data disclosure
Risk Level: High

Vulnerable Code:

bash
# .env file exists
[ -f ".env" ] || [ -f ".env.local" ]

# Required variable is defined
grep -E "^$VAR_NAME=" .env .env.local 2>/dev/null
bash
# Variable has actual value (not placeholder)
grep -E "^$VAR_NAME=.+" .env .env.local 2>/dev/null | grep -v "your-.*-here|xxx|placeholder|TODO" -i

Technical Analysis

The documented verification commands print the complete assignment for a selected environment variable rather than checking only whether the variable exists. When $VAR_NAME identifies an API key, database URL, authentication token, webhook secret, or similar credential, grep returns both the variable name and its plaintext value.

Because these commands are intended for execution by an AI agent, their output can be copied into tool results, model context, conversation transcripts, execution logs, debugging records, and downstream agent prompts. The second command specifically filters out placeholder values, making it more likely that any returned output contains an operational credential.

Attack Path

  1. A project stores an operational credential such as STRIPE_SECRET_KEY, DATABASE_URL, or OPENAI_API_KEY in .env or .env.local.
  2. A verification workflow assigns the sensitive variable name to $VAR_NAME.
  3. The agent executes the documented grep command.
  4. The shell returns the complete NAME=value assignment.
  5. The secret enters the agent's tool output and potentially persistent conversation or execution logs.
  6. Anyone with access to those records can recover and reuse the credential against the associated service.

Impact Assessment

Exposure is limited to credentials present in the inspected environment files and selected for verification, but the resulting priv ...[truncated 390 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace value-printing checks with commands that return only an exit status.
  • Never include raw environment-variable values in verification output.
  • Redact all credential-like output before returning it to agent context or logs.
  • Validate type, format, and length locally without displaying the underlying value.
  • Restrict checks to an explicit allowlist of required variable names.
  • Add tests ensuring verification output cannot contain complete .env assignments.

A safer existence and non-empty check is:

bash
awk -F= -v key="$VAR_NAME" '
  $1 == key {
    if (length(substr($0, index($0, "=") + 1)) > 0) {
      print key "=REDACTED"
      found=1
    }
  }
  END { exit found ? 0 : 1 }
' .env .env.local 2>/dev/null

Where possible, emit only a boolean result such as configured or missing, without returning even a redacted assignment.

T09 · Insecure Skill Coding Practices

Error
Location
references/checkpoint-execution.md:204
Finding

Workflow Requests Live API Keys Through Conversation and Places Them on Command Lines

Content
View full analysis

Vulnerability Details

File Location: references/checkpoint-execution.md:204-227
Vulnerability Type: Unsafe credential collection and command-line secret exposure
Risk Level: High

Vulnerable Code:

xml
<!-- RIGHT: Claude asks for value, then adds via CLI -->
&lt;task type="checkpoint:human-action"&gt;
  &lt;action&gt;Provide your OpenAI API key&lt;/action&gt;
  &lt;instructions&gt;
    I need your OpenAI API key to configure the Convex backend.
    Get it from: https://platform.openai.com/api-keys
    Paste the key (starts with sk-)
  &lt;/instructions&gt;
  &lt;verification&gt;I'll add it via `npx convex env set` and verify it's configured&lt;/verification&gt;
  &lt;resume-signal&gt;Paste your API key&lt;/resume-signal&gt;
&lt;/task&gt;

&lt;task type="auto"&gt;
  &lt;name&gt;Configure OpenAI key in Convex&lt;/name&gt;
  &lt;action&gt;Run `npx convex env set OPENAI_API_KEY {user-provided-key}`&lt;/action&gt;
  &lt;verify&gt;`npx convex env get OPENAI_API_KEY` returns the key (masked)&lt;/verify&gt;
&lt;/task&gt;

Technical Analysis

The workflow explicitly treats pasting an operational API key into the conversation as the preferred secret-collection mechanism. It then substitutes that value directly into a shell command.

This exposes the credential across multiple channels:

  • The user's message and retained conversation transcript
  • Agent and subagent context
  • Tool invocation records
  • Shell auditing or command-history facilities
  • Process command-line inspection while the command runs
  • Error messages or diagnostic logs produced by the invoked CLI

Although the verification command is expected to return a masked value, masking during verification does not protect the original chat message or the command that contains the unmasked key.

Attack Path

  1. The workflow encounters an external service that requires an API key.
  2. The agent asks the user to past ...[truncated 971 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not ask users to paste live credentials into ordinary conversation messages.
  • Prefer provider-supported OAuth or interactive CLI authentication.
  • Where OAuth is unavailable, direct users to enter secrets through a protected dashboard or local masked prompt outside the model context.
  • Pass secrets through protected standard input or a short-lived environment variable rather than command-line arguments.
  • Disable command echoing and ensure subprocess errors are sanitized.
  • Explicitly prohibit recording secrets in summaries, planning files, commits, transcripts, and diagnostic logs.
  • Verify configuration through presence or authentication tests, not by retrieving the secret.
  • Advise users to rotate any credential accidentally pasted into chat.

A secure workflow should pause while the user configures the secret through a trusted secret store, then verify only that authentication succeeds.

T08 · Insecure Dependencies

Error
Location
references/ccr-integration.md:21
Finding

Mutable Third-Party Router Source Is Installed and Linked Without Version Pinning

Content
View full analysis

Vulnerability Details

File Location: references/ccr-integration.md:21-29
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: High

Vulnerable Code:

bash
# Clone CCR repository
git clone https://github.com/musistudio/claude-code-router.git
cd claude-code-router

# Install dependencies
npm install

# Create global symlink
npm link

Technical Analysis

The installation procedure clones the current default branch of an external repository without selecting a reviewed tag or immutable commit. It then runs npm install, which can execute dependency lifecycle scripts, followed by npm link, which exposes the resulting package globally.

The effective code executed by this procedure can change after the Skill has been reviewed. The repository owner, a compromised maintainer account, or a compromised transitive dependency could introduce malicious installation or runtime behavior. No lockfile integrity enforcement, commit verification, package-signature validation, or lifecycle-script restriction is specified.

Global linking also broadens the effect: subsequent invocations of the ccr command can execute mutable third-party logic outside the immediate project directory.

Attack Path

  1. An attacker compromises the external repository, its maintainer, or a transitive npm dependency.
  2. Malicious code is added to the default branch or an install lifecycle script.
  3. A user follows the documented installation procedure.
  4. git clone retrieves the attacker-controlled revision.
  5. npm install executes malicious lifecycle code under the user's local account.
  6. npm link makes the compromised command globally available.
  7. The malicious package reads project files or credentials, alters local tools, or sends data to an attacker-controlled endpoint whenever installation or later router execution occurs.

Impact Assessment

Exploitation can provide arbitra ...[truncated 458 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the repository to a reviewed immutable commit hash or cryptographically verified release tag.
  • Document the expected commit hash and verify it before installation.
  • Use a committed lockfile and npm ci rather than an unconstrained npm install.
  • Review package lifecycle scripts and use --ignore-scripts unless scripts are strictly required and audited.
  • Verify release signatures or checksums where supported.
  • Avoid global npm link; install the dependency in an isolated project or container with restricted filesystem and network access.
  • Require explicit user approval before downloading and executing third-party software.
  • Run the router under a dedicated low-privilege account and provide only the credentials needed for selected providers.
  • Re-audit dependencies whenever the pinned version or commit changes.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (184)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 80)May include surrounding context.

md
| "plan phase", "plan-phase", "create plan" | workflows/plan-phase.md |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 81)May include surrounding context.

md
| "execute phase", "execute-phase", "start work" | workflows/execute-phase.md |

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
93% confidence
Finding

The explicit wrapper command ccr code --model ... -- bash .planning/autopilot.sh directs project execution through an external routing layer and selected third-party model provider. If used on sensitive repositories, prompts, code, logs, or derived context may be sent off-host to remote services, creating a substantial data exfiltration and supply-chain exposure risk.

Content

Scanner excerpt · references/ccr-integration.md (reported line 172)May include surrounding context.

Option 2: Explicit CCR wrapper

bash
cd /path/to/project
ccr code --model claude-3-5-sonnet-latest -- bash .planning/autopilot.sh

Option 3: Background execution

Credential Access

High
Category
Privilege Escalation
Confidence
78% confidence
Finding

The document instructs the agent to use Write/Edit tools for .env files and to collect secrets from the user for automated insertion. In a highly autonomous skill, this creates a real risk of unsafe secret handling, accidental persistence in plaintext, inclusion in logs, or propagation into version-controlled files.

Content

Scanner excerpt · references/checkpoint-execution.md (reported line 192)May include surrounding context.

md
## Environment Variable Automation

**Env files:** Use Write/Edit tools. Never ask human to create .env manually.

**Dashboard env vars via CLI:**

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/checkpoint-execution.md (reported line 206)May include surrounding context.

Pattern for secret collection:

xml
<!-- WRONG: Asking user to add env vars in dashboard -->
<task type="checkpoint:human-action">
  <action>Add OPENAI_API_KEY to Convex dashboard</action>
  <instructions>Go to dashboard.convex.dev → Settings → Environment Variables → Add</instructions>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/checkpoints.md (reported line 529)May include surrounding context.

Pattern for secret collection:

xml
<!-- WRONG: Asking user to add env vars in dashboard -->
<task type="checkpoint:human-action">
  <action>Add OPENAI_API_KEY to Convex dashboard</action>
  <instructions>Go to dashboard.convex.dev → Settings → Environment Variables → Add</instructions>

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

The quick reference explicitly marks writing .env files and adding env vars as approved automation. In context, that normalizes automated secret material handling by the agent, which is dangerous if transcripts, shell history, workspace files, or commits expose those values.

Content

Scanner excerpt · references/checkpoint-execution.md (reported line 359)May include surrounding context.

md
|--------|--------------|-----------------|
| Deploy to Vercel | Yes (`vercel`) | YES |
| Create Stripe webhook | Yes (API) | YES |
| Write .env file | Yes (Write tool) | YES |
| Create Upstash DB | Yes (`upstash`) | YES |
| Run tests | Yes (`npm test`) | YES |
| Start dev server | Yes (`npm run dev`) | YES |

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/checkpoint-types.md (reported line 314)May include surrounding context.

md
<verify>vercel ls shows deployment, curl returns 200</verify>
</task>

<!-- If vercel returns "Error: Not authenticated", Claude creates checkpoint on the fly -->

<task type="checkpoint:human-action" gate="blocking">
  <action>Authenticate Vercel CLI so I can continue deployment</action>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/checkpoints.md (reported line 314)May include surrounding context.

md
<verify>vercel ls shows deployment, curl returns 200</verify>
</task>

<!-- If vercel returns "Error: Not authenticated", Claude creates checkpoint on the fly -->

<task type="checkpoint:human-action" gate="blocking">
  <action>Authenticate Vercel CLI so I can continue deployment</action>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/framework-patterns.md (reported line 349)May include surrounding context.

md
</div>
        </section>

        <!-- More sections -->
    </main>
</body>
</html>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Referencing git reset --hard as a recovery mechanism is dangerous because it permanently discards uncommitted local changes and can be misapplied by an autonomous agent or copied blindly by users. In this skill's execution-oriented context, destructive git guidance is more hazardous because the surrounding workflow encourages automated repository operations and frequent state transitions.

Content

Scanner excerpt · references/git-integration.md (reported line 242)May include surrounding context.

md
**Failure recovery:**
- Task 1 committed ✅, Task 2 failed ❌
- Claude in next session: sees task 1 complete, can retry task 2
- Can `git reset --hard` to last successful task

**Debugging:**
- `git bisect` finds exact failing task, not just failing plan

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/tdd.md (reported line 246)May include surrounding context.

md
**Benefits:**
- Each commit independently revertable
- Git bisect works at commit level
- Clear history showing TDD discipline
- Consistent with overall commit strategy
</commit_pattern>

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/verification-patterns.md (reported line 310)May include surrounding context.

Existence check:

bash
# .env file exists
[ -f ".env" ] || [ -f ".env.local" ]

# Required variable is defined
grep -E "^$VAR_NAME=" .env .env.local 2>/dev/null

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/verification-patterns.md (reported line 310)May include surrounding context.

Existence check:

bash
# .env file exists
[ -f ".env" ] || [ -f ".env.local" ]

# Required variable is defined
grep -E "^$VAR_NAME=" .env .env.local 2>/dev/null

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/verification-patterns.md (reported line 313)May include surrounding context.

md
**Development:**
- Required env vars: [List critical vars]
- Secrets location: [e.g., ".env.local (gitignored)", "1Password vault"]
- Mock/stub services: [e.g., "Stripe test mode", "local PostgreSQL"]

**Staging:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/verification-patterns.md (reported line 319)May include surrounding context.

md
**Development:**
- Required env vars: [List critical vars]
- Secrets location: [e.g., ".env.local (gitignored)", "1Password vault"]
- Mock/stub services: [e.g., "Stripe test mode", "local PostgreSQL"]

**Staging:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/codebase/integrations.md (reported line 100)May include surrounding context.

md
**Development:**
- Required env vars: [List critical vars]
- Secrets location: [e.g., ".env.local (gitignored)", "1Password vault"]
- Mock/stub services: [e.g., "Stripe test mode", "local PostgreSQL"]

**Staging:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/codebase/integrations.md (reported line 215)May include surrounding context.

md
**Development:**
- Required env vars: [List critical vars]
- Secrets location: [e.g., ".env.local (gitignored)", "1Password vault"]
- Mock/stub services: [e.g., "Stripe test mode", "local PostgreSQL"]

**Staging:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/checkpoint-execution.md (reported line 181)May include surrounding context.

md
## Configuration

**Environment:**
- [How configured: e.g., ".env files", "environment variables"]
- [Key configs: e.g., "DATABASE_URL, API_KEY required"]

**Build:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/checkpoint-types.md (reported line 424)May include surrounding context.

md
## Configuration

**Environment:**
- [How configured: e.g., ".env files", "environment variables"]
- [Key configs: e.g., "DATABASE_URL, API_KEY required"]

**Build:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/checkpoint-types.md (reported line 443)May include surrounding context.

md
## Configuration

**Environment:**
- [How configured: e.g., ".env files", "environment variables"]
- [Key configs: e.g., "DATABASE_URL, API_KEY required"]

**Build:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/checkpoint-types.md (reported line 448)May include surrounding context.

md
## Configuration

**Environment:**
- [How configured: e.g., ".env files", "environment variables"]
- [Key configs: e.g., "DATABASE_URL, API_KEY required"]

**Build:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/checkpoint-types.md (reported line 650)May include surrounding context.

md
## Configuration

**Environment:**
- [How configured: e.g., ".env files", "environment variables"]
- [Key configs: e.g., "DATABASE_URL, API_KEY required"]

**Build:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/checkpoint-types.md (reported line 652)May include surrounding context.

md
## Configuration

**Environment:**
- [How configured: e.g., ".env files", "environment variables"]
- [Key configs: e.g., "DATABASE_URL, API_KEY required"]

**Build:**

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/checkpoint-types.md (reported line 714)May include surrounding context.

md
## Configuration

**Environment:**
- [How configured: e.g., ".env files", "environment variables"]
- [Key configs: e.g., "DATABASE_URL, API_KEY required"]

**Build:**

Static analysis

Detected: suspicious.generated_source_template_injection

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
agents/gsd-phase-researcher.md:163

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
workflows/discuss-phase.md:51

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
workflows/plan-phase.md:172

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
workflows/verify-phase.md:49

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
workflows/verify-work.md:53