semgrep-rules

Codify vulnerability patterns into Semgrep rules for automated code scanning.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ashwnn/agent-config --skill semgrep-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semgrep-rules
Source: https://github.com/ashwnn/agent-config/tree/main/skills/semgrep-rules
Command: npx skills add https://github.com/ashwnn/agent-config --skill semgrep-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and refine custom Semgrep rules for detecting vulnerability patterns or coding anti-patterns in your codebase. Use when you've found a bug class you want to detect systematically, or when preparing automated security checks for CI.

Core Features & Use Cases

  • Generate Semgrep rules with id, patterns, messages, and languages to codify issues.
  • Include inline tests, examples, and a structured rule-writing workflow for CI integration.
  • Use case: enforce security conventions and regression detection across codebases.

Quick Start

Write a Semgrep rule that detects unsanitized user input used in SQL queries.

Frequently Asked Questions about semgrep-rules

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

FAQPage Schema
How do I create custom Semgrep rules for vulnerability detection?

To create custom Semgrep rules for vulnerability detection, you codify vulnerability patterns using structured fields like id, patterns, message, languages, severity, and metadata to systematically identify issues in your codebase.

What is the best way to automate static analysis security checks in a CI pipeline?

You can automate static analysis security checks in a CI pipeline by codifying bug classes into Semgrep rules with inline tests and examples, enabling automated code scanning and regression detection during integration.

Can I use Semgrep rules across multi-language codebases?

Yes, you can use Semgrep rules across multi-language codebases by specifying the target programming languages in the rule's language field, allowing the static analysis to apply scanning patterns to different code environments.

How do I write a Semgrep rule to detect unsanitized user input in SQL queries?

You write a Semgrep rule to detect unsanitized SQL input by defining matching patterns that trace user input variables flowing into SQL query execution functions, then assigning a severity level and descriptive message.

Does this approach to writing Semgrep rules support inline tests for validation?

Yes, this approach to writing Semgrep rules supports inline tests and examples, providing a structured rule-writing workflow that validates pattern accuracy and ensures reliable vulnerability detection before deploying to CI.