Skip to content

Commit

Permalink
feat: scheduled penetration tests (#1463)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Oct 5, 2023
1 parent dfeb8f8 commit f766116
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
parameters:
-p ZONE=test -p NAME=${{ github.event.repository.name }}
${{ matrix.parameters }}
penetration_test: true
name: ${{ matrix.name }}
penetration_test_token: ${{ secrets.GITHUB_TOKEN }}
verification_path: ${{ matrix.verification_path }}
Expand Down Expand Up @@ -179,7 +178,6 @@ jobs:
parameters:
-p ZONE=prod -p NAME=${{ github.event.repository.name }}
${{ matrix.parameters }}
penetration_test: false
verification_path: ${{ matrix.verification_path }}

cleanup-prod:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pentests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Penetration Tests

on:
schedule: [cron: "0 11 * * 6"] # 3 AM PST = 12 PM UDT, Saturdays
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
zap_scan:
runs-on: ubuntu-latest
name: Penetration Tests
env:
DOMAIN: apps.silver.devops.gov.bc.ca
PREFIX: ${{ github.event.repository.name }}-test
strategy:
matrix:
name: [backend, frontend]
steps:
- name: ZAP Scan
uses: zaproxy/[email protected]
with:
allow_issue_writing: true
artifact_name: "zap_${{ matrix.name }}"
cmd_options: "-a"
issue_title: "ZAP: ${{ matrix.name }}"
target: https://${{ env.PREFIX }}-${{ matrix.name }}.${{ env.DOMAIN }}s
1 change: 0 additions & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ jobs:
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: ${{ matrix.overwrite }}
penetration_test: false
parameters:
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }}
${{ matrix.parameters }}
Expand Down

0 comments on commit f766116

Please sign in to comment.