Add PURL validation support (Issue #17)#20
Conversation
e014ff4 to
7679961
Compare
|
Update: I have rebased this PR on top of #23 and pushed the latest changes. I also ran QC checks (go test ./..., go test -race ./..., go vet ./..., gofmt -l .) and everything is passing on this branch. |
|
I merged 23, can you rebase on top of it now that it's on main? Thanks! |
|
✅ Rebased and tested This PR has been rebased on the latest main branch and all tests pass. Test Results:
Ready for review and merge. |
7679961 to
33a0dab
Compare
|
✅ Fixed - Complete commit with ruleset entries Thanks for the feedback on PR #19. I've now applied the same fix to this PR: What I did:
Result:
The commit now includes both the rule implementations AND their ruleset registration, making it a complete, buildable change. |
33a0dab to
040c5a7
Compare
|
✅ Fixed - Sequential rule numbering applied Applied Martin's feedback on sequential numbering: Changes:
What's included:
Ready for review with correct rule numbering! |
Add validation rules for Package URLs (PURLs) in preparation for PURL support in CVE schema. New validation rules: - E013: CheckPurlFormat - validates PURL strings follow the specification - E014: CheckPurlConsistency - ensures PURL data matches component information Features: - Full PURL format validation using packageurl-go library - Support for checking PURLs in components and affected sections - Verification that PURL namespace/name match component data - Comprehensive test coverage including qualified URLs - Proper error reporting with context Per CVE schema PR #407: - PURLs provide standardized package identification - Format validation ensures data quality - Consistency checks prevent mismatches Fixes mprpic#17
040c5a7 to
332e947
Compare
|
✅ READY TO MERGE - Updated for upstream/main Fixed for current upstream/main state which has Unicode as E020: Current state:
Rule numbering after merge:
Ready for merge! |
Summary
This PR adds validation for Package URLs (PURLs) in preparation for PURL support being added to the CVE schema. PURLs provide a standardized way to identify packages and their locations.
Impact Analysis
Testing Results (Full CVE dataset: 340,652 files):
This PR is proactive, preparing cvelint for when PURLs are introduced in the CVE schema per PR #407.
Changes
New Validation Rules
Features
PURL Validation Includes
pkg:npm/lodash@4.17.21?arch=x86_64)Testing
References