semgrep

Scan source code for security vulnerabilities and coding standard violations.

706|30|Updated Mar 13, 2023
One-click install
npx skills add https://github.com/wimpysworld/nix-config --skill semgrep-wimpysworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semgrep
Source: https://github.com/wimpysworld/nix-config/tree/main/home-manager/_mixins/development/assistants/skills/semgrep
Command: npx skills add https://github.com/wimpysworld/nix-config --skill semgrep-wimpysworld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Semgrep provides fast, pattern-based static analysis to identify security vulnerabilities and enforce coding standards across multiple languages, enabling teams to find and fix issues earlier in the development lifecycle.

Core Features & Use Cases

  • Pattern-based scanning across 30+ languages with built-in rule sets
  • Create, test, and deploy custom Semgrep rules to enforce internal security and quality policies
  • Support for taint-mode and pattern-matching rules to detect injections, data leaks, and other common vulnerabilities
  • Seamless CI/CD integration and actionable findings

Quick Start

Run semgrep --test --config rule.yaml on your repository to validate your rule definitions and start scanning.

Frequently Asked Questions about semgrep

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

FAQPage Schema
How do I detect security vulnerabilities in source code across multiple languages?

Static analysis identifies security vulnerabilities in source code across 30+ languages like Python, JavaScript, and Go. It uses pattern-based rules to scan for coding standard violations and common flaws, enabling teams to find and fix issues earlier in the development lifecycle.

How do I write custom YAML rules to enforce internal coding standards?

You can write custom YAML rules to enforce internal coding standards by defining specific pattern-matching or taint-mode logic. This allows you to target specific code patterns and data flows, test the rules locally, and deploy them to enforce your security and quality policies.

Can I use taint-mode analysis to detect data leaks and injections?

Taint-mode analysis tracks data flow from untrusted sources to sensitive sinks to detect injections and data leaks. By configuring these rules in YAML, you can identify when user-controlled input reaches vulnerable functions across your multi-language codebase.

Does static code analysis work with CI pipelines for continuous scanning?

Static code analysis integrates seamlessly into CI pipelines to automate continuous scanning. This provides actionable findings directly within your existing development workflow, allowing you to catch security vulnerabilities and coding standard violations before deployment.

Do I need to install specific tooling to run pattern-based code security checks?

You need specific static analysis tooling installed to perform pattern-based code security checks. The required engine can be installed via package managers like pip or Homebrew, or alternatively run within a Docker container to scan your source code.

What is the best way to validate custom pattern-matching rules before scanning a repository?

The best way to validate custom pattern-matching rules is to run them against test cases using the built-in testing command. This checks your YAML definitions against expected matches and failures, ensuring your rules accurately target specific code patterns before full deployment.