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:
188188 filters : *filters
189189 - security/analyze_code_full :
190190 name : analyze_code_full
191+ root_dir : ./sample
191192 rules : p/cwe-top-25
192193 filters : *filters
193194 - scan_dependencies_prod_npm :
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ description: >
33 command to do the analysis. For details on usage see https://semgrep.dev/docs/cli-reference.
44
55parameters :
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.
612 full_scan :
713 type : boolean
814 default : false
@@ -21,7 +27,7 @@ parameters:
2127 file, or Semgrep registry entry name.
2228 base_branch :
2329 type : string
24- default : ' '
30+ default : " "
2531 description : >
2632 The name of the base branch for this scan. Commonly a long-lived branch, e.g. "main" or "master".
2733
3642 command : <<include(scripts/export-git-branches.sh)>>
3743 - run :
3844 name : Analyze code <<#parameters.full_scan>>full<</parameters.full_scan>><<^parameters.full_scan>>diff<</parameters.full_scan>>
45+ working_directory : <<parameters.root_dir>>
3946 environment :
4047 PARAM_BOOL_FULL_SCAN : <<parameters.full_scan>>
4148 PARAM_BOOL_VERBOSE : <<parameters.verbose>>
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ description: >
44executor : node
55
66parameters :
7+ root_dir :
8+ type : string
9+ default : " ."
10+ description : >
11+ The root of the codebase to analyze. Defaults to . (working directory).
712 verbose :
813 type : boolean
914 default : false
1924 - checkout
2025 - analyze_code :
2126 full_scan : true
27+ root_dir : <<parameters.root_dir>>
2228 verbose : <<parameters.verbose>>
2329 rules : <<parameters.rules>>
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ echo " Starting codebase analysis at root directory: ${PWD} "
4+
35# The `experimental` flag is needed for Semgrep to work, otherwise
46# for unknown reason it will fail with exit code 2. This behavior
57# is only observed in CI environment.
You can’t perform that action at this time.
0 commit comments