Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

code-security

Skill by semgrep

Provides secure coding guidelines for AI assistants, covering 15+ languages, OWASP Top 10 issues and infrastructure configuration. It is for developers writing or reviewing code that handles input, auth, files, queries or network requests.

  • Score 80
  • 352 stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install code-security

Built from the published package, never by AI.

git clone --depth 1 https://github.com/semgrep/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/code-security ~/.claude/skills/code-security

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install code-security in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The code-security skill from Semgrep gives an AI assistant secure coding guidelines. It covers more than 15 languages, the OWASP Top 10, and infrastructure configuration such as Terraform, Kubernetes, Docker and GitHub Actions. The guidance is organized into 28 rule categories, grouped by impact from Critical to Low. A rules directory holds a file for each category with vulnerable and secure code examples, and an index lists CWE and OWASP references.

The skill works in two modes. In proactive mode, the assistant checks code it writes or reviews for relevant vulnerabilities without being asked. In reactive mode, it finds the matching rule file when a user asks about security. A language table lists the priority rules to check first for each language. The skill is aimed at developers who want their code reviewed for security, including requests such as review my code or is this safe.

Written from the project's SKILL.md and checked against it.

What it can do

  • Proactive security checksChecks code being written or reviewed for relevant vulnerabilities based on language and patterns.
  • Reactive rule lookupFinds the matching rule file when a user asks about a specific security topic.
  • Language priority rulesLists the rules to check first for Python, JavaScript, Java, Go, C/C++, Ruby, PHP and HCL/YAML.
  • Infrastructure rulesCovers Terraform for AWS, Azure and GCP, Kubernetes, Docker and GitHub Actions configuration.
  • Vulnerability rule filesProvides rule files with vulnerable and secure code examples for injection, XSS, SSRF and more.
  • CWE and OWASP indexMaps rule categories to CWE and OWASP references in a separate index file.

Try asking

  • Check this Python function for SQL injection.
  • Review this Terraform file for public access and encryption issues.
  • Review my GitHub Actions workflow for script injection risks.

Good to know

  • The source describes written guidelines and does not mention automated scanning.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/code-security/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • AGENTS.md113 KB
  • README.md3 KB
  • SKILL.md5 KB
  • metadata.json199 B
  • rules/_sections.md7 KB
Show all 34 files
  • rules/_template.md635 B
  • rules/authentication-jwt.md3 KB
  • rules/best-practice.md3 KB
  • rules/code-injection.md5 KB
  • rules/command-injection.md3 KB
  • rules/correctness.md4 KB
  • rules/csrf.md5 KB
  • rules/docker.md3 KB
  • rules/github-actions.md5 KB
  • rules/insecure-crypto.md4 KB
  • rules/insecure-deserialization.md7 KB
  • rules/insecure-transport.md7 KB
  • rules/kubernetes.md4 KB
  • rules/maintainability.md2 KB
  • rules/memory-safety.md3 KB
  • rules/path-traversal.md6 KB
  • rules/performance.md3 KB
  • rules/prototype-pollution.md3 KB
  • rules/race-condition.md7 KB
  • rules/regex-dos.md4 KB
  • rules/secrets.md4 KB
  • rules/sql-injection.md5 KB
  • rules/ssrf.md5 KB
  • rules/terraform-aws.md5 KB
  • rules/terraform-azure.md10 KB

And 4 more files on GitHub.

Alternatives to code-security

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

code-security: common questions

Which languages does code-security cover?

The source says it covers secure coding across 15+ languages. It lists priority rules for Python, JavaScript/TypeScript, Java, Go, C/C++, Ruby, PHP and HCL/YAML.

Does code-security cover the OWASP Top 10?

Yes, the source states that it covers the OWASP Top 10 along with infrastructure security and coding best practices. Its rules index includes CWE and OWASP references.

Does it cover infrastructure as code?

Yes, the source includes rules for Terraform on AWS, Azure and GCP, Kubernetes, Docker and GitHub Actions.

How do I install code-security?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is code-security free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is code-security safe to use?

It scores 80 of 100. Grades: maintenance A, licence F, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to code-security?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

code-security Install

Add to stack

Loading.