Back to skill

Security audit

Bug Fixing

Security checks for vulnerabilities and agentic risk

Overview

This bug-fixing helper is mostly legitimate, but it tells the agent to modify its own instructions and add broad debug logs that may capture private data.

Install only if you are comfortable letting this skill edit code, run project commands, update local bug-history files, and potentially alter its own workflow. Before use, remove or constrain the self-update section and require redaction or allowlisted debug fields for logs, especially around cookies, tokens, session identifiers, personal data, and URLs.

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
references/system-rca.md:45
Finding

Unredacted Payload and Session Metadata Exposure in Debugging Guidance

Content
View full analysis

Vulnerability Details

File Location: references/system-rca.md, lines 45–52
Vulnerability Type: Sensitive information exposure through diagnostic logs and tool results
Risk Level: Medium

Complete Vulnerable Snippet:

markdown
### Step 3: Insert Probes

BEFORE modifying any behavior, insert probes to collect evidence:

| Probe Type | Location | What to Log |
|-----------|----------|-------------|
| Log | Each edge | `[EdgeN] from=X to=Y payload={...}` |
| Return field | Tool result | `{ ..., debug: { sessionId, url } }` |
| Metric | Critical path | Latency, success rate |
| Assertion | Invariant points | `assert(sessionId != null)` |

Technical Analysis

The Skill instructs the Agent to insert probes at every edge of a system-level data flow and log the complete payload. Cross-layer payloads may contain authorization headers, cookies, API keys, access tokens, passwords, user prompts, personal information, or other application secrets.

The guidance also recommends returning a real sessionId and URL in tool output. This unnecessarily propagates internal identifiers and endpoint details into Agent-visible results, chat transcripts, test artifacts, or other retained output.

No safeguards require field allowlisting, recursive redaction, URL sanitization, production restrictions, access controls, retention limits, or removal of temporary probes. This conflicts with least-data diagnostic practices and creates an avoidable information-disclosure risk.

Attack Path

  1. A bug occurs in an authenticated request, streaming connection, or other cross-layer workflow.
  2. Following the mandatory RCA process, the Agent inserts diagnostic probes at each system edge.
  3. A probe records the entire payload, including any secrets, cookies, tokens, or personal data it contains.
  4. The Agent also adds real session identifiers and URLs to returned tool results.
  5. These values persist in application l ...[truncated 1264 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace complete-payload logging with an explicit allowlist of fields required for the current diagnosis.

  2. Require recursive masking or omission of:

    • Authorization and proxy-authorization headers
    • Cookies and Set-Cookie values
    • Passwords, secrets, API keys, and access or refresh tokens
    • Session identifiers, CSRF tokens, and signed URLs
    • Personal, financial, health, and other regulated data
  3. Use a newly generated correlation ID instead of exposing the actual sessionId.

  4. Sanitize URLs by removing user information, sensitive query parameters, fragments, and signed access parameters.

  5. Prohibit verbose payload probes in production unless explicitly approved and protected by restricted log access.

  6. Apply short retention periods and access controls to diagnostic artifacts.

  7. Require temporary probes to be removed or disabled immediately after reproduction and verification.

  8. Add a safe diagnostic example, such as:

    text
    [EdgeN] from=frontend to=backend requestId=<generated-id>
    eventType=<allowlisted-value> payloadKeys=<field-names-only>
    
  9. Add a mandatory pre-logging review that checks whether each recorded field is necessary and non-sensitive.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Self-Modification

High
Category
Rogue Agent
Confidence
98% confidence
Finding

The skill explicitly instructs future agents to modify the skill itself ('Update this skill when...'). In a skill with write access, self-modification creates a prompt persistence and supply-chain risk: an agent handling an untrusted bug report or review outcome could alter the workflow, weaken safeguards, or insert malicious instructions that affect later executions.

Content

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

md
## Skill Evolution

Update this skill when:
- Code review finds a bug that the workflow should have prevented
- A recurring bug class repeats across fixes

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

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

md
- **Symptom**: Console warning about setState on unmounted component; state issues on route change
- **Detection**: setState called in async callback after component unmounts
- **Fix**: Use AbortController for fetch; unsubscribe in cleanup; keep-only-latest pattern with requestId
- **Verify**: Rapidly switching routes produces no warnings; data not overwritten

### 1.5 Controlled/Uncontrolled Input Switch

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

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

md
- **Symptom**: Input value jumps; console warns about controlled/uncontrolled switch
- **Detection**: value changes from undefined to string (or vice versa)
- **Fix**: Ensure input is always controlled (default empty string) or always uncontrolled
- **Verify**: First render/async load/reset flows without warnings

### 1.6 Unstable Key Causes List Reuse Errors

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest sets language: en, which is a natural-language locale constraint. The file does not provide any user opt-in, alternative language choice, or region-specific justification for requiring English, so this appears to violate the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## High-Frequency Root Causes (Top 18)

1. **Unverified assumptions** — assuming API/feature works without checking docs
2. **Incomplete status check** — only checking HTTP status, not business status
3. **Missing edge case handling** — not considering empty/null/boundary input
4. **Stale closure/state** — capturing old values in callbacks/effects