Skip to content

Commit

Permalink
Use 'yarn audit' for security checks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dwayne Bailey authored and Dwayne Bailey committed Oct 6, 2018
1 parent 3f112ba commit d005e86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/uk/gov/hmcts/contino/YarnBuilder.groovy
Expand Up @@ -82,7 +82,7 @@ class YarnBuilder extends AbstractBuilder {
}

def securityCheck() {
yarn("test:nsp")
yarn("audit")
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions test/uk/gov/hmcts/contino/YarnBuilderTest.groovy
Expand Up @@ -77,11 +77,11 @@ class YarnBuilderTest extends Specification {
1 * steps.sh({ it.startsWith(YARN_CMD) && it.contains('test:mutation') })
}

def "securityCheck calls 'yarn test:nsp'"() {
def "securityCheck calls 'yarn audit'"() {
when:
builder.securityCheck()
then:
1 * steps.sh({ GString it -> it.startsWith(YARN_CMD) && it.contains('test:nsp') })
1 * steps.sh({ GString it -> it.startsWith(YARN_CMD) && it.contains('audit') })
}

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

0 comments on commit d005e86

Please sign in to comment.