codescan-review
Use when reviewing source code for security issues and CodeScan MCP tools or CLI are available, especially for pre-merge diff review, repository intake, suspicious auth or input-handling code, or when a user explicitly asks for a CodeScan-based security scan.
适合你,如果你需要在代码合并前自动扫描安全漏洞
npx oh-my-skill add hejiguang/codescan/codescan-reviewcurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- hejiguang/codescan/codescan-reviewnpx oh-my-skill verify hejiguang/codescan/codescan-review怎么用
商店整理自技能原文 · 版本 13f71b1 · 表述以原文为准装上后,Claude 会变成安全代码审查员。它会用 CodeScan 工具扫描代码,找出安全漏洞(如认证、输入验证、SQL 注入等问题),并按严重程度列出结果,给出修复建议。
当用户要求进行安全审查、漏洞扫描、合并前差异审查,或代码涉及认证、密钥、输入验证等敏感逻辑时触发。
技能原文 SKILL.md
CodeScan Review
Overview
Use CodeScan as a focused security reviewer. Prefer MCP tools when they are available. Fall back to the CLI only when MCP is unavailable.
Prioritize exploitable findings over style issues or generic code smell commentary.
When To Use
- The user asks for a security review or vulnerability scan
- The user wants a pre-merge or branch-diff review
- The code under review handles auth, secrets, input validation, file access, command execution, SQL, HTML rendering, network callbacks, or crypto
- The user wants CodeScan specifically, not just a generic security opinion
Do not use this skill for general refactoring, style cleanup, or performance review unless the user explicitly widens scope.
Tool Selection
- Use
scan_filefor a focused review of one file - Use
scan_directoryfor repository or module sweeps - Use
scan_git_difffor active-branch or pre-merge review - Use
scan_github_repowhen the target repo is only available as a Git URL
Prefer the smallest scope that answers the user's request.
Workflow
- Pick the narrowest scan that matches the request.
- Run CodeScan through MCP first.
- Read the structured findings and separate strong signals from weaker suspicions.
- Manually inspect any
criticalorhighfinding before presenting it as real. - Respond with findings first:
- severity
- file path and line
- why it is risky
- concrete remediation
- If no credible finding remains, say that explicitly and mention any residual blind spots.
Fallback
If MCP tools are unavailable but codescan is installed locally, use the CLI:
python -m codescan file <path> python -m codescan dir <path> python -m codescan git-merge <base-branch>
If downstream parsing matters, prefer JSON output instead of HTML.
Output Standard
- List findings before summaries
- Order by severity
- Use file and line references whenever possible
- Distinguish confirmed issues from lower-confidence suspicions
- Keep remediation concrete and code-facing
- Mention scan scope limits if the scan was partial
Notes
- CodeScan is strongest when used as a security triage tool, not as the sole source of truth
- For active code review,
scan_git_diffis usually the highest-value default - For one suspicious file,
scan_fileis usually better than a full repository sweep