code-sec

Audits a project for leaked secrets, vulnerable dependencies, and injection flaws, routing findings into tagged TODOs.

3|Updated Oct 28, 2020
One-click install
npx skills add https://github.com/k0d3x8its/dotfiles --skill code-sec-k0d3x8its
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-sec
Source: https://github.com/k0d3x8its/dotfiles/tree/main/claude/.claude/skills/code-sec
Command: npx skills add https://github.com/k0d3x8its/dotfiles --skill code-sec-k0d3x8its

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gitleaks, ast-grep, ripgrep, git-crypt, and includes scripts (resource) and references (resource) components.

What problem does it solve? Security issues like leaked secrets in git history, vulnerable dependencies, and injection-prone code often go unnoticed until exploited. This Skill runs a structured, read-only security sweep across an entire repository and turns every finding into a tagged, actionable TODO item instead of silent fixes. ## Core Features & Use Cases - Secret & Dependency Scanning: Runs gitleaks over full git history and the working tree, plus auto-detected dependency audits for npm, pip, cargo, and go stacks. - Injection & App-Layer Analysis: Uses a tiered ast-grep rule pack (precise/normal/noisy) and ripgrep patterns to detect SQLi, command injection, SSRF, path traversal, deserialization, IDOR, and auth-bypass patterns, with taint-tracing from entry point to sink. - Encryption Coverage Check: Verifies git-crypt coverage of sensitive taxonomy files (KNOWLEDGE.md, TODOS.md, .work/ plans) against .gitattributes rules. - Use Case: Before pushing a repo public, run the sweep to catch a secret committed three months ago, an outdated npm package with a known CVE, and an unparameterized SQL query — each filed as a severity-tagged [SECURITY] TODO with a mini threat model. ## Quick Start Ask the AI to run a security sweep on this project and file the findings as tagged TODOs.

Frequently Asked Questions about code-sec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a git repository for leaked secrets?▼

Run gitleaks over the full git history and working tree with the --redact flag so discovered secrets are never printed. Findings are reported by file, rule ID, and commit, and secrets found in history are flagged for rotation and possible purge.

How to audit project dependencies for vulnerabilities automatically?▼

The sweep auto-detects the stack from marker files: npm audit for package.json, pip-audit or osv-scanner for Python, cargo audit for Cargo.toml, and govulncheck for go.mod. It reports the vulnerable package, advisory ID, and fixed version without auto-upgrading.

What tools detect SQL injection and SSRF in Python and JavaScript code?▼

ast-grep with a tiered rule pack detects SQLi, command injection, SSRF, path traversal, and deserialization patterns in Python and JavaScript. Precise-tier hits are near-conclusive, while noisy-tier candidates require taint-tracing from entry point to sink before being filed.

Does the security sweep modify or fix my code?▼

No, the sweep is strictly read-only. It never fixes, rotates, or deletes anything during the audit; every finding becomes a tagged [SECURITY] item in TODOS.md, and remediation is handled as a separate task with user confirmation.

Why does ripgrep hang when run without a path argument?▼

Without a trailing path, ripgrep reads from STDIN in non-interactive shells like agent Bash or CI and hangs until timeout. Always append an explicit path such as '.' to every rg command.

When should I use a diff-level security review instead of a full sweep?▼

Use a full project sweep for broad audits of secrets, dependencies, and code patterns. For reviewing a specific diff or pull request, a focused security-reviewer skill is more appropriate, and plan-level review belongs to a security-lens reviewer.