Skip to content

Commit a5db806

Browse files
committed
switch to --exclude flag
1 parent f3ad0bd commit a5db806

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/action-run-semgrep.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ env:
5757
auto
5858
p/ci
5959
r/yaml.github-actions
60-
${{ runner.temp }}/saleor-rules/yaml
61-
${{ runner.temp }}/saleor-rules/typescript
60+
./saleor-rules/yaml
61+
./saleor-rules/typescript
6262
# yaml.github-actions.[...].run-shell-injection is duplicate of saleor-rules.yaml.github-actions.script-injection
6363
DEFAULT_EXCLUDE_RULE_IDS: |
6464
yaml.github-actions.security.run-shell-injection.run-shell-injection
@@ -102,9 +102,7 @@ jobs:
102102
# Note: the directory name will be used for rule IDs
103103
# (e.g., saleor-rules.typescript.my-check).
104104
# Thus avoid changing the path and ensure the name is meaningful.
105-
# NOTE: this needs to be outside ./ otherwise Semgrep will scan that folder
106-
# as well.
107-
path: ${{ runner.temp }}/saleor-rules
105+
path: ./saleor-rules
108106
set-safe-directory: false
109107

110108
- name: Run Semgrep Rules
@@ -128,6 +126,9 @@ jobs:
128126
# 'git add --force' from being silently ignored, thus forcing
129127
# the users to be explicit.
130128
"--no-git-ignore"
129+
# Prevents Semgrep from scanning the repo 'saleor/semgrep-rules' as it
130+
# can cause unrelated findings
131+
"--exclude=./saleor-rules/"
131132
)
132133
133134
# Add extra logging if the runner was run with debug logging.

0 commit comments

Comments
 (0)