| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR improves performance by skipping SARIF schema validation for CodeQL-produced results outside of testing environments and reducing redundant file reads when uploading a single SARIF file.
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file| File | Description |
|---|---|
| src/util.ts | Add getTestingEnvironment and refine JSDoc for test-mode logic. |
| src/workflow.ts | Use getTestingEnvironment instead of direct process.env check. |
| src/upload-lib.ts | Extract readSarifFile, update validateSarifFileSchema signature, skip validation by default for CodeQL SARIF. |
| src/upload-lib.test.ts | Update schema tests to use readSarifFile before validation. |
| src/status-report.ts | Use getTestingEnvironment for status payload and export logic. |
| src/analyze.ts | Remove in-place validation in getPerQueryAlertCounts and update its signature. |
| lib/… | Mirror changes in compiled JS for util, workflow, upload-lib, status-report, analyze, and tests. |
| CHANGELOG.md | Document skipping SARIF validation for CodeQL. |
src/analyze.ts:683
/** Get an object with all queries and their counts parsed from a SARIF file path. */
Sorry, something went wrong.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Pushed a commit to rebuild the Action. Please mark the PR as ready for review to trigger PR checks. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
| export function getTestingEnvironment(): string | undefined { | ||
| const testingEnvironment = process.env[EnvVar.TESTING_ENVIRONMENT] || ""; | ||
| if (testingEnvironment === "") { | ||
| return undefined; | ||
| } | ||
| return testingEnvironment; | ||
| } |
There was a problem hiding this comment.
👍🏾
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR skips validating SARIF files produced by CodeQL, unless we are running in a testing environment. This improves end-to-end performance.
We also only read the SARIF file once in the common case that only one file is being uploaded. Previously we read it twice. This should also speed things up, particularly for large SARIF files.
Merge / deployment checklist