بنقرة واحدة
scan-security
Detects security vulnerabilities via static pattern matching based on OWASP Top 10
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Detects security vulnerabilities via static pattern matching based on OWASP Top 10
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Plan-then-execute sprint orchestrator. Works like a real delivery team: split work into sprints (~1 human-week each), plan them all up front WITH the user, then autonomously run each sprint through a full cycle (research→plan→design→do→QA→fix→deploy) to completion. Multiple sprints can run at once (concurrent dispatch). The leader (main session) dynamically scaffolds project-local agents for whatever domain — not dev-only (marketing, research, ops, data all fit). bkit-aware: borrows bkit agents/skills internally when present, runs fully standalone otherwise. Not for single-file edits, one-shot bug fixes, or work under ~a few hours.
Invoke for "/cowork-insights" command or when the user asks to summarize, review, or report on past Claude Code sessions. Analyzes sessions to show key prompts (verbatim), structured assessments (goal/outcome/friction), tool usage patterns, and actionable insights. Produces HTML report + shareable Markdown for Jira/Notion/Slack. Three report formats — full (deep narrative), standard (core insights), minimal (quick team share). Supports --from/--to with absolute (2026-03-01) or relative (7d, 2w, 1m) dates. Trigger on phrases like weekly status update, sprint recap, what did I do with Claude, AI usage patterns, session history, minimal recap, what I worked on today, share with team, cowork-insights. DO NOT invoke for active tasks (debugging, refactoring, code review, project setup) or for commit-time recaps (use cowork-commit instead).
Trigger whenever the user asks to commit AND wants the commit message enriched with AI collaboration history. Creates a lightweight commit message (key decision highlights + link) and a full directive-log file with conversation transcript + recap. The key signal is the combination of (1) making a commit with (2) capturing how AI contributed. Trigger on phrases like commit with AI recap, attach collaboration history to commit, record AI work in commit, cowork-commit. DO NOT trigger for plain commits without AI documentation, standalone time-period recaps (use cowork-insights instead), PR reviews, or general git operations.
One-time bootstrap of an existing project's docs/ and source into the cowork-doc-sync taxonomy structure. After a detailed gap analysis, relocate docs to match the standard. Phase 1 = relocation only (no new creation, includes moving content between docs), Phase 2 = analyze source to create new docs (only after user approval). For ongoing maintenance use /cowork-doc-sync. Triggers: cowork-doc-init, /cowork-doc-init, init doc structure, relocate docs, organize existing docs, doc init, doc bootstrap
Ongoing doc-sync skill that aligns a project's docs/ with the current code/decision state. Call once at the very end, after implementation/refactoring is complete. Enforces a numbered taxonomy (00-reference~99-misc) + status model (LIVING/ACTIVE/FROZEN) + migration rules. To fit an existing project into this structure for the first time, use /cowork-doc-init. Triggers: cowork-doc-sync, /cowork-doc-sync, sync docs, align docs, organize docs, doc sync, doc alignment
Compare DevMD files against actual source code. Measures coverage, accuracy, and consistency with deterministic counting and evidence-backed findings.
استنادا إلى تصنيف SOC المهني
| name | scan-security |
| description | Detects security vulnerabilities via static pattern matching based on OWASP Top 10 |
| triggers | ["scan security","security scan","check security"] |
| user-invocable | true |
| allowed-tools | ["Read","Write","Glob","Grep","Bash"] |
Corresponding rule: security.md
Detect security vulnerabilities in code via static pattern matching based on OWASP Top 10. Does not auto-fix; reports only suspected items.
Resolve target directories in this order:
**/*.{ts,tsx,js,jsx,py,java,go,rs}) -- use the top-level directory containing matched filesDefault exclusions: node_modules/, .git/, dist/, build/, coverage/
Skill-specific exclusions: *.test.*, *.spec.*, test_*, *_test.* (security test code excluded)
Output the following before proceeding with validation. Do not advance until resolution is complete.
| Step | Result |
|---|---|
| CLAUDE.md check | Found/Not found |
| Resolved directories | {list or "none"} |
| Source file count | {count} |
| Resolution method | CLAUDE.md / Glob fallback / SHALLOW |
Detect passwords, API keys, and tokens embedded directly in code.
Search patterns:
API_KEY\s*=\s*["']password\s*=\s*["']secret\s*=\s*["']token\s*=\s*["']PRIVATE_KEY\s*=\s*["']aws_access_key_id\s*=\s*["']aws_secret_access_key\s*=\s*["']Severity: CRITICAL
Detect patterns that build SQL queries via string interpolation.
Search patterns:
f"SELECTf"INSERTf"UPDATEf"DELETEf"DROP`SELECT.*\$\{` (SQL in template literals)"SELECT.*" \+ (SQL via string concatenation)Severity: CRITICAL
Detect patterns that inject user input into HTML without escaping.
Search patterns:
innerHTML\s*=dangerouslySetInnerHTMLv-html=\{!!.*!!\} (Blade unescaped output)\|safe (Django/Jinja safe filter)Severity: HIGH
Detect patterns that pass external input directly to shell commands.
Search patterns:
os.system(f"subprocess.*shell=Trueexec( (dynamic code execution)eval( (dynamic code execution)child_process.exec(`.* (Node.js)Severity: CRITICAL
Detect patterns that include internal system information in user responses.
Search patterns:
traceback.format_exc() -- near return/responsestr(e) -- included directly in the response objectstack.*trace -- included in the responseexc_info=True -- inside a user-response functionSeverity: MEDIUM
Verify that secret files are included in .gitignore.
Required patterns (must exist in .gitignore):
.env related: .env, .env.*, .env.localcredentials, credentials.**.pem, *.key, *.p12, *.pfxsecrets/, .secrets/Severity: HIGH when missing
Glob to collect target source files (excluding test files)Grep each category's patterns across all source filesRead the .gitignore file and check for required patternsOutput the matrix below before generating the final report. Do not proceed until every category has been scanned.
| Category | Status | Items Checked | Findings | Severity | Evidence |
|---|---|---|---|---|---|
| Hardcoded Secrets | ? | ? | ? | CRITICAL | {tool, files, pattern} |
| SQL Injection | ? | ? | ? | CRITICAL | {tool, files, pattern} |
| XSS | ? | ? | ? | HIGH | {tool, files, pattern} |
| Command Injection | ? | ? | ? | CRITICAL | {tool, files, pattern} |
| Error Information Exposure | ? | ? | ? | MEDIUM | {tool, files, pattern} |
| .gitignore | ? | ? | ? | HIGH | {tool, files, pattern} |
Status values: PASS (verification complete, no issues), NOT_APPLICABLE (no source files), SKIPPED (plugin issue), SHALLOW (target resolution failed)
Check every item before writing the report. If any item is unchecked, go back and complete it.
Before writing to .ww-w-ai/devtools/scan-security/, verify the JSON output:
Generate the scan report in the user's conversation language.
Output detection results as a Markdown table in this format:
===== Security Scan Report =====
| File:Line | Type | Severity | Pattern |
|-----------|------|----------|---------|
| `src/config/db.ts:15` | Hardcoded Secret | CRITICAL | `password = "admin123"` |
| `src/api/users.ts:42` | SQL Injection | CRITICAL | `f"SELECT * FROM users WHERE id = {id}"` |
| `src/components/Post.tsx:18` | XSS | HIGH | `dangerouslySetInnerHTML` |
| `.gitignore` | Unprotected Secret | HIGH | `.env` pattern missing |
| `src/handlers/error.ts:30` | Error Information Exposure | MEDIUM | `str(e)` returned directly |
Total suspected items: {N}
CRITICAL: {C}
HIGH: {H}
MEDIUM: {M}
==============================
When there are no suspected items:
===== Security Scan Report =====
No suspected items.
==============================
After generating the security scan report, save results to .ww-w-ai/devtools/scan-security/:
.ww-w-ai/devtools/scan-security/ if missinglatest.json -- structured result following templates/schema.jsonlatest.md -- human-readable report following templates/report.template.mdhistory/ -- copy latest.json to .ww-w-ai/devtools/scan-security/history/{timestamp}.jsonlatest.md is generated in the user's conversation language. JSON field names stay in English regardless of language.
The JSON output enables machine-parseable history tracking and cross-run comparison.
The history/ directory preserves previous executions for trend analysis.
mkdir -p .ww-w-ai/devtools/scan-security/history). The scan itself is read-only and does not modify project files.os.environ["API_KEY"]) are not hardcoding and are excluded from detection.SECURITY prefix comment) is treated as intentionally vulnerable per security.md exceptions.For detailed validation criteria, evidence tables, and examples:
../../docs/specs/security.md