Skip to content

Commit 1b83856

Browse files
s-santillankhorne3
andauthored
Create summary table of all languages for Code and Supply Chain (#1918)
* begin adding summary table * update supported languages product summary table * move some sections down * begin making more in depth changes * arranged tables * separate out code vs ce table, shorten page * add cleanup * add the semgrep CE languages to sidebars * create separate doc for CE languages * finish up supported languages in semgrep ce * remove manifest in cell * update tables * reachability def * update with definitions * remove callout * Update docs/supported-languages.md Co-authored-by: Katie Horne <[email protected]> * try to simplify table * address review notes * update header * clarify the blank values under reachability --------- Co-authored-by: Katie Horne <[email protected]>
1 parent 424cc31 commit 1b83856

8 files changed

+434
-141
lines changed

docs/semgrep-ce-languages.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
slug: semgrep-ce-languages
3+
title: Supported languages
4+
hide_title: true
5+
description:
6+
Semgrep CE supports more than two dozen languages. Learn about the language support differences between Semgrep CE and Semgrep Code.
7+
tags:
8+
- Semgrep CE
9+
- Semgrep Code
10+
---
11+
12+
import SupportedLanguagesCe from '/src/components/reference/_supported-languages-ce.md'
13+
import LanguageMaturityCode from '/src/components/reference/_language-maturity-code.md'
14+
15+
# Supported languages for Semgrep CE
16+
17+
This document provides information about supported languages for Semgrep Community Edition (Semgrep CE) and Semgrep Code.
18+
19+
## Semgrep Code and Community Edition
20+
21+
Semgrep CE is a fast, lightweight program analysis tool that can help you detect bugs in your code. It makes use of Semgrep's LGPL 2.1 open source engine. These languages are supported by the Semgrep community, at best effort.
22+
23+
Semgrep Code is a static application security testing (SAST) solution designed to detect complex security vulnerabilities. It makes use of proprietary Semgrep analyses, such as cross-file (interfile) dataflow analysis and framework specific analyses, in addition to Semgrep CE. This results in a [**higher true positive rate than Semgrep CE**](/semgrep-pro-vs-oss). Semgrep Code provides the highest quality support by the Semgrep team: reported issues are resolved promptly.
24+
25+
Use either tool to scan local code or integrate it into your CI/CD pipeline to automate the continuous scanning of your repositories.
26+
27+
<SupportedLanguagesCe />
28+
29+
## Language maturity definitions
30+
31+
Semgrep Code languages can be classified into four maturity levels:
32+
33+
* Generally available (GA)
34+
* Beta
35+
* Experimental
36+
* Community supported\*
37+
38+
\*Community supported languages meet the parse rate and syntax requirements of **Experimental** languages. Users can still access community rules or write their own rules.
39+
40+
<LanguageMaturityCode />

docs/semgrep-supply-chain/glossary.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ title: Supply Chain glossary
88
hide_title: true
99
---
1010

11+
import DefReachability from "/src/components/concept/_def-reachability.md"
12+
1113
# Semgrep Supply Chain glossary
1214

1315
The terms and definitions provided here are specific to Semgrep Supply Chain.
@@ -60,9 +62,7 @@ See also [Reachability](#reachability).
6062

6163
## Reachability
6264

63-
Reachability refers to whether or not a vulnerable piece of code 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.
64-
65-
See [Overview of Semgrep Supply Chain](/semgrep-supply-chain/overview) 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.
65+
<DefReachability />
6666

6767
## Reachability rules
6868

docs/supported-languages.md

+97-87
Original file line numberDiff line numberDiff line change
@@ -12,98 +12,60 @@ title: Supported languages
1212

1313
import SupportedLanguagesTable from '/src/components/reference/_supported-languages-table.mdx'
1414
import SscIntro from "/src/components/concept/_ssc-intro.md"
15-
15+
import LanguageMaturityCode from '/src/components/reference/_language-maturity-code.md'
1616
import SemgrepProEngineIntroduction from "/src/components/concept/_semgrep-pro-engine-introduction.mdx"
17+
import DefCrossFile from "/src/components/concept/_def-cross-file.mdx"
18+
import DefCrossFunction from "/src/components/concept/_def-cross-function.mdx"
19+
import DefReachability from "/src/components/concept/_def-reachability.md"
1720

1821
# Supported languages
1922

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

22-
* Semgrep Code
23-
* Semgrep Community Edition (CE)
24-
* Semgrep Supply Chain
25-
26-
## Semgrep Code and Community Edition
25+
* **Semgrep Code (SAST)** - a static application security testing (SAST) solution designed to detect complex security vulnerabilities.
26+
* **Semgrep Supply Chain (SCA)** - a software composition analysis (SCA) tool that detects security vulnerabilities in your codebase introduced by open source dependencies.
2727

28-
Semgrep CE is a fast, lightweight program analysis tool that can help you detect bugs in your code. It makes use of Semgrep's LGPL 2.1 open source engine. These languages are supported by the Semgrep community, at best effort.
28+
Semgrep Code and Semgrep Supply Chain are free for [small teams](https://semgrep.dev/pricing).
2929

30-
Semgrep Code is a static application security testing (SAST) solution designed to detect complex security vulnerabilities. It makes use of proprietary Semgrep analyses, such as cross-file (interfile) dataflow analysis and framework specific analyses, in addition to Semgrep CE. This results in a [**higher true positive rate than Semgrep CE**](/semgrep-pro-vs-oss). Semgrep Code provides the highest quality support by the Semgrep team: reported issues are resolved promptly.
30+
## Language maturity summary
3131

32-
Use either tool to scan local code or integrate it into your CI/CD pipeline to automate the continuous scanning of your repositories.
32+
The following table lists all **Generally available (GA)** and **Beta** languages for Semgrep Code and Semgrep Supply Chain.
3333

34-
### Language support
35-
36-
Semgrep Code supports over 35 languages.
34+
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](#feature-definitions) for more details.
3735

3836
<SupportedLanguagesTable />
3937

40-
### Language maturity levels
38+
### Feature definitions
4139

42-
Semgrep Code languages can be classified into four maturity levels:
40+
<details>
41+
<summary>Cross-file dataflow analysis</summary>
4342

44-
* Generally available (GA)
45-
* Beta
46-
* Experimental
47-
* Community supported\*
43+
<DefCrossFile />
4844

49-
\*Community supported languages meet the parse rate and syntax requirements of **Experimental** languages. Users can still access community rules or write their own rules.
45+
Languages with cross-file support also include cross-function support.
5046

51-
Their differences are outlined in the following table:
47+
</details>
5248

53-
<table>
54-
<thead><tr>
55-
<td><strong>Feature</strong></td>
56-
<td><strong>GA</strong></td>
57-
<td><strong>Beta</strong></td>
58-
<td><strong>Experimental</strong></td>
59-
<td><strong>Community supported</strong></td>
60-
</tr></thead>
61-
<tbody>
62-
<tr>
63-
<td>Support</td>
64-
<td>Highest quality support by the Semgrep team. Reported issues are resolved promptly.</td>
65-
<td>Supported by the Semgrep team. Reported issues are fixed after GA languages.</td>
66-
<td>There are limitations to this language's functionality. Reported issues are tracked and prioritized with best effort.</td>
67-
<td>These languages are supported by the Semgrep community. While Semgrep may develop rules or engine updates for these languages, they are not prioritized.</td>
68-
</tr>
69-
<tr>
70-
<td>Parse Rate</td>
71-
<td>99%+</td>
72-
<td>95%+</td>
73-
<td colspan="2">90%+</td>
74-
</tr>
75-
<tr>
76-
<td>Number of Pro rules</td>
77-
<td>10+</td>
78-
<td>5+</td>
79-
<td colspan="2">0+. Query the <a href="https://semgrep.dev/r">Registry</a> to see if any rules exist for your language.</td>
80-
</tr>
81-
<tr>
82-
<td>Semgrep syntax</td>
83-
<td>Regex, equivalence, deep expression operators, types and typing. All features supported in Beta.</td>
84-
<td>Complete metavariable support, metavariable equality. All features supported in Experimental.</td>
85-
<td colspan="2">Syntax, ellipsis operator, basic metavariable functionality.</td>
86-
</tr>
87-
</tbody>
88-
</table>
49+
<details>
50+
<summary>Cross-function dataflow analysis</summary>
51+
<DefCrossFunction />
52+
</details>
8953

90-
### More information
91-
Visit the cheat sheet generation script and associated semgrep-core test files to learn more about each feature:
92-
* [Generation script](https://github.com/semgrep/semgrep/blob/develop/scripts/generate_cheatsheet.py)
93-
* [`semgrep-core` test files](https://github.com/semgrep/semgrep/tree/develop/tests)
54+
<details>
55+
<summary>Reachability analysis</summary>
56+
<DefReachability />
9457

95-
Visit the Semgrep public language dashboard to see the parse rates for each language
96-
* See [Parse rates by language](https://dashboard.semgrep.dev/).
58+
</details>
9759

98-
<!-- coupling: If you modify the features in the levels below, change also
99-
/semgrep/blob/develop/tests/Test.ml and its maturity level regression testing code.
100-
-->
60+
:::tip
61+
See [Language maturity levels](#language-maturity-levels) to learn which features define GA or beta language support.
62+
:::
10163

102-
## Semgrep Supply Chain
64+
## Semgrep Supply Chain feature maturity
10365

10466
<SscIntro/>
10567

106-
For projects with lockfiles, Semgrep parses lockfiles for dependencies, then scans your codebase for reachable findings based on the lockfiles. Some languages, such as Java, have several supported lockfiles, depending on your repository's package manager. For a lockfile to be scanned by Semgrep Supply Chain, it must have one of the supported lockfile names.
68+
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.
10769

10870
For some languages, such as JavaScript and Python, a lockfile or manifest file is parsed to determine [transitivity](/docs/semgrep-supply-chain/glossary/#transitive-or-indirect-dependency). For more information on transitivity, see [Transitive dependencies and reachability analysis](/docs/semgrep-supply-chain/overview/#transitive-dependencies-and-reachability-analysis).
10971

@@ -118,7 +80,7 @@ Additionally, Semgrep offers beta support for the scanning of Java projects **wi
11880
<th>Manifest file or lockfile</th>
11981
<th><a href="#reachability-support-level">Reachability</a></th>
12082
<th>License detection support</th>
121-
<th>Period of reachability rule coverage for CVEs/GHSAs</th>
83+
<th><a href="#rule-coverage-support-level">Reachability rule coverage for CVEs/GHSAs</a></th>
12284
</tr></thead>
12385
<tbody>
12486
<tr>
@@ -127,21 +89,23 @@ Additionally, Semgrep offers beta support for the scanning of Java projects **wi
12789
<td><code>packages.lock.json</code></td>
12890
<td style={{"text-align": "center"}}>GA</td>
12991
<td>✅</td>
130-
<td rowspan="16">80% of all critical severity CVEs since 2017 and 100% of critical and high severity CVEs since May 2022</td>
92+
<td style={{"text-align": "center"}}>GA</td>
13193
</tr>
13294
<tr>
13395
<td>Go</td>
13496
<td>Go modules (<code>go mod</code>)</td>
13597
<td><code>go.mod</code></td>
13698
<td style={{"text-align": "center"}}>GA</td>
13799
<td>✅</td>
100+
<td style={{"text-align": "center"}}>GA</td>
138101
</tr>
139102
<tr rowspan="2">
140103
<td rowspan="2">Java</td>
141104
<td>Gradle</td>
142105
<td><code>gradle.lockfile</code></td>
143106
<td style={{"text-align": "center"}}>GA</td>
144107
<td>✅</td>
108+
<td rowspan="2" style={{"text-align": "center"}}>GA</td>
145109
</tr>
146110
<tr>
147111
<td>Maven</td>
@@ -155,6 +119,7 @@ Additionally, Semgrep offers beta support for the scanning of Java projects **wi
155119
<td><code>package-lock.json</code></td>
156120
<td style={{"text-align": "center"}}>GA</td>
157121
<td>✅</td>
122+
<td rowspan="3" style={{"text-align": "center"}}>GA</td>
158123
</tr>
159124
<tr>
160125
<td>Yarn, Yarn 2, Yarn 3</td>
@@ -174,6 +139,7 @@ Additionally, Semgrep offers beta support for the scanning of Java projects **wi
174139
<td><code>gradle.lockfile</code></td>
175140
<td style={{"text-align": "center"}}>GA</td>
176141
<td>✅</td>
142+
<td rowspan="2" style={{"text-align": "center"}}>GA</td>
177143
</tr>
178144
<tr>
179145
<td>Maven</td>
@@ -186,7 +152,8 @@ Additionally, Semgrep offers beta support for the scanning of Java projects **wi
186152
<td>pip</td>
187153
<td rowspan="2">Any of the following: <ul><li>`*requirement*.txt` or `*requirement*.pip`</li><li>Any manifest file in a requirements folder, such as `**/requirements/*.txt` or `**/requirements/*.pip`</li></ul> The file must be generated automatically and have values set to exact versions (pinned dependencies).</td>
188154
<td style={{"text-align": "center"}}>GA</td>
189-
<td rowspan="4">✅ (PyPI packages only)</td>
155+
<td rowspan="4">(PyPI only)</td>
156+
<td rowspan="4" style={{"text-align": "center"}}>GA</td>
190157
</tr>
191158
<tr>
192159
<td>pip-tools</td>
@@ -208,63 +175,97 @@ Additionally, Semgrep offers beta support for the scanning of Java projects **wi
208175
<td><code>Gemfile.lock</code></td>
209176
<td style={{"text-align": "center"}}>GA</td>
210177
<td>✅</td>
178+
<td style={{"text-align": "center"}}>GA</td>
211179
</tr>
212180
<tr>
213181
<td>Scala</td>
214182
<td>Maven</td>
215183
<td>Maven-generated dependency tree (See <a href="/docs/semgrep-supply-chain/setup-maven/">Setting up SSC scans for Apache Maven</a> for instructions.)</td>
216184
<td style={{"text-align": "center"}}>GA</td>
217185
<td>✅</td>
186+
<td style={{"text-align": "center"}}>GA</td>
218187
</tr>
219188
<tr>
220189
<td>Swift</td>
221190
<td>SwiftPM</td>
222191
<td><code>Package.swift</code> file and Swift-generated <code>Package.resolved</code> file. (See <a href="https://www.swift.org/documentation/package-manager/">Swift documentation </a> for instructions.)</td>
223192
<td style={{"text-align": "center"}}>GA</td>
224-
<td>✅ (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.)</td>
193+
<td>✅<strong>†</strong></td>
194+
<td style={{"text-align": "center"}}>GA</td>
225195
</tr>
226196
<tr>
227197
<td>Rust</td>
228198
<td>Cargo*</td>
229199
<td><code>cargo.lock</code></td>
230-
<td style={{"text-align": "center"}}>--</td>
200+
<td rowspan="4">No reachability analysis. However, Semgrep can compare a package's version against a list of versions with known vulnerabilities.</td>
231201
<td>✅</td>
232-
<td rowspan="5">Not applicable due to reachability support level</td>
202+
<td rowspan="4">Not applicable due to reachability support level.</td>
233203
</tr>
234204
<tr>
235205
<td>Dart</td>
236206
<td>Pub</td>
237207
<td><code>pubspec.lock</code></td>
238208
<td style={{"text-align": "center"}}>--</td>
239-
<td>--</td>
240209
</tr>
241210
<tr>
242211
<td>Elixir</td>
243212
<td>Hex</td>
244213
<td><code>mix.lock</code></td>
245214
<td style={{"text-align": "center"}}>--</td>
246-
<td>--</td>
247215
</tr>
248216
<tr>
249217
<td>PHP</td>
250218
<td>Composer</td>
251219
<td><code>composer.lock</code></td>
252220
<td style={{"text-align": "center"}}>--</td>
253-
<td>--</td>
254221
</tr>
255222
</tbody>
256223
</table>
257224
</div>
258-
_*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.**_
225+
_<strong>*</strong>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.**_<br />
226+
_<strong>†</strong>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._
227+
228+
#### Reachability support level
229+
230+
GA coverage means that Semgrep provides full reachability analysis for that language.
231+
232+
#### Rule coverage support level
233+
234+
**GA** coverage means that Semgrep provides coverage and rules for the following:
259235

260-
### Maturity levels
236+
- 80% of all **critical** severity CVEs since **2017**
237+
- 100% of **critical** and **high** severity CVEs since **May 2022**
261238

262-
Semgrep Supply Chain has two maturity levels:
239+
## Language maturity levels
240+
241+
### Semgrep Code
242+
243+
Semgrep Code languages can be classified into four maturity levels:
244+
245+
* Generally available (GA)
246+
* Beta
247+
* Experimental
248+
* Community supported\*
249+
250+
\*Community supported languages meet the parse rate and syntax requirements of **Experimental** languages. Users can still access community rules or write their own rules.
251+
252+
<details>
253+
<summary>Click to view table of definitions.</summary>
254+
255+
<LanguageMaturityCode />
256+
257+
</details>
258+
259+
### Semgrep Supply Chain
260+
261+
Semgrep Supply Chain has two language maturity levels:
263262

264263
* Generally available
265264
* Beta
266265

267-
Their differences are outlined in the following table:
266+
267+
<details>
268+
<summary>Click to view table of definitions.</summary>
268269

269270
<table>
270271
<tr>
@@ -275,7 +276,7 @@ Their differences are outlined in the following table:
275276
<tr>
276277
<td>Number of reachability rules</td>
277278
<td>10+</td>
278-
<td>1+</td>
279+
<td>No required number</td>
279280
</tr>
280281
<tr>
281282
<td>Semgrep, Inc. rule-writing support</td>
@@ -289,11 +290,20 @@ Their differences are outlined in the following table:
289290
</tr>
290291
</table>
291292

292-
:::info Feature and product maturity levels
293-
* The detailed specifications previously provided apply only to language support. Language maturity levels differ from feature and product maturity levels.
294-
* Semgrep features and products documented as experimental, beta, or GA generally follow the definitions in a [Software release life cycle](https://en.wikipedia.org/wiki/Software_release_life_cycle).
295-
:::
293+
</details>
296294

297-
#### Reachability support level
295+
### Feature and product maturity levels
296+
297+
The detailed specifications previously provided apply only to language support. Language maturity levels differ from feature and product maturity levels.
298+
299+
## More information
300+
301+
Visit the cheat sheet generation script and associated semgrep-core test files to learn more about each feature:
302+
* [Generation script](https://github.com/semgrep/semgrep/blob/develop/scripts/generate_cheatsheet.py)
303+
* [`semgrep-core` test files](https://github.com/semgrep/semgrep/tree/develop/tests)
304+
305+
To see the **parse rates** for each language, visit the Semgrep [public language dashboard](https://dashboard.semgrep.dev/).
298306

299-
Reachability support level refers to the level of support for reachability analysis for the language. At the minimum, Semgrep Supply Chain compares a package's version against a list of versions with known vulnerabilities
307+
<!-- coupling: If you modify the features in the levels below, change also
308+
/semgrep/blob/develop/tests/Test.ml and its maturity level regression testing code.
309+
-->

0 commit comments

Comments
 (0)