Repository navigation
fix(validation): disallow actor type TOOL for package supplier and originator (#848) - #911
Open
ShivanshhhG wants to merge 1 commit into
Open
ShivanshhhG wants to merge 1 commit into
ShivanshhhG wants to merge 1 commit into
Conversation
SPDX 2.2 and 2.3 clauses 7.5 and 7.6 disallow TOOL as an actor type for package supplier and originator. This adds validation ensuring that neither supplier nor originator is of type TOOL and delegates actor validation to validate_actor. Signed-off-by: SHIVANSH-ux-ys <singaser78@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SPDX 2.2 and 2.3 clauses 7.5 (Package Supplier) and 7.6 (Package Originator) specify that supplier and originator fields may only be
NOASSERTION,Person, orOrganization, explicitly prohibitingTool:. Previously,validate_packagedid not validatesupplierororiginator, allowing packages with aTool:actor to pass validation silently without detection (#848).Changes
package_validator.py:package.supplierorpackage.originatoris anActorwithactor_type == ActorType.TOOL, emitting aValidationMessagewhen detected.validate_actor.test_package_validator.py:test_invalid_package_actor_toolasserting thatActorType.TOOLonsupplierandoriginatortriggers validation errors.test_valid_package_supplier_and_originatorverifyingPerson,Organization,NOASSERTION, andNoneremain valid.Fixes #848