Commit ce3f32fc authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

CI: Enable full semgrep scan on develop (#2760)

This enables full semgrep scans on develop while retaining
incremental scans on PR branches. This should help with the
baseline stats + showing fixed commits.
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 14dd80f3
...@@ -506,8 +506,7 @@ jobs: ...@@ -506,8 +506,7 @@ jobs:
type: string type: string
default: develop default: develop
environment: environment:
# Scan changed files in PRs, block on new issues only (existing issues ignored) TEMPORARY_BASELINE_REF: << parameters.diff_branch >>
SEMGREP_BASELINE_REF: << parameters.diff_branch >>
SEMGREP_REPO_URL: << pipeline.project.git_url >> SEMGREP_REPO_URL: << pipeline.project.git_url >>
SEMGREP_BRANCH: << pipeline.git.branch >> SEMGREP_BRANCH: << pipeline.git.branch >>
SEMGREP_COMMIT: << pipeline.git.revision >> SEMGREP_COMMIT: << pipeline.git.revision >>
...@@ -520,6 +519,16 @@ jobs: ...@@ -520,6 +519,16 @@ jobs:
resource_class: xlarge resource_class: xlarge
steps: steps:
- checkout - checkout
- unless:
condition:
equal: [ "develop", << pipeline.git.branch >>]
steps:
- run:
# Scan changed files in PRs, block on new issues only (existing issues ignored)
# Do a full scan when scanning develop, otherwise do an incremental scan.
name: "Conditionally set BASELINE env var"
command: |
echo 'export SEMGREP_BASELINE_REF=${TEMPORARY_BASELINE_REF}' >> $BASH_ENV
- run: - run:
name: "Set environment variables" # for PR comments and in-app hyperlinks to findings name: "Set environment variables" # for PR comments and in-app hyperlinks to findings
command: | command: |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment