Skip to main content

Supported languages

This document provides information about supported languages and language maturity definitions for the following products:

  • Semgrep Code (SAST) - a static application security testing (SAST) solution designed to detect complex security vulnerabilities.
  • Semgrep Supply Chain (SCA) - a software composition analysis (SCA) tool that detects security vulnerabilities in your codebase introduced by open source dependencies.

Semgrep Code and Semgrep Supply Chain are free for small teams.

Language maturity summary

The following table lists all Generally available (GA) and Beta languages for Semgrep Code and Semgrep Supply Chain.

Languages are arranged by feature completeness from most to least. Cross-file (interfile) analysis for Semgrep Code and reachability analysis for Semgrep Supply Chain are the most advanced analyses that Semgrep provides; see Feature definitions for more details.

LanguagesSemgrep Code
Supports 35+ languages
Semgrep Supply Chain
Supports 10+ languages
C#Generally available
• Cross-file dataflow analysis
• Supports up to C# 13
• 40+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
• Can detect malicious dependencies
GoGenerally available
• Cross-file dataflow analysis
• 60+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
• Can detect malicious dependencies
JavaGenerally available
• Cross-file dataflow analysis
• Framework-specific control flow analysis
• 160+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
JavaScriptGenerally available
• Cross-file dataflow analysis
• Framework-specific control flow analysis
• 70+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
• Can detect malicious dependencies
KotlinGenerally available
• Cross-file dataflow analysis
• 60+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
PythonGenerally available
• Cross-file dataflow analysis
• Framework-specific control flow analysis
• 300+ Pro rules
• See Python-specific support details
Generally available
• Reachability analysis
• Can detect open source licenses
• Can detect malicious dependencies
TypescriptGenerally available
• Cross-file dataflow analysis
• Framework-specific control flow analysis
• 70+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
C / C++Generally available
• Cross-file dataflow analysis
• 150+ Pro rules
N/a
JSXGenerally available
• Cross-function dataflow analysis
• 70+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
RubyGenerally available
• Cross-function dataflow analysis
• 20+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
• Can detect malicious dependencies
ScalaGenerally available
• Cross-function dataflow analysis
• Community rules
Generally available
• Reachability analysis
• Can detect open source licenses
SwiftGenerally available
• Cross-function dataflow analysis
• 50+ Pro rules
Generally available
• Reachability analysis
• Can detect open source licenses
RustGenerally available
• Cross-function dataflow analysis
• 40+ Pro rules
Beta
• Can detect open source licenses
• Can detect malicious dependencies
PHPGenerally available
• Cross-function dataflow analysis
• 20+ Pro rules
Beta
TerraformGenerally available
• Cross-function dataflow analysis
• Community rules
N/a
GenericGenerally available N/a
JSONGenerally available N/a
ElixirBetaBeta
APEXBeta--
DartExperimentalBeta
Click to view experimental languages for Semgrep Code.
  • Bash
  • Cairo
  • Circom
  • Clojure
  • Dart
  • Dockerfile
  • Hack
  • HTML
  • Jsonnet
  • Julia
  • Lisp
  • Lua
  • Move on Aptos
  • Move on Sui
  • OCaml
  • R
  • Scheme
  • Solidity
  • YAML
  • XML

Language maturity levels

Semgrep Code

Semgrep Code languages can be classified into four maturity levels:

  • Generally available (GA)
  • Beta
  • Experimental
  • Community supported*

*Community supported languages meet the parse rate and syntax requirements of Experimental languages. Users can still access community rules or write their own rules.

Click to view table of definitions.
FeatureGABetaExperimentalCommunity supported
SupportHighest quality support by the Semgrep team. Reported issues are resolved promptly.Supported by the Semgrep team. Reported issues are fixed after GA languages.There are limitations to this language's functionality. Reported issues are tracked and prioritized with best effort.These languages are supported by the Semgrep community. While Semgrep may develop rules or engine updates for these languages, they are not prioritized.
Parse Rate99%+95%+90%+
Number of Pro rules10+5+0+. Query the Registry to see if any rules exist for your language.
Semgrep syntaxRegex, equivalence, deep expression operators, types and typing. All features supported in Beta.Complete metavariable support, metavariable equality. All features supported in Experimental.Syntax, ellipsis operator, basic metavariable functionality.

Semgrep Supply Chain

Semgrep Supply Chain has two language maturity levels:

  • Generally available
  • Beta
Click to view table of definitions.
FeatureGenerally availableBeta
Number of reachability rules10+No required number
Semgrep, Inc. rule-writing supportQuickly support CVE coverage with reachability analysis for all critical and high vulnerabilities based on the latest security advisories.Coverage for CVEs but without reachability analysis.
Semgrep CE language supportSemgrep CE support is GA.Semgrep CE support is at least Beta.

Feature definitions

Cross-file dataflow analysis

Cross-file analysis (also known as interfile analysis) takes into account how information flows between files. In particular, cross-file analysis includes cross-file taint analysis, which tracks unsanitized variables flowing from a source to a sink through arbitrarily many files. Other analyses performed across files include constant propagation and type inference.

Cross-file analysis is usually used in contrast to intrafile, or per-file analysis, where each file is analyzed as a standalone block of code.

Languages with cross-file support also include cross-function support.

Cross-function dataflow analysis

Cross-function analysis means that interactions between functions are taken into account. This improves taint analysis, which tracks unsanitized variables flowing from a source to a sink through arbitrarily many functions.

Reachability analysis

Reachability refers to whether or not a vulnerable code pattern from a dependency is used in the codebase that imports it. In Semgrep Supply Chain, both a dependency's vulnerable version and code pattern must match for a vulnerability to be considered reachable.

See Overview of Semgrep Supply Chain to learn how Semgrep leverages its code-scanning and rule syntax capabilities to provide high-signal rules that determine a finding's reachability. This assists security engineers in remediation and triage processes.

tip

See Language maturity levels to learn which features define GA or beta language support.

Semgrep Supply Chain feature support

Semgrep Supply Chain is a software composition analysis (SCA) tool that detects security vulnerabilities in your codebase introduced by open source dependencies. It can also:

  • Generate a software bill of materials (SBOM) that provides a complete inventory of your open source components
  • Query for information about your dependencies
  • Support the enforcement of your business' open source package licensing requirements
  • Detect malicious dependencies (currently in private beta; reach out to support to join the program)

For projects with lockfiles, Semgrep parses lockfiles for dependencies, then scans your codebase for reachable findings based on the lockfiles. For a lockfile to be scanned by Semgrep Supply Chain, it must have one of the supported lockfile names.

For some languages, such as JavaScript and Python, a lockfile or manifest file is parsed to determine transitivity. For more information on transitivity, see Transitive dependencies and reachability analysis.

Additionally, Semgrep offers beta support for the scanning of Java or Kotlin projects without lockfiles.

Package manager support

The following table lists all Semgrep-supported package managers for each language. Languages with reachability support are listed first.

LanguageSupported package managersManifest file or lockfile
C#NuGetpackages.lock.json
GoGo modules (go mod)go.mod
JavaGradlegradle.lockfile
MavenMaven-generated dependency tree (See Setting up SSC scans for Apache Maven for instructions.)
JavaScript or TypeScriptnpmpackage-lock.json
Yarnyarn.lock
pnpmpnpm-lock.yaml
KotlinGradlegradle.lockfile
MavenMaven-generated dependency tree (See Setting up SSC scans for Apache Maven for instructions.)
PythonpipAny of the following:
  • *requirement*.txt or *requirement*.pip
  • Any manifest file in a requirements folder, such as **/requirements/*.txt or **/requirements/*.pip
The file must be generated automatically and have values set to exact versions (pinned dependencies).
pip-tools
PipenvPipfile.lock
Poetrypoetry.lock
RubyRubyGemsGemfile.lock
ScalaMavenMaven-generated dependency tree (See Setting up SSC scans for Apache Maven for instructions.)
SwiftSwiftPMPackage.swift file and Swift-generated Package.resolved file. (See Swift documentation for instructions.)
RustCargo*cargo.lock
DartPubpubspec.lock
ElixirHexmix.lock
PHPComposercomposer.lock

*Supply Chain does not analyze the transitivity of packages for these language and manifest file or lockfile combinations. All dependencies are listed as No Reachability Analysis.

Feature support

The following table lists all Supply Chain features for each language. Languages with reachability support are listed first.

LanguageReachability
(see CVE coverage)
License detectionMalicious dependency
detection (beta)
C#
Go
Java--
JavaScript or TypeScript
Kotlin--
Python
For PyPi only
Ruby
Scala✅†--
Swift--
RustNo reachability analysis. However, Semgrep can compare a package's version against a list of versions with known vulnerabilities.
Dart----
Elixir----
PHP----

License detection for new packages is asynchronous and processed after the initial scan. Policies aren't applied on first detection, but are enforced in subsequent scans.

CVE coverage

Semgrep's reachability analysis covers the following CVEs:

Supported sources

Feature and product maturity levels

The detailed specifications previously provided apply only to language support. Language maturity levels differ from feature and product maturity levels.

More information

Visit the cheat sheet generation script and associated semgrep-core test files to learn more about each feature:

To see the parse rates for each language, visit the Semgrep public language dashboard.


Not finding what you need in this doc? Ask questions in our Community Slack group, or see Support for other ways to get help.