GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Produce separate SARIF file for `quality-queries` alerts by mbg · Pull Request #2935 · github/codeql-action Conversation
|
| File | Description |
|---|---|
| src/upload-lib.ts | Added enum and targets for separate SARIF uploads, filtering logic for .quality.sarif. |
| src/upload-lib.test.ts | Added tests for filtering .quality.sarif files and validateUniqueCategory prefix. |
| src/analyze.ts | Introduced default query suites and resolveQuerySuiteAlias; generate quality SARIF. |
| src/analyze.test.ts | Added tests for resolveQuerySuiteAlias. |
| src/analyze-action.ts | Uploads quality SARIF and sets quality-sarif-id output when quality-queries present. |
| pr-checks/checks/quality-queries.yml | CI updates to upload security vs. quality SARIF artifacts and adjust checks. |
src/upload-lib.ts:427
getSarifFilePaths function bypasses the isSarif filter when sarifPath is a single file. This can lead to uploading unwanted files (e.g., a .quality.sarif when targeting code-scanning). Apply isSarif to the single-file case or throw if it does not match. sarifFiles = [sarifPath];
pr-checks/checks/quality-queries.yml:29
${{ runner.temp }}/results/javascript.sarif to ensure both artifacts are validated. SARIF_PATH: "${{ runner.temp }}/results/javascript.quality.sarif"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
3393b4e to
81969d7
Compare
4088317 to
b403ba2
Compare
b403ba2 to
79049d9
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice, and pleasantly surgical.
I think this does the right thing, except for a missing quality.sarif predicate in the very end.
Other than that it's mostly nits, and some concerns about maintenance in the long term. We have already discussed them elsewhere. Perhaps we should update the discussion document with our current choice for query resolution.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| // Represents configurations for different services that we can upload SARIF to. | ||
| export interface UploadTarget { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
regarding the target/endpoint comment above: this is a much better place to call something target. I'd probably prefer SarifUploadConfig but that is splitting hairs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| sentinelPrefix: string; | ||
| } | ||
|
|
||
| // Represents the Code Scanning upload target. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stray thought. I have seen both line comments and jsdoc comments on your new functions. Is it deliberate that you do not use jsdoc here? If yes, OK.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think the existing codebase is fairly inconsistent in this regard. I probably just subconsciously mirrored what adjacent definitions do. I'll make this more consistent for my changes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
a4d5138 to
362ebf8
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
thanks! There's one naming nit left, but it is quite minor.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
This appears to talk about another github api endpoint. Is it documented / will it be documented? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jsoref It is not documented. This is part of an internal experiment and so is no use to anyone but us right now. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.