feat: add security-review skill for AI-powered codebase vulnerability scanning#1209
feat: add security-review skill for AI-powered codebase vulnerability scanning#1209Mrigank005 wants to merge 1 commit intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new security-review skill under skills/ to guide AI-assisted, codebase-wide security auditing (dependencies, secrets, vuln categories, data-flow analysis) with bundled reference material and a standardized report template.
Changes:
- Introduces
skills/security-review/SKILL.mddefining an 8-step security review workflow and output rules. - Adds bundled reference docs for language-specific patterns, secret patterns, vulnerability categories, a vulnerable package watchlist, and a report format template.
- Registers the new skill in
docs/README.skills.mdso it appears in generated skill documentation.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/security-review/SKILL.md | Defines the skill’s workflow, severity guide, and how to use the bundled references. |
| skills/security-review/references/language-patterns.md | Adds language/framework-specific “things to flag” patterns. |
| skills/security-review/references/report-format.md | Provides a templated output format for /security-review reports. |
| skills/security-review/references/secret-patterns.md | Provides regex/heuristic guidance for credential and secret detection. |
| skills/security-review/references/vuln-categories.md | Provides detailed vulnerability category guidance and examples. |
| skills/security-review/references/vulnerable-packages.md | Provides a curated dependency watchlist and red-flag heuristics. |
| docs/README.skills.md | Adds the security-review entry to the skills index. |
| ```js | ||
| // Line 47 | ||
| const query = `SELECT * FROM users WHERE id = ${req.params.id}`; | ||
| db.execute(query); | ||
| ``` | ||
|
|
||
| AFTER (fixed): | ||
| ```js | ||
| // Line 47 — Fixed: Use parameterized query to prevent SQL injection | ||
| const query = 'SELECT * FROM users WHERE id = ?'; | ||
| db.execute(query, [req.params.id]); | ||
| ``` |
There was a problem hiding this comment.
In this “Patch Proposals” example, a fenced code block is opened earlier (line 130) and then another triple-backtick fence is started here for the JS snippet. Nested triple-backtick fences will break Markdown rendering (the inner fence will terminate the outer block). Consider using a different fence length for the outer block (e.g., quadruple backticks) or representing the inner snippets via indentation / alternative delimiters.
| ```js | |
| // Line 47 | |
| const query = `SELECT * FROM users WHERE id = ${req.params.id}`; | |
| db.execute(query); | |
| ``` | |
| AFTER (fixed): | |
| ```js | |
| // Line 47 — Fixed: Use parameterized query to prevent SQL injection | |
| const query = 'SELECT * FROM users WHERE id = ?'; | |
| db.execute(query, [req.params.id]); | |
| ``` | |
| ````js | |
| // Line 47 | |
| const query = `SELECT * FROM users WHERE id = ${req.params.id}`; | |
| db.execute(query); |
AFTER (fixed):
// Line 47 — Fixed: Use parameterized query to prevent SQL injection
const query = 'SELECT * FROM users WHERE id = ?';
db.execute(query, [req.params.id]);| 1. Address all CRITICAL findings immediately | ||
| 2. Schedule HIGH findings for current sprint | ||
| 3. Add MEDIUM/LOW to your security backlog | ||
| 4. Set up automated re-scanning in CI/CD (see ide-setup.md) |
There was a problem hiding this comment.
This footer references ide-setup.md, but that file doesn’t exist under skills/security-review/ in this PR. Either add the referenced file or update the text to point to an existing doc so readers aren’t sent to a dead link.
| 4. Set up automated re-scanning in CI/CD (see ide-setup.md) | |
| 4. Set up automated re-scanning in CI/CD (see SKILL.md for setup details) |
| | express | < 4.19.2 | Open redirect | >= 4.19.2 | | ||
| | multer | < 1.4.4 | DoS | >= 1.4.4-lts.1 | | ||
| | xml2js | < 0.5.0 | Prototype pollution | >= 0.5.0 | | ||
| | fast-xml-parser | < 4.2.4 | ReDos | >= 4.2.4 | |
There was a problem hiding this comment.
Typo/inconsistent capitalization: “ReDos” should be “ReDoS” (regular expression denial of service).
| | fast-xml-parser | < 4.2.4 | ReDos | >= 4.2.4 | | |
| | fast-xml-parser | < 4.2.4 | ReDoS | >= 4.2.4 | |
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.stagedbranch for this pull request.Description
Adds a new security-review skill that performs comprehensive AI-powered security analysis of codebases. Unlike traditional SAST tools that rely on pattern matching, this skill reasons about code the way a human security researcher would — tracing how user-controlled input moves across files, understanding how components interact, and self-verifying each finding to filter false positives before surfacing them.
How it works:
The skill follows a structured 8-step workflow that mirrors how a professional security audit is conducted:
What it covers:
Language support: JavaScript, TypeScript, Python, Java, PHP, Go, Ruby, Rust — with framework-specific patterns for Express, Django, Flask, FastAPI, Spring Boot, Rails, and more.
Bundled reference files (
references/— 5 files, ~988 lines total):vuln-categories.md— Deep detection guidance for every vulnerability type with vulnerable vs. safe code examplessecret-patterns.md— Regex patterns and entropy heuristics for 15+ credential providerslanguage-patterns.md— Framework-specific dangerous patterns per languagevulnerable-packages.md— CVE watchlist with affected version ranges and safe upgrade targetsreport-format.md— Structured output template with severity ratings and patch proposal formatType of Contribution
Additional Notes
This skill includes 5 reference files in
references/totaling ~988 lines of security detection guidance. All files are well under the 5MB asset limit. The skill has been validated withnpm run skill:validateand the README has been regenerated withnpm start.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.