跳到正文
cccskills
免费在 GitHub 公开

audit-security

Scan the codebase for security vulnerabilities. Check OWASP top 10, input validation, auth, crypto, and known BACKLOG security items.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md4.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Security Audit

Scan the codebase for security vulnerabilities and verify that known issues from docs/ai/BACKLOG.md (Security section) are tracked.

Scope

1. Input Validation & Injection

  • JSON Patch / prototype pollution — verify __proto__, constructor, prototype are blocked in all code paths that apply external data to objects
  • XSS — check for innerHTML, {@html}, document.write, eval usage; verify user-supplied strings are escaped
  • Command injection — check for shell exec, dynamic import(), Function() with user input
  • localStorage / IndexedDB — verify validateSongData() / validateRecoverySnapshot() are called before casting raw JSON to Song

2. Authentication & Authorization

  • multiDevice signaling — room code entropy, rate limiting on connection attempts, room TTL
  • WebRTC data channel — message validation, param whitelist, bounds checking on guest inputs
  • No secrets in client code — scan for API keys, tokens, credentials in source files

3. Cryptographic Safety

  • Room code generation — must use crypto.getRandomValues(), not Math.random()
  • Sufficient entropy — room codes, IDs, nonces should have adequate bit strength

4. Network & Transport

  • CORS / CSP — check for overly permissive headers
  • WebSocket origin validation — signaling server should validate origin
  • Data channel message size — verify chunking limits prevent memory exhaustion (MAX_CHUNKS, memory budget)

5. Resource Exhaustion

  • Rate limiting — verify post-connection message rate limits exist
  • Memory budgets — chunk reassembly budget, undo stack cap, sample pool limits
  • CPU abuse — AudioWorklet cannot be starved by malicious patterns (step count limits, track count limits)

6. Known Issues Tracking

  • Read docs/ai/BACKLOG.md Security section — verify all known vulnerabilities are listed
  • Cross-reference with tests — check security.test.ts covers each known issue
  • Identify gaps — find vulnerabilities NOT yet listed in BACKLOG

Process

  1. Read BACKLOG.md Security section for known issues.
  2. Scan source files using Grep/Glob for vulnerability patterns.
  3. Read security-critical modules in detail:
    • src/lib/multiDevice/ — all files
    • src/lib/validate.ts — data validation
    • src/lib/storage.ts — persistence layer
    • src/lib/audio/engine.ts — worklet bridge
    • workers/signaling/ — signaling server (if present)
  4. Cross-reference with tests in src/lib/multiDevice/security.test.ts.
  5. Output a report:
## Security Audit Report

### Category: [Input Validation / Auth / Crypto / Network / Resources]

#### [Vulnerability name]
- **Severity**: Critical / High / Medium / Low / Info
- **Location**: file:line
- **Description**: what's wrong
- **Status**: Known (in BACKLOG) / New finding / Tested (in security.test.ts)
- **Recommendation**: fix approach

### Summary
- X critical, Y high, Z medium findings
- N known issues tracked in BACKLOG
- M gaps in test coverage

Severity Levels

  • Critical: Remote exploitation without auth, data loss, arbitrary code execution
  • High: Auth bypass, session hijack, significant data exposure
  • Medium: Requires specific conditions, limited blast radius (e.g., room code brute-force)
  • Low: Defense-in-depth improvement, unlikely exploitation path
  • Info: Best practice suggestion, no direct vulnerability

Rules

  • This is a read-only operation — do not modify any files
  • Use parallel Agent tools for different scan categories
  • Report ONLY confirmed issues with specific file/line references
  • Do not report theoretical vulnerabilities without evidence in the code
  • Check the BACKLOG Security section — don't re-report known issues unless their description is incomplete

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

adr

免费

Create a new Architecture Decision Record (ADR) for a proposed feature or design change.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

adr-done

免费

Mark an ADR as Implemented (or Superseded) and archive it, following INDEX.md conventions.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

Check docs/ai/ spec files and ADRs for inconsistencies with the actual codebase. Report only, no modifications.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

refactor

免费

Scan the project for refactoring opportunities, then fix them. No behavior/visual changes.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

sync-docs

免费

Check docs/ai/ spec files and ADRs for inconsistencies with the codebase, then fix all discrepancies.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

查看 im9 的全部技能

报告此技能的问题