Skip to main content
MAINTENANCE STATUSThis document is no longer updated. For updates, refer to the following sources:

February 2023

Community rules

Thanks to Sjord, @artem-fedorov and @gabriellesc for their contributions!

New rules from Semgrep community and Semgrep, Inc

  • Improved coverage for security issues in Terraform:
  • Additional rules for weak ciphers in Java:
  • Additional rules for inline JavaScript and related security issues:

Updated Community rules

  • Added and improved autofix for many rules
  • Improved patterns:
  • Improved accuracy:
  • Improved rule message:
  • Improved metadata:

Pro rules

New Pro rules

  • Improved coverage for:
    • Deserialization issues in Java
    • Deserialization issues in Python
    • Weak hash algorithms in JavaScript
    • NoSQL injection in Java
    • NoSQL injection in JavaScript
    • ReDOS in JavaScript

January 2023

Community rules

New rules from Semgrep community and Semgrep, Inc

  • Thanks johnssimon007! New rule for empty encryption key in Python:
  • Thanks johnssimon007! New rule for header injection in Python/Flask:
  • Additional rule for deserialization vulnerabilities in Ruby:
  • Ported regex-based rules from Gitleaks

Updated Community rules

  • Thanks @ben-elttam! FP reduction in Kubernetes rules:
  • Thanks @artem-fedorov! OWASP metadata fixed for too many rules to list here!
  • Thanks ianmuscat! FP reduction with additional patterns:
  • Thanks paisleyrob! FP reduction with improved patterns:
  • Thanks rc-JoshuaZepf! FP reduction with improved patterns:
  • Thanks nightshiba! FP reduction with improved patterns:
  • Thanks Sjord! FP reduction with improved patterns:
  • FP reduction with improved pattern for taint mode:
  • FN reduction with improved patterns for taint mode:
  • Deprecated rules:

Pro rules

The Pro rules are created by Semgrep, Inc and targeted for security and software engineers who need accurate findings. These rules were previously marked as Team tier rules (see the updates below). As of this update, these rules are called the Pro rules and are available with the Team or higher tier.

New Pro rules

  • New rules for hardcoded secrets:
    • Database libraries for Java
    • Database libraries for Ruby
  • New rules for JavaScript:
    • Weak symmetric cryptography
    • RegExp ReDos
    • XSS
    • Open Redirect
  • New rules for Java:
    • SSRF in Java Servlets and Spring Framework

Updated Pro rules

  • FP reduction with improved pattern for taint mode:
    • Command Injection in Java Servlets and Spring Framework
    • XSS in Java Spring Framework
    • XXE in Java

December 2022

Community tier

New rules from Semgrep community and Semgrep, Inc

  • Thanks @aabashkin! Added rule for MongoDB NoSQL Injection:
  • Thanks @rc-mattschwager! Added Rust security rules:
  • Thanks @artem-fedorov! Fixed typos, spurious spaces and other formatting mistakes in many rules!
  • Thanks @nightshiba! Improved SSRF detection in Flask:
  • New rule for OS Command Injection in Argo workflows:

Updated community tier rules

  • Thanks @mpast! FP reduction in Terraform rules for AWS and Azure:
  • Thanks @ItsIgnacioPortal! Added external references:
  • FP reduction with additional sanitizers:
  • FP reduction with improved pattern for taint mode:
  • FP reduction with improved pattern for taint mode:
  • Reduced severity:
  • Added external references:

Team tier

New and updated team tier rules

New rules for hardcoded secrets:
  • Network libraries for Python and Java.
  • Database libraries for Python.
  • Generic secrets in JavaScript.
  • New rules for Angular.
  • New rules for SSRF in JavaScript.
  • New rules for Open Redirect in JavaScript.
  • Improve existing rules for React to cover more use cases.
  • Improve existing rules for hardcoded secrets to cover more use cases.
  • Improve existing rules for command injection in JavaScript to cover more use cases.
  • FP reduction for existing rules for SQLi in JavaScript.
  • FP reduction for existing rules for hardcoded secrets in Python.

November 2022

Community tier

New rules from Semgrep community and Semgrep, Inc

  • Thanks @Sjord! Added rule for links to plaintext URLs:

Updated community tier rules

  • Thanks @harmw! Match variations of auth token:
  • Thanks @keeganparr1! Arbitrary send ERC20:
  • Thanks @lnobrega-canarie! Allow a template variable in the nonce attribute of a script tag:
  • Thanks @objectified! Ignore cookies created by Spring’s ResponseCookie builder:
  • Thanks @kepten! Update missing-integrity rule to handle HTML tags with newlines properly to reduce false positives:
  • FP reduction using taint analysis:
  • Improve autofix by leveraging new AST-based fixes:
  • FP reduction using typed metavariables:
  • Support shebang contexts for finding dangerous command executions:
  • Filter localhost in Python rules for requests:
  • Added autofix:
  • Improved external documentation references:
  • FP reduction by adding support for matching tuples in Python subprocess functions:
  • Improve dockerfile rule to handle the --frozen-lockfile argument. Thanks @ianmuscat for reporting this!
  • FP reduction Java cookie rules. Thanks to @peter17 for reporting this!
  • FP reduction with improved patterns for DocumentBuilderFactory. Thanks @coheigea for reporting this!
METADATA REQUIRED BY SECURITY CATEGORYAll security rules now adopt an improved set of metadata fields. These fields are required when you contribute to Semgrep Registry with rules in security category. For more details, see Including fields required by security category section.

Team tier

New and updated team tier rules

New rules for hardcoded secrets:
  • Database libraries for Python.
  • Database libraries for JavaScript and TypeScript.
  • Improve existing rules for hardcoded secrets to cover more use cases.
  • FP reduction for existing rules for hardcoded secrets.
  • FP reduction for Go net/http rules.

October 2022

Community tier

New rules from Semgrep community and Semgrep, Inc

Updated community tier rules

  • Fixed issue where false positives were reported with multiple consecutive <link> tags in:
  • Capture additional case when ssl._create_unverified_context is reassigned indirectly:
  • Filter case when a dynamic block is used inside aws_eks_cluster:
  • Fixed an issue where the rule was not properly scoped to Azure resources:
  • Filter case when only static strings are used:
  • Filter case when the user input is used as an index to a map:
  • FP reduction by removing an unnecessary unanchored pattern:
  • Scope Laravel cookie rules to only scan inside files named *session.php:
  • Add additional taint sources:

Team tier

New team rules

New rules for the Laravel PHP framework covering the following vulnerability classes:
  • Code injection
  • Command injection
  • SQL injection
  • Path traversal
  • CSRF
  • Cookie security
  • XSS
  • SSRF
New rules for Go net/http package covering the following vulnerability classes:
  • SQL injection
  • Command injection

September 2022

Community tier

New rules from Semgrep community and Semgrep, Inc

  • 100+ new Terraform rules for GCP! Thanks @mertcoskuner!
  • Python crypto operations with HMAC. Thanks @luisfontes19!
  • Spring actuator rules. Thanks @malexmave!
  • Rule for persistent secrets in Docker images. Thanks @Sjord!:
  • Rule for GitHub Actions script injection:
  • PHP XSS rule:

Changed community tier rules

New metadata keys
Semgrep, Inc is adding new metadata fields to better communicate the intent and importance of findings that a rule generates. The following list provides details about new metadata fields:
  • Likelihood: How likely is the impact highlighted by this finding to occur? Examples:
    • Web application user input: HIGH
    • OS environment: MEDIUM
  • Impact: How much damage can this issue cause? Examples:
    • SQL Injection: HIGH
    • Information disclosure: LOW
  • Confidence: How confident is the author that this finding is exploitable? Examples:
    • User input + formatted SQL string + SQL sink + no intermediate function calls: HIGH
    • User input + SQL sink: MEDIUM
    • Formatted SQL string: LOW
  • Subcategory: A list of subcategories that allows the author to specify the intent of the rule. Current values are:
    • Audit: This rule indicates the possible presence of a vulnerability, provided other conditions are present
    • Vuln: This rule is specifically looking for an exploitable vulnerability
  • Additionally, language rulesets (such as p/javascript) have been altered to include only rules that match the following conditions:
    • Subcategory: Vuln
    • Impact: HIGH

Updated community tier rules

  • PyYAML rule updated for modern versions of PyYAML. This can lower the occurrence of false positive findings. Thanks @shivankar-madaan: python.lang.security.deserialization.avoid-pyyaml-load
  • Added new case for C use-after-free where freed var is used in conditional. Thanks @zhengsidie. c.lang.security.use-after-free
  • Additional user input added. Thanks @jbergler! ruby.lang.security.no-eval
  • Reduced false positives by filtering safe attributes. Thanks @luisfontes19! python.flask.security.open-redirect
  • Filtered false positive cases from:
  • Autofix added to the following rules:

Deprecated community tier rules

These rules no longer produce findings:

August 2022

Community tier

New rules from Semgrep community and Semgrep, Inc

  • Thanks @securecodeninja!

Updated community tier rules

  • Fixed taint source to focus on function argument in .
  • Updated various secrets-related rules:
    • Added more patterns for hardcoded secrets in express-session .
    • Added more import patterns to catch more cases .
    • Changed from ERROR to WARNING .
    • Updated to highlight smaller, relevant ranges of code:
    • False positive (FP) reduction, updated in taint mode to provide more context:
  • Updated to work with multi flags such as -yqq in .
  • Updated to taint mode and added more filesystem sources .
  • Restricted sources to remove unlikely user input .
  • Added a pattern for escapeHtml={false} .
  • Added a pattern for detecting manual user-supplied inputs .
  • Updated to highlight smaller, relevant ranges of code:
  • FP reduction: updated to taint mode to provide more context:

Deprecated community tier rules

Semgrep no longer matches anything with the following rules:

Team tier

New Team tier rules

  • New Go rules:
  • New secrets detection rules which try to resolve cases with hardcoded strings used as secrets in code:

Updated Team tier rules

Added more sinks for the following rules:

July 2022

New rules from Semgrep community and Semgrep, Inc

New rules from Semgrep community:
  • Thanks to @securecodeninja!
New rules have been added with taint sources:
There are now 80 team tier only rules covering Java, PHP, JavaScript, and TypeScript available in the Semgrep Registry. These rules are designed to have higher precision and lower false positive rates.

Rule changes and updates

  • Added additional import scenarios for os.system
  • Rewritten with taint mode:
  • Updated precision of source with focus-metavariable:
  • Added additional filters for acceptable SSL policies:
  • Added sanitizers:
  • Added sanitizers, added constant string filter:
  • Uses taint mode to remove uninteresting sources:
  • Remove for loop case due to high false positive (FP) rate:
  • FP reduction by removing cases where user input is likely a number type:
  • Exclude Error and Exception classes from results:
  • FP reduction: more specific sources:
  • FP reduction by limiting to more specific cases:
  • Removed 1 case with high FP likelihood:
  • Altered behavior:
  • Removed FPs:
  • Removed FPs:
  • Fixed bug:
  • Removed FPs:
Reduced severity to INFO:
Limit sources to specific properties of Request object rather than all properties:
The python.lang.security.audit.dangerous rules have been reworked. All Python -dangerous- rules have had their confidence level changed to LOW. Renamed rules:
  • renamed to
  • renamed to
  • renamed to
  • renamed to
  • renamed to
  • renamed to
  • renamed to
  • renamed to
  • renamed to
  • renamed to
Added to p/default (p/default are rules that run automatically with semgrep --config p/default):
Removed from p/default in Semgrep Registry: Other:
  • Fixed message typo: