π fix(ci): preserve leading slash in ZAP SARIF artifact URIs so root scans validate#405
Merged
Merged
Conversation
β¦scans validate GHAS Code Scanning rejects SARIF results with an empty artifactLocation.uri (error: locationFromSarifResult: expected artifact location). The root URL http://localhost:3333/ produced pathname '/' which, after stripping the leading slash, became ''. Keep the leading slash so root scans emit uri='/' and all other paths emit '/foo' β both are valid absolute-path-references per RFC 3986 Β§4.2 and resolve correctly against originalUriBaseIds.TARGET.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
biggest-littlest
approved these changes
May 29, 2026
Member
biggest-littlest
left a comment
There was a problem hiding this comment.
LGTM β preserves leading slash, satisfies absolute-path-reference per RFC 3986.
Codecov Reportβ All modified and coverable lines are covered by tests. π’ Thoughts on this report? Let us know! |
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
Follow-up to PR #404. The previous fix relativised http URIs but stripped the leading `/`, which meant root-path scans (`http://localhost:3333/\` β the most common ZAP baseline target) ended up as `uri: ''`. GHAS Code Scanning then rejected the upload:
(seen in post-merge CI Verify run 26615030359, job 78430341466)
Fix
Don't strip the leading slash. Result: root URL emits `uri='/'`, paths emit `uri='/auth/login'` etc. Both are valid absolute-path-references per RFC 3986 Β§4.2 and resolve correctly against `originalUriBaseIds.TARGET` per SARIF Β§3.4.4.
Verification
Test plan