Skip to content

Commit

Permalink
updated target and custom field
Browse files Browse the repository at this point in the history
  • Loading branch information
araya authored and araya committed Jul 12, 2023
1 parent ab8a86e commit 1e32219
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions .github/workflows/zap-scan.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@

name: OWASP Zap Scan and Report
on:
workflow_run:
workflows:
- "Deploy"
types:
- completed
push:
branches: [ zap-integration ]
schedule:
- cron: '0 4 * * *' # run every day at midnight

permissions:
id-token: write
jobs:
Zap_scan:
name: Run Zap Scan for PR
runs-on: ubuntu-latest
needs: Deploy.build
steps:
- name: Checkout
uses: actions/checkout@v2

- id: endpoint
run: echo ::set-output name=application_endpoint::$(./output.sh ui ApplicationEndpointUrl $STAGE_PREFIX$branch_name)
working-directory: services

- name: OWASP ZAP Baseline Scan
continue-on-error: true
uses: zaproxy/action-baseline@v0.3.0
with:
target: "${{ steps.endpoint.outputs.application_endpoint }}"

Zap_nightly_run:
name: Zap Nightly Run (for nightly cron with JIRA)
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'push'

steps:
- name: Checkout
Expand All @@ -43,7 +22,7 @@ jobs:
continue-on-error: true
uses: zaproxy/action-baseline@v0.7.0
with:
target: "https://dt3cnrknndcdb.cloudfront.net/"
target: "https://d4m0mp24tl7ig.cloudfront.net/"

- name: Parse Zap output and create Jira tickets
uses: Enterprise-CMCS/macfc-security-scan-report@v1.0.2
Expand All @@ -53,7 +32,7 @@ jobs:
jira-host: 'qmacbis.atlassian.net'
jira-project-key: 'MDCT'
jira-issue-type: 'Task'
jira-custom-field-key-value: '{ "customfield_10007" : "MDCT-2280" }'
jira-custom-field-key-value: '{ "customfield_10007" : "MDCT-2280", "customfield_14154" : "MCR" }'
jira-labels: 'MCR,zap'
jira-title-prefix: '[MCR] - Zap :'
zap-risk-code: '2'
Expand Down

0 comments on commit 1e32219

Please sign in to comment.