Skip to content

Commit a4cc1fa

Browse files
committed
Update semgrep
1 parent 0ac2d47 commit a4cc1fa

File tree

2 files changed

+14
-62
lines changed

2 files changed

+14
-62
lines changed

.circleci/config.yml

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ aliases:
77
- image: cimg/android:2024.01
88
resource_class: large
99

10-
# === Scheduled Pipeline Parameters ===
11-
parameters:
12-
nightly-security-scan:
13-
type: boolean
14-
default: false
15-
1610
jobs:
1711
run-unit-test-and-build:
1812
<<: *environment
@@ -105,67 +99,12 @@ jobs:
10599
--device model=flame,version=29,locale=en,orientation=portrait \
106100
--device model=flame,version=30,locale=en,orientation=portrait \
107101
108-
scan-sast-pr:
109-
parameters:
110-
default_branch:
111-
type: string
112-
default: main
113-
environment:
114-
SEMGREP_REPO_URL: << pipeline.project.git_url >>
115-
SEMGREP_BRANCH: << pipeline.git.branch >>
116-
SEMGREP_BASELINE_REF: << parameters.default_branch >>
117-
docker:
118-
- image: returntocorp/semgrep
119-
resource_class: large
120-
steps:
121-
- checkout
122-
- run:
123-
name: "Semgrep diff scan"
124-
command: semgrep ci
125-
126-
scan-sast-full:
127-
parameters:
128-
default_branch:
129-
type: string
130-
default: main
131-
environment:
132-
SEMGREP_REPO_URL: << pipeline.project.git_url >>
133-
SEMGREP_BRANCH: << pipeline.git.branch >>
134-
docker:
135-
- image: returntocorp/semgrep
136-
resource_class: large
137-
steps:
138-
- checkout
139-
- run:
140-
name: "Semgrep full scan"
141-
command: semgrep ci
142102
workflows:
143103
main:
144-
when:
145-
not: << pipeline.parameters.nightly-security-scan >>
146104
jobs:
147-
- scan-sast-pr:
148-
context:
149-
- security-tools
150-
- circleci
151-
- scan-sast-full:
152-
filters:
153-
# ignore any commit on any branch by default
154-
branches:
155-
ignore: /.*/
156-
tags:
157-
only: /^v\d+\.\d+\.\d+(?:-\w+){0,1}$/
158105
- run-unit-test-and-build:
159106
context:
160107
- frontend-deploy
161108
- run-ui-test:
162109
requires:
163-
- run-unit-test-and-build
164-
165-
scheduled-security-scan:
166-
when: << pipeline.parameters.nightly-security-scan >>
167-
jobs:
168-
- scan-sast-full:
169-
context:
170-
- security-tools
171-
- circleci
110+
- run-unit-test-and-build
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: security-scan-sast
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '40 2 * * *'
8+
9+
jobs:
10+
scan:
11+
uses: verygood-ops/cicd-shared/.github/workflows/security-scan-sast.yaml@security-scan-sast-v1
12+
secrets:
13+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}

0 commit comments

Comments
 (0)