Add "fail" compliance action, fixes #4388 - #4560
Conversation
Signed-off-by: zilosz <mfecko@purdue.edu>
|
Based on the discussions we've had about this one, I think we should update the python cataloger to fix the bug where it's not returning packages without versions, so these can be later handled by the compliance rules. If we update this PR with that one known issue, I think it solves the problem raised in the issue #4388, and we can have follow-on issues for any other catalogers we might find that didn't properly get updated for compliance handling. There was further discussion about packages without names, but I think this is still an "it depends on the cataloger" decision: if we can give the user enough information to determine where this completely blank package came from where we were actually expecting a package name, we should probably return it, which for JSON might require a future go version with stdlib's JSON v2 to return file and line numbers. Other things like a blank line in requrements.txt probably shouldn't qualify for this as an example. For these other changes, they should probably be follow-ons also, not part of this PR. Let me know if any of that is unclear; I think the python change mostly solves your use case, as I understood it. |
|
For now, I've just modified the requirements.txt parser to emit packages with missing versions, since that's what the original issue focused on. I did notice that other Python parsers such as parse_setup.go also explicitly handle missing versions instead of emitting full packages, so perhaps I could fix that in another PR. I also think it would be a good idea to fix other catalogers through separate issues. |
There was a problem hiding this comment.
Warning
Changes github configuration or dependencies — this requires manual review from @anchore/tools
No action from the PR author is needed.
Guarded files touched in this PR:
.github/actions/bootstrap/action.yaml(sha:6e8aa90ef8af3e0af7d5cbca143566ad486fe601)
This review disposition can be dismissed after manual review.
Signed-off-by: zilosz <mfecko@purdue.edu>
Signed-off-by: zilosz <mfecko@purdue.edu>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com> Signed-off-by: zilosz <mfecko@purdue.edu>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com> Signed-off-by: zilosz <mfecko@purdue.edu>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: willmurphyscode <12529630+willmurphyscode@users.noreply.github.com> Signed-off-by: zilosz <mfecko@purdue.edu>
* chore: new slack action Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> * TEMP: exit 1 to test slack notify Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> * new slack integration everywhere Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> --------- Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> Signed-off-by: zilosz <mfecko@purdue.edu>
* ci: enable zizmor to fail PRs Enable zizmor (gh actions yaml linter) to fail builds in PRs. Fix any outstanding linting errors found by this tool. Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> * fix outdated version comments Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> --------- Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> Signed-off-by: zilosz <mfecko@purdue.edu>
Bumps the go-minor-patch group with 1 update in the / directory: [github.com/spdx/tools-golang](https://github.com/spdx/tools-golang). Updates `github.com/spdx/tools-golang` from 0.5.6 to 0.5.7 - [Release notes](https://github.com/spdx/tools-golang/releases) - [Changelog](https://github.com/spdx/tools-golang/blob/main/RELEASE-NOTES.md) - [Commits](spdx/tools-golang@v0.5.6...v0.5.7) --- updated-dependencies: - dependency-name: github.com/spdx/tools-golang dependency-version: 0.5.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: zilosz <mfecko@purdue.edu>
Signed-off-by: zilosz <mfecko@purdue.edu>
Signed-off-by: zilosz <mfecko@purdue.edu>
Signed-off-by: zilosz <mfecko@purdue.edu>
2190bad to
5bcb653
Compare
|
I worked on this PR for the first time in a while and ended up polluting the commit history. Cleaner PR is now #5231 |
|
Closing now. |
Description
Fixes #4388
Adds a
failcompliance action for missing package names and versions. When configured, Syft will throw an error and abort the SBOM generation process instead of continuing.In addition to existing actions, the
missing-nameandmissing-versionconfig options undercompliancenow acceptfail(with aliaserror).Type of change
Checklist