Skip to content

Commit

Permalink
Change go list command
Browse files Browse the repository at this point in the history
  • Loading branch information
marians committed Oct 31, 2023
1 parent cf786fc commit b8f0692
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Prevent false positives in nancy's vulnerability reports by using `go list` with `-deps ./...`

## [4.33.0] - 2023-10-10

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/commands/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ steps:
name: Check if dependencies have known security vulnerabilities
command: |
set +e
CGO_ENABLED=0 go list -json -m all | nancy sleuth --skip-update-check --quiet --exclude-vulnerability-file ./.nancy-ignore --additional-exclude-vulnerability-files ./.nancy-ignore.generated 2>&1 | tee ./nancy-results.txt ; nancy_result=(${PIPESTATUS[1]})
CGO_ENABLED=0 go list -json -deps ./... | nancy sleuth --skip-update-check --quiet --exclude-vulnerability-file ./.nancy-ignore --additional-exclude-vulnerability-files ./.nancy-ignore.generated 2>&1 | tee ./nancy-results.txt ; nancy_result=(${PIPESTATUS[1]})
grep -q 'error accessing OSS Index' nancy-results.txt; grep_result=$?
set -e
# If nancy gave us a bad exit code AND grep found an OSS index error in the output, then we don't fail the build.
Expand Down

0 comments on commit b8f0692

Please sign in to comment.