Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAT-16650 Automate OWASP scanner- edit summary Automate OWASP scanner #224

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/owasp-scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: OWASP Scanner

on:
workflow_call:
inputs:
repository:
description: 'Repository to scan'
required: false
type: string
default: 'liquibase'
branch:
description: 'Branch to scan'
required: true
type: string
workflow_dispatch:
inputs:
repository:
description: 'Repository to scan'
required: false
type: string
default: 'liquibase'
branch:
description: 'Branch to scan'
required: true
type: string


jobs:
scan:
runs-on: ubuntu-22.04
steps:

- name: Checkout code
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.branch }}

- name: Set up Java for publishing to GitHub Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v22
with:
repositories: |
[
{
"id": "liquibase",
"url": "https://maven.pkg.github.com/liquibase/liquibase",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
},
{
"id": "liquibase-pro",
"url": "https://maven.pkg.github.com/liquibase/liquibase-pro",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
}
]
servers: |
[
{
"id": "liquibase-pro",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
},
{
"id": "liquibase",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
}
]

- name: Run the scanner
id: run_owasp
run: mvn org.owasp:dependency-check-maven:aggregate -DnvdApiKey=${{ secrets.NVD_API_KEY }} -DfailOnError=true

- name: Upload OWASP Dependency-Check results
if: always()
uses: actions/upload-artifact@v4
with:
name: owasp-dependency-check
path: ./target/dependency-check-report.html