一键导入
scan-security
Scan code in a note for security vulnerabilities using OWASP Top 10 analysis — auto-executes, writes structured vulnerability report to note
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scan code in a note for security vulnerabilities using OWASP Top 10 analysis — auto-executes, writes structured vulnerability report to note
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate a sprint retrospective with KPI dashboard and action decision records
Generate a risk register PM block with probability, impact, and mitigation strategies
Generate downloadable Markdown or HTML files (reports, summaries, styled docs)
Conversational skill creator — build, test, and refine skills in chat
Generate a lightweight Architecture Decision Record as a Decision block
Creates a structured note from a homepage chat conversation
| name | scan-security |
| description | Scan code in a note for security vulnerabilities using OWASP Top 10 analysis — auto-executes, writes structured vulnerability report to note |
| approval | auto |
| model | sonnet |
Perform automated security scanning on code blocks in the current note. Checks for OWASP Top 10 vulnerabilities, authentication/authorization gaps, SQL injection, XSS, insecure deserialization, and project-specific security patterns (RLS enforcement, API key exposure).
Use this skill when:
/scan-security)Example:
User: "Scan this authentication endpoint for security issues"
AI scans:
- A01: Broken Access Control — missing workspace_id filter?
- A02: Cryptographic Failures — plain-text tokens, weak hashing?
- A03: SQL Injection — raw string interpolation in queries?
- A07: Authentication Failures — JWT validation gaps?
- Project-specific: RLS context set? API keys from Vault?
Collect Code for Scanning
search_note_content to find related auth/validation code in noteRun OWASP Top 10 Checks
workspace_id filter, role checks, RLS enforcementnone algpickle, eval usageRun Project-Specific Checks
get_workspace_context() called before every DB query?SecureKeyStorage (Vault), not env vars directly in prod code?Classify Vulnerabilities
Write Security Report to Note
write_to_note to append ## Security Scan Report sectionAuto-Execute
status: completed — scan is read-only (DD-003){
"status": "completed",
"skill": "scan-security",
"note_id": "note-uuid",
"summary": "Security scan complete: 1 CRITICAL, 2 HIGH, 1 MEDIUM, 3 LOW",
"findings": {
"critical": 1,
"high": 2,
"medium": 1,
"low": 3
},
"risk_score": "HIGH",
"owasp_categories_triggered": ["A01", "A03", "A07"]
}
Input: Repository method using string formatting in SQL
Output: Appends to note:
## Security Scan Report
**Risk Score**: CRITICAL | **OWASP Categories**: A03 (Injection)
### [CRITICAL] SQL Injection — A03
**Location**: `repositories/user_repository.py:45`
**Issue**: Raw string interpolation in SQL query.
\`\`\`python
# VULNERABLE
query = f"SELECT * FROM users WHERE email = '{email}'"
\`\`\`
**PoC**: `email = "' OR '1'='1"` → returns all users
**Remediation**: Use SQLAlchemy parameterized queries:
\`\`\`python
# SAFE
result = await session.execute(
select(UserModel).where(UserModel.email == email)
)
\`\`\`
### [HIGH] Missing workspace_id filter — A01 Broken Access Control
**Location**: `repositories/user_repository.py:52`
**Issue**: `list_all()` returns rows from all workspaces. RLS at DB level prevents exposure, but application-layer defense-in-depth is required.
**Remediation**: Filter explicitly: `.where(UserModel.workspace_id == workspace_id)`
Input: Auth middleware with JWT decode
Output: Flags missing algorithms=["HS256"] parameter — allows none algorithm bypass.
search_note_content: Find code blocks and auth-related patterns in the notewrite_to_note: Append security scan report to the note (read-only, no code changes)/scan-security commandwrite_to_note is append-only to report sectiondocs/architect/rls-patterns.md