| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
No active review issues remain, so the URI-decoding and fallback changes are ready for approval.
No open issues 🎉
1 file not reviewedThis pull request fixes diff-informed SARIF alert filtering by decoding percent-encoded artifact URIs before comparing them with raw GitHub diff paths, while preserving raw URI fallback behavior.
Changes:
| File | Description |
|---|---|
| unreleased-change-notes/decode-diff-informed-sarif-uris.md | Documents the corrected alert-filtering behavior. |
| src/upload-lib.ts | Decodes SARIF location URIs and compares decoded and raw paths during filtering. |
| src/upload-lib.test.ts | Adds coverage for encoded, raw, related, and malformed URI cases. |
Review effort: Lite (auto)
Sorry, something went wrong.
There was a problem hiding this comment.
Nice simple fix
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
filterAlertsByDiffRange compares SARIF artifactLocation.uri values against changed file paths from GitHub's diff API (range.path). CodeQL percent-encodes artifactLocation.uri in SARIF, while range.path is a raw file path, so alerts in files with spaces, non-ASCII characters, or special characters were dropped during diff-informed filtering.
Decode locationUri with decodeURIComponent before matching against range.path, while keeping the raw locationUri check for unencoded paths or malformed percent sequences.
filterAlertsByDiffRange(sarifLog) readDiffRangesJsonFile() -> range.path ("with space/board.js") for each result location locationUri = physicalLocation.artifactLocation.uri ("with%20space/board.js") + decodedLocationUri = decodeURIComponent(locationUri) ("with space/board.js") - match range.path === locationUri + match range.path === decodedLocationUri || range.path === locationUriRisk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist