Skip to content

Commit

Permalink
Merge pull request #195 from anchore/fix-acceptance-test-workflow
Browse files Browse the repository at this point in the history
Syft version bump, and improvements to acceptance workflows
  • Loading branch information
luhring authored Nov 5, 2020
2 parents 5725f26 + 5d21595 commit 111c9f8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/acceptance-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}-
${{ runner.os }}-go-${{ env.GO_VERSION }}-
- name: Bootstrap project dependencies
if: steps.bootstrap-cache.outputs.cache-hit != 'true'
run: make bootstrap

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
Expand All @@ -61,6 +65,15 @@ jobs:
name: artifacts
path: snapshot/**/*

- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,workflow,job,commit,message,author
text: The grype acceptance tests have failed tragically!
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
if: ${{ failure() }}


# TODO: add basic acceptance tests against snapshot artifacts

Expand Down Expand Up @@ -89,3 +102,12 @@ jobs:

- name: Compare Anchore inline-scan results against snapshot build output
run: make compare-snapshot

- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,workflow,job,commit,message,author
text: The grype acceptance tests have failed tragically!
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
if: ${{ failure() }}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/anchore/go-version v1.2.2-0.20200810141238-330bef18dbca
github.com/anchore/grype-db v0.0.0-20200929200644-6d1c82acc95e
github.com/anchore/stereoscope v0.0.0-20200925184903-c82da54e98fe
github.com/anchore/syft v0.4.0
github.com/anchore/syft v0.5.1
github.com/docker/docker v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible
github.com/dustin/go-humanize v1.0.0
github.com/facebookincubator/nvdtools v0.1.4-0.20200622182922-aed862a62ae6
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ github.com/anchore/stereoscope v0.0.0-20200925184903-c82da54e98fe h1:m4NSyTo2fVU
github.com/anchore/stereoscope v0.0.0-20200925184903-c82da54e98fe/go.mod h1:2Jja/4l0zYggW52og+nn0rut4i+OYjCf9vTyrM8RT4E=
github.com/anchore/syft v0.4.0 h1:Qt9il5QBkFeMAkxEnaIV0VjDtnHP1DdTcA39TfSlZWs=
github.com/anchore/syft v0.4.0/go.mod h1:fxzECHyEWfAZ06gJVyrKK+DEkLJeJ4PrK7eyPAwqJR0=
github.com/anchore/syft v0.5.1 h1:yQmAojroms/UpylaAlFAAKmzuKlTLy8U6YljI324PwU=
github.com/anchore/syft v0.5.1/go.mod h1:yvflCO2nhspj6+I2BP25HqLWn1MM6aQ6EROGbmPxjIU=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
Expand Down Expand Up @@ -161,6 +163,8 @@ github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAw
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/bmatcuk/doublestar v1.3.1 h1:rT8rxDPsavp9G+4ZULzqhhUSaI/OPsTZNG88Z3i0xvY=
github.com/bmatcuk/doublestar v1.3.1/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
github.com/bmatcuk/doublestar v1.3.3 h1:pVP1d49CcQQaNOl+PI6sPybIrIOD/6sux31PFdmhTH0=
github.com/bmatcuk/doublestar v1.3.3/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U=
github.com/bombsimon/wsl/v2 v2.2.0/go.mod h1:Azh8c3XGEJl9LyX0/sFC+CKMc7Ssgua0g+6abzXN4Pg=
github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc=
Expand Down
4 changes: 3 additions & 1 deletion grype/vulnerability/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ func githubJavaNamer(p *pkg.Package) []string {
names.Add(fmt.Sprintf("%s:%s", metadata.PomProperties.GroupID, metadata.PomProperties.ArtifactID))

if metadata.Manifest != nil {
names.Add(fmt.Sprintf("%s:%s", metadata.PomProperties.GroupID, metadata.Manifest.Name))
if name, ok := metadata.Manifest.Main["Name"]; ok {
names.Add(fmt.Sprintf("%s:%s", metadata.PomProperties.GroupID, name))
}
}
}
}
Expand Down

0 comments on commit 111c9f8

Please sign in to comment.