Skip to content

Add OWASP scanning to CI #599

Add OWASP scanning to CI

Add OWASP scanning to CI #599

Workflow file for this run

name: Pull request
on: pull_request
jobs:
build:
name: Pull request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Depcheck
uses: dependency-check/Dependency-Check_Action@main
id: Depcheck
with:
project: 'nhsuk-frontend'
path: '.'
format: 'HTML'
out: 'reports'
args: >
--failOnCVSS 7
--nodePackageSkipDevDependencies
--nodeAuditSkipDevDependencies
--suppression owasp-dependency-check-suppressions.xml
- name: Upload OWAPS results
uses: actions/upload-artifact@master
with:
name: Depcheck report
path: ${{github.workspace}}/reports
- name: Sonar analysis
uses: sonarsource/sonarcloud-github-action@master
with:
projectBaseDir: .
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: Run linting
run: npm run lint
- name: Run tests
run: npm test
- name: Run backstop
run: npm run backstop:ci