Skip to content

Commit 29f6029

Browse files
committed
feat: pull backend zap scan out of dev deployment
Our security people want to be able to receive a scan for other environments, so here we go
1 parent 90f2247 commit 29f6029

2 files changed

Lines changed: 54 additions & 19 deletions

File tree

.github/workflows/deploy-to-openshift-backend-dev.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -209,22 +209,6 @@ jobs:
209209
210210
zap:
211211
name: Run Zap Scan
212-
permissions:
213-
contents: read
214-
needs: openshift-ci-cd
215-
runs-on: ubuntu-24.04
216-
environment: dev
217-
steps:
218-
- name: Check out repository with branch [${{ env.BRANCH }}]
219-
uses: actions/checkout@v4
220-
with:
221-
ref: ${{ env.BRANCH }}
222-
persist-credentials: false
223-
- name: ZAP Scan
224-
uses: zaproxy/action-full-scan@v0.13.0
225-
with:
226-
target: "https://${{ secrets.SITE_URL }}/api"
227-
artifact_name: ccof_backend_zap
228-
fail_action: true # fail the job if alerts found
229-
allow_issue_writing: false # don't open/update a GitHub Issue
230-
rules_file_name: .zap/rules-backend.tsv
212+
uses: bcgov/EDUC-CCOF/.github/workflows/zap-scan-node.yml
213+
with:
214+
env: 'dev'
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Zap Scan Node
2+
3+
env:
4+
BRANCH: ${{ github.ref_name }}
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
env:
10+
description: 'The openshift environment to scan'
11+
default: 'dev'
12+
options:
13+
- 'dev'
14+
- 'qa'
15+
- 'uat'
16+
- 'efx'
17+
- 'prod'
18+
workflow_call:
19+
inputs:
20+
env:
21+
description: 'The openshift environment to scan'
22+
default: 'dev'
23+
options:
24+
- 'dev'
25+
- 'qa'
26+
- 'uat'
27+
- 'efx'
28+
- 'prod'
29+
30+
jobs:
31+
zap:
32+
name: Run Zap Scan
33+
permissions:
34+
contents: read
35+
needs: openshift-ci-cd
36+
runs-on: ubuntu-24.04
37+
environment: ${{ inputs.env }}
38+
steps:
39+
- name: Check out repository with branch [${{ env.BRANCH }}]
40+
uses: actions/checkout@v4
41+
with:
42+
ref: ${{ env.BRANCH }}
43+
persist-credentials: false
44+
- name: ZAP Scan
45+
uses: zaproxy/action-full-scan@v0.13.0
46+
with:
47+
target: "https://${{ secrets.SITE_URL }}/api"
48+
artifact_name: ccof_backend_${{ inputs.env }}
49+
fail_action: true # fail the job if alerts found
50+
allow_issue_writing: false # don't open/update a GitHub Issue
51+
rules_file_name: .zap/rules-backend.tsv

0 commit comments

Comments
 (0)