Skip to content

Commit d005e86

Browse files
Dwayne BaileyDwayne Bailey
authored andcommitted
Use 'yarn audit' for security checks
nsp has been retired and 'npm audit' is the recommended alternative. Since yarnpkg/yarn#6409 yarn v1.12.0 has an audit capability. Use that instead.
1 parent 3f112ba commit d005e86

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/uk/gov/hmcts/contino/YarnBuilder.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class YarnBuilder extends AbstractBuilder {
8282
}
8383

8484
def securityCheck() {
85-
yarn("test:nsp")
85+
yarn("audit")
8686
}
8787

8888
@Override

test/uk/gov/hmcts/contino/YarnBuilderTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ class YarnBuilderTest extends Specification {
7777
1 * steps.sh({ it.startsWith(YARN_CMD) && it.contains('test:mutation') })
7878
}
7979

80-
def "securityCheck calls 'yarn test:nsp'"() {
80+
def "securityCheck calls 'yarn audit'"() {
8181
when:
8282
builder.securityCheck()
8383
then:
84-
1 * steps.sh({ GString it -> it.startsWith(YARN_CMD) && it.contains('test:nsp') })
84+
1 * steps.sh({ GString it -> it.startsWith(YARN_CMD) && it.contains('audit') })
8585
}
8686

8787
def "full functional tests calls 'yarn test:fullfunctional'"() {

0 commit comments

Comments
 (0)