Skip to content
TrustedSkillsbeta
Back to all skills

Code Security

Official
semgrep·vlatest·security

Identifies and remediates common code vulnerabilities using Semgrep's extensive rule set for secure coding practices.

Install on your platform

Showing Claude Code. One command installs this skill into any of the agents below.

  1. 1

    Run this in your project

    terminal
    $ npx skills add semgrep/skills --skill code-security -a claude-code
  2. Uses the open-source skills CLI and needs Node.js. Add -g to install it for your user instead of this project.

What we know about this skill

Publisher

semgrep

Matched to the vendor's own GitHub organisation.

Install target

Live repository

Not pinned. Installing fetches whatever the repository holds at the time you run the command.

No human has reviewed this code. The checks below are a static scan of the files at one commit — nobody has run this skill or judged whether it works. A skill runs with whatever access you give your agent, so read the source before you install it.

Automated safety checks

scanned

This skill failed 1 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.

  • No undeclared network calls: failed

    Contacts 2 hosts that are neither well-known infrastructure nor declared in the skill's frontmatter: apache.org, openjdk.java.net.

    Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.

    Hosts contacted

    apache.orgundeclaredapi.github.comsource hostnodejs.orgdocumentationopenjdk.java.netundeclared

    What it found (3 of 4)

    • skills/code-security/AGENTS.md:615contacts apache.org
      dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
    • skills/code-security/rules/xxe.md:33contacts apache.org
      dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
    • skills/code-security/AGENTS.md:1846contacts openjdk.java.net
      .uri(URI.create("http://openjdk.java.net/"))
  • Declares what it does: passed

    SKILL.md parses and declares a name and a description.

    SKILL.md exists, its frontmatter parses, and it declares a name and a description.

  • No obfuscated payloads: passed

    No encoded or obfuscated payloads.

    No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.

  • No credential access: passed

    Reads no keys, tokens, keychains or credential files.

    Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.

  • No pipe-to-shell installers: passed

    No pipe-to-shell or download-and-run installers.

    No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.

  • Pinned to a commit: passed

    Scanned semgrep/skills at 68177b8830.

    The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.

Scanned
34 files, 9,186 lines
This is a static scan, not a review. It reads the skill's files; it does not run them, and it cannot tell you whether the skill is any good or whether the code does what its description says. A skill runs with whatever access you give your agent.
What each check looks for →

About this skill

What it does

This skill enables an AI agent to identify and remediate common code vulnerabilities using Semgrep's extensive rule set for secure coding practices. It supports proactive vulnerability checking during code writing or review, as well as reactive security analysis when specifically requested by the user. The tool covers a wide range of vulnerabilities including those found in the OWASP Top 10, infrastructure security concerns, and general coding best practices across more than 15 programming languages.

When to use it

  • When reviewing code for potential security flaws before deployment.
  • During the development process to proactively identify and fix vulnerabilities as they are introduced.
  • To understand secure coding patterns and best practices in a specific programming language.
  • When investigating a reported security concern within a codebase.
  • For automated checks of infrastructure-as-code configurations (e.g., Terraform, Kubernetes).

Key capabilities

  • Proactive vulnerability scanning: Automatically checks code for vulnerabilities based on the detected language and patterns.
  • Reactive security analysis: Provides detailed rule files with vulnerable/secure code examples when a user requests information about specific security concerns.
  • Language support: Covers over 15 programming languages including Python, JavaScript/TypeScript, Java, Go, C/C++, Ruby, PHP, and HCL/YAML.
  • Categorized rules: Organizes vulnerabilities into categories like SQL Injection, Command Injection, XSS, XXE, and more.
  • Priority rule guidance: Provides a list of priority rules to check for specific languages (e.g., SQL injection in Python).

Example prompts

  • "Can you review this Python code for potential SQL injection vulnerabilities?"
  • "What are the best practices for preventing XSS attacks in JavaScript?"
  • "Show me examples of secure coding patterns for handling user input in Java."
  • "Check my Terraform configuration for security issues related to AWS resources."

Tips & gotchas

  • To effectively use this skill, first identify the programming language and the code's functionality (e.g., database interaction, file reading).
  • Prioritize checking "Critical" and "High" impact rules first.
  • Refer to the specific rule files within the rules/ directory for detailed examples and guidance.