Skip to content

Commit b3071bf

Browse files
authored
add info re: global ignore paths (#2004)
* add info re: global ignore paths * add screenshots
1 parent f8d3b8a commit b3071bf

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

docs/ignoring-files-folders-code.md

+19-4
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ specification more closely.
9696

9797
## Define ignored files and folders in Semgrep AppSec Platform
9898

99-
Another method for users to define ignore patterns is through a Project in Semgrep AppSec Platform. These patterns follow the same syntax as `.semgrepignore` in the preceding section.
99+
Another method for users to define ignore patterns is through a Project in Semgrep AppSec Platform. These patterns follow the same syntax as `.semgrepignore` in the preceding section. You can define patterns for individual projects, or you can define them at the organization level so that they're applied to all projects owned by that organization.
100100

101-
To define files and folders in Semgrep AppSec Platform:
101+
Including files and folders through this method is **additive**. When you run a scan using `semgrep ci`, Semgrep looks for a `.semgrepignore` within the repository. If no `.semgrepignore` file is found, Semgrep temporarily creates one and adds items from Semgrep AppSec Platform's Path Ignores.
102+
103+
Adding items to Semgrep AppSec Platform's **Path Ignores** box doesn't override default Semgrep ignore patterns included with its CLI tool, since the patterns are additive. However, items added to `.semgrepignore` override default Semgrep CLI patterns.
104+
105+
### Define files and folders for a specific project
102106

103107
1. Sign in to [<i class="fas fa-external-link fa-xs"></i> Semgrep AppSec Platform](https://semgrep.dev/login?return_path=/manage/projects).
104108
2. From the sidebar, click **[Projects](https://semgrep.dev/orgs/-/projects)**.
@@ -109,9 +113,20 @@ To define files and folders in Semgrep AppSec Platform:
109113
2. Enter files and folders to ignore in the relevant **Path Ignores** box.
110114
3. Click **Save changes**.
111115

112-
Including files and folders through this method is **additive**. When you run a scan using `semgrep ci`, Semgrep looks for a `.semgrepignore` within the repository. If no `.semgrepignore` file is found, Semgrep temporarily creates one and adds items from Semgrep AppSec Platform's Path Ignores.
116+
![Set ignore paths for a project in Semgrep AppSec Platform.](/img/per-project-ignores.png#md-width)
117+
_**Figure**. Set ignore paths for a project in Semgrep AppSec Platform._
113118

114-
Adding items to Semgrep AppSec Platform's **Path Ignores** box doesn't override default Semgrep ignore patterns included with its CLI tool, since the patterns are additive. However, items added to `.semgrepignore` override default Semgrep CLI patterns.
119+
### Define files and folders for all projects of an organization
120+
121+
1. Sign in to [<i class="fas fa-external-link fa-xs"></i> Semgrep AppSec Platform](https://semgrep.dev/login?return_path=/manage/projects).
122+
2. Go to **Settings > Deployment** and navigate to the **Global ignore paths** section.
123+
3. To define files and folders that Semgrep can ignore:
124+
1. Click **Code (SAST) & Supply Chain (SCA)** or **Secrets** to expand and display the **Path Ignores** box.
125+
2. Enter files and folders to ignore in the relevant path ignores box.
126+
3. Click **Save changes**.
127+
128+
![Set global ignore paths for all projects of an organization in Semgrep AppSec Platform.](/img/global-ignore-paths.png#md-width)
129+
_**Figure**. Set global ignore paths for all projects of an organization in Semgrep AppSec Platform._
115130

116131
### Add items to `.semgrepignore` during findings triage
117132

static/img/global-ignore-paths.png

189 KB
Loading

static/img/per-project-ignores.png

279 KB
Loading

0 commit comments

Comments
 (0)