src/skills/security-scanner/SKILL.md
Language-agnostic security scanner covering dependencies (SCA), code patterns (SAST), and application-layer vulnerabilities (XSS, CSRF, SQLi, Prompt Injection, etc.), with concrete vulnerable and secure code examples.
npx skillsauth add ngmthaq/my-copilot security-scannerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provide a reproducible, language-agnostic workflow to:
{
"dependencies": {
"lodash": "4.17.15"
}
}
{
"dependencies": {
"lodash": "^4.17.21"
}
}
eval(userInput);
// Avoid eval entirely
const parsed = JSON.parse(userInput);
API_KEY = "sk-123456"
API_KEY = os.getenv("API_KEY")
❌ Vulnerable
const query = "SELECT * FROM users WHERE id = " + userId;
✅ Safe
db.query("SELECT * FROM users WHERE id = ?", [userId]);
❌ Vulnerable
<div dangerouslySetInnerHTML={{ __html: userInput }} />
✅ Safe
<div>{userInput}</div>
❌ Vulnerable
POST /transfer
(no CSRF token)
✅ Safe
POST /transfer
X-CSRF-Token: <token>
❌ Vulnerable
os.system("rm -rf " + userInput)
✅ Safe
subprocess.run(["rm", "-rf", safe_path])
❌ Vulnerable
app.get("/admin", (req, res) => {
res.send("admin data");
});
✅ Safe
app.get("/admin", authMiddleware("admin"), handler);
User.create(req.body);
User.create({
name: req.body.name,
email: req.body.email,
});
app.post("/user", (req) => save(req.body));
validate(schema, req.body);
❌ Vulnerable
const prompt = "System: You are safe\nUser: " + userInput;
✅ Safe
const prompt = [
{ role: "system", content: "You are safe" },
{ role: "user", content: sanitize(userInput) },
];
❌ Vulnerable
agent.run(userInput); // directly executes tools
✅ Safe
if (isAllowedTool(action)) {
execute(action);
}
❌ Vulnerable
return llm("Summarize: " + secretData);
✅ Safe
return llm("Summarize: " + redact(secretData));
Detect:
npm audit --json
pip-audit --format=json
dotnet list package --vulnerable
govulncheck ./...
semgrep --config=auto .
input → processing → sink
❌ Vulnerable flow
req.query.q → string concat → SQL query
✅ Safe flow
req.query.q → validation → parameterized query
| Severity | Criteria | | -------- | --------------------------- | | CRITICAL | Remote exploit, high impact | | HIGH | Realistic attack vector | | MEDIUM | Limited scope | | LOW | Best practice issue |
npm audit fix
[SEC-001] - SQL Injection
Severity: HIGH
Location: userService.js:42
Description: Unsanitized input used in SQL query
Impact: Data exfiltration
Fix: Use parameterized queries
{
"type": "vulnerability",
"category": "SQL Injection",
"severity": "HIGH",
"location": "userService.js:42",
"fix": "Use parameterized queries"
}
Top Issues:
documentation
Guidelines and protocols for Technical Leaders to manage and oversee technical projects effectively while adhering to the core mandate of being the central orchestration layer for all engineering work.
data-ai
Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance.
development
SOLID — Enforces the SOLID principle of object-oriented design (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) for maintainable and scalable code.
development
Separation of Concerns (SoC) — Enforces the Separation of Concerns principle by ensuring each module, layer, and component addresses exactly one well-defined concern. Use when writing, reviewing, or refactoring code that mixes UI with business logic, business logic with data access, presentation with formatting, or cross-cutting concerns (auth, logging, validation) with core logic.