diff --git a/.github/workflows/pentests.yml b/.github/workflows/pentests.yml new file mode 100644 index 00000000..c5418af5 --- /dev/null +++ b/.github/workflows/pentests.yml @@ -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: + name: Penetration Tests + env: + DOMAIN: apps.silver.devops.gov.bc.ca + PREFIX: ${{ github.event.repository.name }}-test + runs-on: ubuntu-latest + strategy: + matrix: + component: [backend, frontend] + steps: + - name: ZAP Scan + uses: zaproxy/action-full-scan@v0.7.0 + with: + allow_issue_writing: true + artifact_name: "zap_${{ matrix.component }}" + cmd_options: "-a" + issue_title: "ZAP: ${{ matrix.component }}" + target: https://${{ env.PREFIX }}-${{ matrix.component }}.${{ env.DOMAIN }} diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 075fd621..0398b982 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -1,4 +1,4 @@ -name: Pull Request Closed +name: PR Closed on: pull_request: diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index bfbee040..5a1c59e2 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -1,4 +1,4 @@ -name: Pull Request +name: PR on: pull_request: @@ -31,7 +31,7 @@ jobs: Thanks for the PR! Any successful deployments (not always required) will be available below. - [Backend](https://${{ env.PREFIX }}-backend.${{ env.DOMAIN }}) + [Backend](https://${{ env.PREFIX }}-backend.${{ env.DOMAIN }}/actuator/health) [Frontend](https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}) Once merged, code will be promoted and handed off to following workflow run.