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

Fix CVE scanning #2561

Merged
merged 5 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
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
21 changes: 19 additions & 2 deletions .github/workflows/cve-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: CVE Scanning for Maven
on:
workflow_dispatch:
push:
branches:
- master
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filter push events on master to prevent triggering CVE scanning twice.

The triggers now work as follows:

  • The pull_request event makes sure that PRs must always succeed CVE scanning.
  • The push event filtered on master will run CVE scanning on the master branch every time that it changes, as an additional check.

paths:
- 'pom.xml'
- 'allow-list.xml'
Expand All @@ -14,7 +16,7 @@ on:
- '.github/workflows/cve-scanning.yml'

jobs:
build:
depcheck:

runs-on: ubuntu-latest

Expand All @@ -29,4 +31,19 @@ jobs:
- name: Build with Maven
run: mvn clean install -DskipTests
- name: CVE scanning
run: mvn org.owasp:dependency-check-maven:check -DfailBuildOnCVSS=7 -DsuppressionFile="allow-list.xml"
uses: dependency-check/Dependency-Check_Action@1.1.0
env:
JAVA_HOME: /opt/jdk
with:
project: 'Common Domain Model'
path: '.'
format: 'HTML'
out: 'reports'
args: >
--suppression allow-list.xml
--failOnCVSS 7
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: CVE Scan Report
path: ${{github.workspace}}/reports
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ venv/
# Docusaurus website
website/.docusaurus
website/build
website/node_modules
website/node_modules

# CVE scan reports
/reports/