Skip to content

Commit 8566dc8

Browse files
authored
Merge pull request #460 from NHSDigital/feature/eja-eli-434-adding-owasp-dependency-scan
Feature/eja eli 434 adding owasp dependency scan
2 parents 90b7250 + ebc6e5b commit 8566dc8

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "OWASP Dependency Scan"
2+
description: "Scan dependencies for known vulnerabilities using OWASP Dependency-Check"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: "Run OWASP Dependency-Check"
7+
uses: dependency-check/Dependency-Check_Action@main
8+
id: Depcheck
9+
with:
10+
project: "eligibility-signposting-api"
11+
path: "."
12+
format: "SARIF"
13+
out: "reports"
14+
args: >
15+
--failOnCVSS 7
16+
--enableRetired
17+
- name: "Upload OWASP results to GitHub Security tab"
18+
uses: github/codeql-action/upload-sarif@v3
19+
with:
20+
sarif_file: reports/dependency-check-report.sarif

.github/workflows/stage-1-commit.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ jobs:
8989
checkov-terraform:
9090
name: "Checkov Terraform"
9191
runs-on: ubuntu-latest
92+
permissions:
93+
contents: read
94+
security-events: write
9295
timeout-minutes: 3
9396
steps:
9497
- name: "Checkout code"
@@ -100,11 +103,10 @@ jobs:
100103
soft_fail: false
101104
output_format: sarif
102105
output_file_path: checkov-report.sarif
103-
- name: Upload Checkov results to GitHub Security tab
104-
uses: actions/upload-artifact@v5
106+
- name: "Upload Checkov results to GitHub Security tab"
107+
uses: github/codeql-action/upload-sarif@v3
105108
with:
106-
name: checkov_results
107-
path: checkov-report.sarif
109+
sarif_file: checkov-report.sarif
108110
count-lines-of-code:
109111
name: "Count lines of code"
110112
runs-on: ubuntu-latest
@@ -143,3 +145,15 @@ jobs:
143145
idp_aws_report_upload_region: "${{ secrets.IDP_AWS_REPORT_UPLOAD_REGION }}"
144146
idp_aws_report_upload_role_name: "${{ secrets.IDP_AWS_REPORT_UPLOAD_ROLE_NAME }}"
145147
idp_aws_report_upload_bucket_endpoint: "${{ secrets.IDP_AWS_REPORT_UPLOAD_BUCKET_ENDPOINT }}"
148+
owasp-dependency-scan:
149+
name: "OWASP Dependency Scan"
150+
runs-on: ubuntu-latest
151+
permissions:
152+
contents: read
153+
security-events: write
154+
timeout-minutes: 5
155+
steps:
156+
- name: "Checkout code"
157+
uses: actions/checkout@v5
158+
- name: "Run OWASP Dependency Scan"
159+
uses: ./.github/actions/owasp-dependency-scan

0 commit comments

Comments
 (0)