Skip to content

Commit 6683a2a

Browse files
authored
Merge pull request #769 from govuk-one-login/bau-npm-audit
BAU remove audit npm hook, add dependency review action
2 parents d3302cf + 89cc95e commit 6683a2a

4 files changed

Lines changed: 22 additions & 13 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Dependency Review"
2+
on:
3+
pull_request:
4+
merge_group:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
dependency-review:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
with:
16+
- persist-credentials: false
17+
- name: Dependency Review
18+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
19+
with:
20+
- fail-on-severity: moderate

.pre-commit-config.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ repos:
2525
args: ["--baseline", ".secrets.baseline"]
2626
stages: [pre-commit]
2727

28-
- repo: local
29-
hooks:
30-
- id: package-audit-check
31-
name: Check dependencies
32-
entry: npm run audit
33-
language: system
34-
exclude: .*
35-
always_run: true
36-
pass_filenames: false
37-
stages: [pre-commit]
38-
3928
- repo: local
4029
hooks:
4130
- id: check-types

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,6 @@
119119
"run:all": "bash solutions/localstack/provision.sh && RUN_ALL=1 concurrently 'npm run run:frontend' 'npm run run:stubs' 'npm run run:api' 'npm run watch:config-schema' --kill-others",
120120
"config:validate": "for f in solutions/config/*.json; do (jsonschema validate solutions/config/schema/config.json $f) || exit 1; done",
121121
"api-specs:validate": "redocly lint solutions/**/open-api-spec.yaml",
122-
"audit": "npm audit --audit-level=moderate && npm audit signatures && cd solutions/integration-tests && npm run audit"
122+
"audit": "npm audit --audit-level=moderate --omit=dev && npm audit signatures && cd solutions/integration-tests && npm run audit"
123123
}
124124
}

solutions/integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:ui": "npm ci && run-p test:ui:*",
1717
"test:ui:watch": "npm run watch",
1818
"test:ui:run": "playwright test --ui",
19-
"audit": "npm audit --audit-level=moderate && npm audit signatures"
19+
"audit": "npm audit --audit-level=moderate --omit=dev && npm audit signatures"
2020
},
2121
"devDependencies": {
2222
"@aws-lambda-powertools/parameters": "^2.33.0",

0 commit comments

Comments
 (0)