File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ workflows:
188
188
filters : *filters
189
189
- security/analyze_code_full :
190
190
name : analyze_code_full
191
+ root_dir : ./sample
191
192
rules : p/cwe-top-25
192
193
filters : *filters
193
194
- scan_dependencies_prod_npm :
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ description: >
3
3
command to do the analysis. For details on usage see https://semgrep.dev/docs/cli-reference.
4
4
5
5
parameters :
6
+ root_dir :
7
+ type : string
8
+ default : " ."
9
+ description : >
10
+ The root of the codebase to analyze. Defaults to . (working directory).
11
+ Complements the full scan mode, by enabling partial scan of the codebase.
6
12
full_scan :
7
13
type : boolean
8
14
default : false
@@ -21,7 +27,7 @@ parameters:
21
27
file, or Semgrep registry entry name.
22
28
base_branch :
23
29
type : string
24
- default : ' '
30
+ default : " "
25
31
description : >
26
32
The name of the base branch for this scan. Commonly a long-lived branch, e.g. "main" or "master".
27
33
36
42
command : <<include(scripts/export-git-branches.sh)>>
37
43
- run :
38
44
name : Analyze code <<#parameters.full_scan>>full<</parameters.full_scan>><<^parameters.full_scan>>diff<</parameters.full_scan>>
45
+ working_directory : <<parameters.root_dir>>
39
46
environment :
40
47
PARAM_BOOL_FULL_SCAN : <<parameters.full_scan>>
41
48
PARAM_BOOL_VERBOSE : <<parameters.verbose>>
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ description: >
4
4
executor : node
5
5
6
6
parameters :
7
+ root_dir :
8
+ type : string
9
+ default : " ."
10
+ description : >
11
+ The root of the codebase to analyze. Defaults to . (working directory).
7
12
verbose :
8
13
type : boolean
9
14
default : false
19
24
- checkout
20
25
- analyze_code :
21
26
full_scan : true
27
+ root_dir : <<parameters.root_dir>>
22
28
verbose : <<parameters.verbose>>
23
29
rules : <<parameters.rules>>
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ echo " Starting codebase analysis at root directory: ${PWD} "
4
+
3
5
# The `experimental` flag is needed for Semgrep to work, otherwise
4
6
# for unknown reason it will fail with exit code 2. This behavior
5
7
# is only observed in CI environment.
You can’t perform that action at this time.
0 commit comments