Back to skill

Security audit

Bug Audit

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate bug-auditing guide, but it needs review because some instructions could trigger disruptive tests or unsafe debug code without enough guardrails.

Install only if you intend to use it for authorized audits of your own code, preferably in local or staging environments. Require explicit approval before any network, load, auth-bypass, SSRF, upload, or data-exposure testing, and do not copy the debug logging or debug panel snippets into production without authentication, redaction, rate limits, and safe DOM rendering.

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

T09 · Insecure Skill Coding Practices

Warning
Location
references/pitfalls.md:37
Finding

Unauthenticated Debug Log Ingestion and Disclosure

Content
View full analysis
200) debugLogs.shift(); res.end(); }); app.get('/api/debug-log', function(req, res) { res.json(debugLogs.slice(-50)); }); ``` ### Technical Analysis The Skill recommends creating debug endpoints that accept arbitrary client-provided log data and disclose recent entries without authentication or authorization. The browser-side handler transmits exception messages, source URLs, and line numbers to the server. Depending on the application, these values may contain internal paths, query-string tokens, identifiers, personal data, or user-controlled content. The corresponding `GET /api/debug-log` endpoint returns the shared log buffer to any caller. The ingestion endpoint also lacks explicit input type and length validation and endpoint-specific rate limiting. Although the array is capped at 200 entries, an attacker can continuously overwrite legitimate diagnostic records, submit oversized entries subject to the application's global body limit, or inject misleading content into the debugging record. This is an insecure example rather than evidence that the Skill itself exfiltrates data to an external attacker. Nevertheless, downstream projects following the recommendation verbatim would expose an avoidable public data and abuse surface that exceeds the minimum privileges r ...[truncated 1171 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/pitfalls.md:63
Finding

DOM-Based Cross-Site Scripting in Recommended Debug Panel

Content
View full analysis
var _dbg = []; window.onerror = function(m, u, l) { _dbg.push('[ERR] ' + m + ' L' + l); _renderDbg(); }; function _renderDbg() { var el = document.getElementById('_dbgPanel'); if (!el) { el = document.createElement('div'); el.id = '_dbgPanel'; el.style.cssText = 'position:fixed;bottom:0;left:0;right:0;max-height:40vh;overflow:auto;background:#000;color:#0f0;font:12px monospace;z-index:99999;padding:8px;'; document.body.appendChild(el); } el.innerHTML = _dbg.join('
'); el.scrollTop = el.scrollHeight; } ``` ### Technical Analysis The recommended debug panel concatenates error messages into an HTML string and assigns the result to `el.innerHTML`. Error message text is not HTML-escaped before insertion. If an attacker can influence an exception message—for example, through application code that throws an error containing attacker-controlled input—the message can contain HTML with executable event handlers or other active markup. Assigning that content to `innerHTML` causes the browser to parse it in the application's origin. Using `
` as the separator does not make the surrounding entries safe. Every value in `_dbg` remains an untrusted HTML injection source. ### Attack Path 1. A project includes the recommended inline debug panel. 2. An attacker supplies content that is later included in a JavaScript exception message. 3. The application throws or reports that message through `window.onerror`. 4. The handler appends the unescaped message to `_dbg`. 5. `_renderDbg()` joins the records and assigns them to `el.innerHTML`. 6. The browser parses the injected markup in the application's security origin. 7. Attacker-controlled script behavior executes with the privileges availab ...[truncated 809 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (16)

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/modules.md (reported line 35)May include surrounding context.

md
### C1 Secrets & Credentials
- Hardcoded passwords/API keys/tokens in source code (grep for `password`, `secret`, `apiKey`, `token` in .js files)
- Secrets in config.json committed to git (should be in .env or environment variables)
- Admin password stored as plaintext or weak hash (MD5/SHA1 without salt)
- Password comparison: `===` is vulnerable to timing attacks → use `crypto.timingSafeEqual`
- Session tokens: generated with `Math.random()`? → use `crypto.randomBytes(32).toString('hex')`

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/redblue.md (reported line 47)May include surrounding context.

md
- Deeply nested: {a:{b:{c:{d:...}}}} → recursion depth?
3. File upload (if any):
   - Upload .js/.html → served as executable?
   - Path traversal: filename=../../etc/passwd
   - Oversize file → disk exhaustion?
4. URL/redirect parameters:
   - Open redirect: ?redirect=https://evil.com

Cloud Metadata Access

High
Category
Server-Side Request Forgery
Confidence
90% confidence
Finding

Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.

Content

Scanner excerpt · references/redblue.md (reported line 51)May include surrounding context.

  • Oversize file → disk exhaustion?
  1. URL/redirect parameters:
text

## U-Chain 3: Rate & Resource Abuse

Instruction Override

High
Category
Prompt Injection
Confidence
80% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · references/redblue.md (reported line 248)May include surrounding context.

text
Goal: Make bot execute unintended actions
1. Command injection: message contains bot command prefix → triggers action?
2. Prompt injection (AI bots): "ignore previous instructions and..." → bypasses system prompt?
3. Mention/tag abuse: @bot in rapid succession → flood bot's queue?
4. Media message: send image/file → bot crashes on unexpected content type?
5. Unicode/emoji: special chars in message → encoding crash?

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · references/redblue.md (reported line 248)May include surrounding context.

lation leaks? 5. Error verbosity: invalid request → returns SQL error with table structure? 6. Content-type confusion: request XML when expecting JSON → parser differential?

text

---

## 🤖 Bot Projects

### B-Chain 1: Message Injection

Goal: Make bot execute unintended actions

  1. Command injection: message contains bot command prefix → triggers action?
  2. Prompt injection (AI bots): "ignore previous instructions and..." → bypasses system prompt?
  3. Mention/tag abuse: @bot in rapid succession → flood bot's queue?
  4. Media message: send image/file → bot crashes on unexpected content type?
  5. Unicode/emoji: special chars in message → encoding crash?
  6. Long message: 10000 chars → buffer overflow or timeout?
text

### B-Chain 2: Bot State Abuse

Goal: Corrupt bot's conversation state

  1. Concurrent conversations: bot mixes up context between users?
  2. Session timeout: old session data leaks into new conversation?
  3. Cancel mid-flow: start multi-step command → canc

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README defines activation using broad phrases like 'audit this project for bugs' and 'check bugs/find vulnerabilities/security review,' which can cause the skill to trigger in contexts beyond its intended scope. Over-broad invocation increases the chance that an agent applies powerful audit behavior to unrelated repositories or user requests, potentially causing excessive file access, noisy analysis, or unintended security-focused actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description includes broad activation phrases such as 'audit, review, check bugs, find vulnerabilities, or do security/quality review on a project,' which can cause the skill to trigger on many ordinary requests that merely mention review or bugs. Over-broad triggering increases the chance the skill activates in unintended contexts, potentially causing excessive file access, confusing behavior, or unrequested security-oriented analysis.

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 · SKILL.md (reported line 65)May include surrounding context.

md
For each value, ask:
- Is the server-side cap realistic? (kills cap 200 but max enemies is 50?)
- Can the client send a value the server trusts without verification?
- Float precision issues? (accumulated math → 290402.0000000001)

### Table 5: Data Flows (Critical!)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

These lines prescribe 'Chinese time', 'Beijing midnight', and 'China servers (Asia/Shanghai)' as defaults in general audit guidance. This is a natural-language locale policy issue because it forces a specific regional setting without stating that the module is only for China-specific projects or offering a user/region choice.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

Scanner excerpt · references/modules.md (reported line 234)May include surrounding context.

md
- `package-lock.json` exists and committed? (reproducible builds)
- Dependencies pinned to exact versions or using `^` (allows minor bumps with potential breaking changes)?
- Any dependencies with 0 maintainers or abandoned (no updates in 2+ years)?
- `postinstall` scripts in dependencies: do any run arbitrary code?
- CDN-loaded libraries: integrity hash (`integrity="sha384-..."`) present? Or downloaded to server?
- Are you using `eval()`, `new Function()`, or `child_process.exec()` with user input?
- Node.js version: is it a supported LTS release? (EOL versions have unpatched CVEs)

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · references/modules.md (reported line 250)May include surrounding context.

md
- Admin actions: logged? (config change, user ban, data export)
- API errors (4xx, 5xx): logged with request details?
- Rate limit triggers: logged?
- Logs stored securely? (not world-readable, not in public/ directory)
- Log rotation: configured? (prevent disk exhaustion from log growth)
- Sensitive data NOT in logs: no passwords, tokens, full credit card numbers in log output
- Logs include enough context to reconstruct an incident: who, what, when, from where, result

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file recommends using navigator.sendBeacon to send error messages, URLs, and line numbers to /api/debug-log, then retrieving them remotely via curl. The description does not include any warning that browser/runtime data will be transmitted off-device, which is a privacy-relevant behavior under the markdown-specific missing-warning rule.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The playbook directs auditors to run all attack chains against every project without any safety guardrails, scoping requirements, or warnings about testing only in authorized, non-production environments. In an agent skill context, this can cause the agent to recommend or perform disruptive actions that affect availability, integrity, or privacy during routine audits.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Rate & Resource Abuse section instructs high-volume request floods, connection exhaustion, storage abuse, and CPU abuse tests, but provides no caution about rate-limiting the test itself or using safe environments. In practice, this materially increases the chance that an agent or operator applies denial-of-service techniques against live systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The data-leakage section encourages probing for secrets, debug endpoints, logs, source maps, and exposed Git metadata without warning that these activities may reveal sensitive customer, credential, or infrastructure information. In an agent skill, that omission can normalize unnecessary exposure or over-collection of sensitive data during an audit.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The README gives both Chinese and English invocation/examples and includes Chinese-titled documentation links, but it does not explain the language behavior, supported locales, or whether the user can choose their preferred language. This can create ambiguity around language expectations and may conflict with organizational language/locale policies if the skill defaults implicitly.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.prompt_injection_instructions

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
references/redblue.md:248