Back to skill

Security audit

gsd-by-glittercowboy

Security checks for vulnerabilities and agentic risk

Overview

This project-automation skill is mostly transparent about broad autonomy, but it normalizes risky secret handling, external service automation, and some unsafe shell/dependency patterns, so it should be reviewed before installation.

Install only if you are comfortable giving the agent broad project write access, shell access, git commit authority, subagent execution, web research, and possible deployment/provider CLI authority. Do not paste production API keys into chat; prefer provider login flows, secret managers, masked inputs, or short-lived scoped credentials. Review any autopilot, CCR, global npm link, .env verification, and remove-phase use before running it.

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

T09 · Insecure Skill Coding Practices

Error
Location
workflows/remove-phase.md:21
Finding

Unvalidated Phase Input Reaches Recursive Directory Deletion

Content
View full analysis
" exit 1 fi TARGET=$ARGUMENTS ``` ```bash grep -q "Phase ${TARGET}:" .planning/ROADMAP.md || { echo "ERROR: Phase ${TARGET} not found" exit 1 } ``` ```bash CURRENT=$(grep "Phase:" .planning/STATE.md | grep -oE "[0-9]+" | head -1) if [ "$TARGET" -le "$CURRENT" ]; then echo "ERROR: Can only remove future phases (current: $CURRENT)" exit 1 fi ``` ```bash rm -rf .planning/phases/${TARGET}-*/ ``` ### Technical Analysis The workflow copies `$ARGUMENTS` into `TARGET` without enforcing the documented integer-only phase-number format. It subsequently inserts the value into a regular expression and, more critically, into an unquoted pathname passed to `rm -rf`. Because the deletion operand is unquoted, shell word splitting and pathname expansion apply. Path traversal sequences and glob metacharacters can alter which directories match. The numeric comparison is not an adequate validator: a non-numeric operand can make `[` return an error, but the workflow does not explicitly terminate on that error. The roadmap check also treats `TARGET` as a regular expression rather than a literal phase identifier. This can permit unexpected matches. Exploitation may require control over, or a suitable existing match in, `.planning/ROADMAP.md`. ### Attack Path 1. An attacker supplies a malformed phase argument containing regular-expression, glob, whitespace, or path-traversal syntax. 2. The argument is assigned directly to `TARGET`. 3. The interpolated regular expression matches an existing or attacker-influenced roadmap entry. 4. The numeric comparison fails to provide a strict allowlist check and may not terminate execution. 5. Th ...[truncated 750 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

API Keys Are Collected in Chat and Interpolated into Command-Line Arguments

Content
View full analysis
Provide your OpenAI API key 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-) I'll add it via `npx convex env set` and verify it's configured Paste your API key Configure OpenAI key in Convex Run `npx convex env set OPENAI_API_KEY {user-provided-key}` `npx convex env get OPENAI_API_KEY` returns the key (masked) ``` ### Technical Analysis The documented “correct” workflow asks the user to paste a live API key into the agent conversation. The key is then interpolated directly into a command-line argument. This creates several independent disclosure channels: - The plaintext secret remains in the conversation transcript. - Agent orchestration or telemetry may retain the prompt containing the secret. - Shell command logging may retain the expanded command. - Process-inspection tools may expose the key while the command is running. - Debug logs, checkpoint state, or execution summaries may reproduce the command. - Shell history may retain the command in environments where history recording is enabled. Although the target CLI is intended to send the key to Convex, exposing the value in chat and process arguments exceeds the minimum privilege necessary to configure the service. ### Attac ...[truncated 1170 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/verification-patterns.md:303
Finding

Environment Verification Commands Print Complete Secret Values

Content
View full analysis
/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 # Value looks valid for type: # - URLs should start with http # - Keys should be long enough # - Booleans should be true/false ``` ### Technical Analysis The verification patterns use `grep` without quiet mode or output redaction. A successful match therefore emits the entire environment-variable assignment, including its value. When `VAR_NAME` identifies a sensitive setting such as an API key, database URL, signing key, or service token, the secret is copied from the environment file into terminal output. In an agent workflow, that output can enter model context, execution logs, debug artifacts, or persisted summaries. The commands only need to determine whether a non-placeholder value exists. Printing the value is unnecessary for that goal and violates least-exposure principles. ### Attack Path 1. A verification task selects a sensitive environment variable as `VAR_NAME`. 2. The Skill executes one of the documented `grep` commands. 3. `grep` prints the complete matching assignment from `.env` or `.env.local`. 4. The shell output is captured by the agent runtime or logging system. 5. A user, service operator, extension, subagent, or compromised logging system with access to that output reads the secret. 6. The credential is reused against its associated service. ### Impact Assessment The exposed value can grant access to databases, payment providers, hosted platforms, internal APIs, or cryptographic signing operations, depending on the va ...[truncated 279 chars]
Remediation
View remediation
/dev/null ``` 2. Strictly validate `VAR_NAME` against an identifier pattern before inserting it into a regular expression: ```bash [[ "$VAR_NAME" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]] || exit 1 ``` 3. Validate placeholder status without printing the line, using a small script that returns only success or failure. 4. Never display secret length, prefix, suffix, or format unless strictly required. 5. Apply automatic redaction to all terminal output and logs. 6. Report only a status such as `configured`, `missing`, or `placeholder`. 7. Keep `.env` files excluded from version control and restrict their filesystem permissions. ]]>

T08 · Insecure Dependencies

Warning
Location
references/ccr-integration.md:19
Finding

Mutable Third-Party Repository Is Installed and Globally Linked Without Integrity Verification

Content
View full analysis
Remediation
View remediation
" --depth 1 https://github.com/musistudio/claude-code-router.git ``` 2. Verify the checked-out commit hash and, where available, the maintainer's cryptographic signature. 3. Publish and verify checksums for approved source archives. 4. Require a committed lockfile and use `npm ci` rather than unconstrained `npm install`. 5. Use `npm ci --ignore-scripts` where lifecycle scripts are unnecessary. 6. If lifecycle scripts are required, document and audit each script before execution. 7. Run installation in an isolated environment with no production credentials. 8. Avoid `npm link`; prefer a project-local, version-pinned invocation. 9. Add dependency auditing and provenance verification to the documented installation process. ]]>
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 (180)

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
90% confidence
Finding

The explicit CCR wrapper command encourages execution of the autopilot workflow through a model-routing proxy that can send project context to externally selected providers. In the context of an autonomous planning/execution skill, this is more dangerous than ordinary documentation because the workflow may process large amounts of source code, plans, logs, or credentials and transmit them to a provider chosen by configuration rather than by an explicitly reviewed trust boundary.

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
84% confidence
Finding

The directive to use Write/Edit tools for .env files, coupled with the surrounding automation guidance, authorizes the agent to handle plaintext secrets directly. That creates realistic exposure paths through tool logs, accidental commits, file leaks, and overbroad agent access. In this skill, the risk is elevated because secret manipulation is framed as standard operating procedure.

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
88% confidence
Finding

The example instructs saving a Stripe webhook signing secret directly to .env as part of agent automation. In autonomous workflows, normalizing direct secret handling in local files increases the risk of accidental disclosure through commits, logs, terminal history, or downstream tooling.

Content

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

md
<action>
    1. Use Stripe API to create webhook endpoint pointing to /api/webhooks
    2. Subscribe to events: payment_intent.succeeded, customer.subscription.updated
    3. Save webhook signing secret to .env
    4. Implement webhook handler in route.ts
  </action>
  <verify>

Credential Access

High
Category
Privilege Escalation
Confidence
82% confidence
Finding

Although framed as remediation for a bad pattern, the text explicitly says the agent should create the webhook via API and write the signing secret to .env directly. That still encourages automated secret material handling in plaintext project configuration, which is risky in agentic contexts where logs, commits, and tool output may leak secrets.

Content

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

```

Why bad: Stripe has an API. Claude should create the webhook via API and write to .env directly.

</anti_patterns>

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
87% confidence
Finding

The document recommends git reset --hard as a recovery action, which is a destructive command that discards uncommitted changes and can cause irreversible data loss if executed by an agent. In a skill focused on automated project execution, mentioning this as a normal recovery step increases the chance an agent may apply it broadly or without adequate safeguards.

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-execution.md (reported line 359)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 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:**

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