Skip to content

Commit 0197d24

Browse files
Clarify scope of interfile analysis (#2016)
1 parent 2aa0f67 commit 0197d24

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/semgrep-code/semgrep-pro-engine-intro.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Cross-file analysis resolves names differently than Semgrep CE's analysis. Conse
176176
177177
<dl>
178178
<dt>Cross-file (interfile) analysis</dt>
179-
<dd><ul><li>Cross-file analysis finds patterns spanning multiple files to help security engineers deeply understand their organization's security issues. This analysis reduces noise and detects issues that Semgrep CE can't find.</li>
179+
<dd><ul><li>Cross-file analysis finds patterns spanning multiple files within a project to help security engineers deeply understand their organization's security issues. This analysis reduces noise and detects issues that Semgrep CE can't find.</li>
180180
<li>Cross-file analysis runs on full scans. These scans may take longer to complete and can use more memory than Semgrep CE scans. See the available languages for cross-file analysis in <a href="/docs/supported-languages/#semgrep-pro-engine"><i class="fa-regular fa-file-lines"></i> Supported languages</a>.</li>
181181
<li>In Semgrep Code, cross-file analysis includes cross-function analysis as well.</li></ul></dd>
182182
<dt>Cross-function (interprocedural) analysis</dt>
@@ -192,11 +192,11 @@ Cross-file analysis resolves names differently than Semgrep CE's analysis. Conse
192192
193193
#### Semgrep Code cross-file CI scan issues
194194
195-
To provide reliably completed scans, Semgrep Code can **fall back** to the use of Semgrep CE. This ensures that in the vast majority of cases, scans run successfully.
195+
To provide reliably completed scans, Semgrep Code can **fall back** from cross-file analysis to single-file analysis. This ensures that in the vast majority of cases, scans run successfully.
196196
197-
By default, if a scan uses more than **5 GB** of memory during cross-file pre-processing, the scan uses single-function analysis to ensure lower memory consumption. Similarly, if a cross-file scan doesn't complete after 3 hours, the analysis times out and Semgrep re-scans the repository using single-function analysis. Typically, this happens because the repository is very large.
197+
By default, if a scan uses more than **5 GB** of memory during cross-file pre-processing, the scan uses single-file analysis to ensure lower memory consumption. Similarly, if a cross-file scan doesn't complete after 3 hours, the analysis times out and Semgrep re-scans the repository using single-file analysis. Typically, this happens because the repository is very large.
198198
199-
If 1-2 repositories cause CI scan issues and scanning these repositories with interfile analysis is not critical, modify your configuration file to use `semgrep ci --oss-only`. This overrides the Semgrep AppSec Platform setting for these repositories, and always runs these scans with single-function analysis.
199+
If 1-2 repositories cause CI scan issues and scanning these repositories with interfile analysis is not critical, modify your configuration file to use `semgrep ci --pro-intrafile`. This overrides the Semgrep AppSec Platform setting for these repositories, and always runs these scans with single-file, cross-function analysis.
200200
201201
If many repositories cause scan issues, or you have critical repositories you are unable to scan with Semgrep's interfile analysis:
202202
1. Disable the <i class="fa-solid fa-toggle-large-on"></i> **Cross-file analysis** toggle in the **[Settings](https://semgrep.dev/orgs/-/settings)** page of your organization.
@@ -209,4 +209,4 @@ Cross-file analysis is different from [join mode](/writing-rules/experiments/joi
209209
210210
### Feedback for Semgrep Code's advanced analyses
211211
212-
The team at Semgrep is excited to hear whats on your mind. As you explore these features, we want to know what you'd like to be able to capture with it. We believe that this deeper analysis helps users find more vulnerabilities, build trust with developers, and enforce code standards quickly. Let us know what you think about the results in the <a href="https://go.semgrep.dev/slack">Semgrep Community Slack</a>.
212+
The team at Semgrep is excited to hear what's on your mind. As you explore these features, we want to know what you'd like to be able to capture with it. We believe that this deeper analysis helps users find more vulnerabilities, build trust with developers, and enforce code standards quickly. Let us know what you think about the results in the <a href="https://go.semgrep.dev/slack">Semgrep Community Slack</a>.

src/components/concept/_semgrep-pro-engine-introduction.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Use Semgrep Code's **cross-file (interfile) analysis** to detect vulnerabilities across files and folders.
1+
Use Semgrep Code's **cross-file (interfile) analysis** to detect vulnerabilities across files and folders within a project.
22

33
By design, Semgrep open source software, Semgrep Community Edition (CE) can only analyze interactions within a single function, also known as **intraprocedural analysis**. This limited scope makes Semgrep CE fast and easy to integrate into developer workflows.
44

0 commit comments

Comments
 (0)