FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use `github merge-results` command for merging SARIF files by koesie10 · Pull Request #2199 · github/codeql-action · GitHub

Use github merge-results command for merging SARIF files - #2199

Merged
koesie10 merged 14 commits into
mainfrom
koesie10/cli-sarif-merge
Mar 27, 2024
Merged

koesie10 merged 14 commits into
mainfrom
koesie10/cli-sarif-merge

Conversation

Copy link
Copy Markdown
Member

This will use the github merge-results command when the cli_sarif_merge_enabled feature flag is enabled and all SARIF files were produced by CodeQL.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

koesie10 force-pushed the koesie10/cli-sarif-merge branch from a924694 to 66fcc6a Compare March 18, 2024 13:19
koesie10 marked this pull request as ready for review March 20, 2024 14:21
koesie10 requested a review from a team as a code owner March 20, 2024 14:21
Comment thread src/feature-flags.ts
koesie10 force-pushed the koesie10/cli-sarif-merge branch from 89a77d5 to e20c273 Compare March 22, 2024 13:15

henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks generally great. Some initial comments:

Comment thread src/codeql.ts Outdated
Comment thread src/codeql.ts Outdated
Comment thread src/feature-flags.ts
Comment on lines +64 to +65
// This is guarded by a `supportsFeature` check rather than by a version check.
minimumVersion: undefined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Going forwards, this will probably be the common case as we're preferring checking CLI features to checking version numbers. We should consider adding a toolVersion field to this record so callees can just check the feature.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Are you suggesting that I add a toolsFeature field to this object in this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm happy if you'd rather do this in a separate PR, but I think if we rely on checking manually we'll probably make a mistake soon enough.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not sure if it makes sense for this specific feature flag though since we usually do not have a CodeQL object available in the upload-sarif action, so we wouldn't be able to check the toolsFeature anyway. We probably also don't want to let the future deprecation behavior depend on which version of CodeQL is being used since the deprecation will happen in the Code Scanning API rather than in CodeQL.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not sure if it makes sense for this specific feature flag though since we usually do not have a CodeQL object available in the upload-sarif action, so we wouldn't be able to check the toolsFeature anyway.

That makes sense — if the feature flag is disabled via the API, there's no point downloading CodeQL.

We probably also don't want to let the future deprecation behavior depend on which version of CodeQL is being used since the deprecation will happen in the Code Scanning API rather than in CodeQL.

I think we'd probably want to time the deprecation such that the CLIs that can't merge SARIF runs are no longer supported by the time we deprecate the API.

Comment thread src/upload-lib.ts Outdated
Comment thread src/upload-lib.ts
Comment thread src/upload-lib.ts Outdated
Comment thread src/upload-lib.ts Outdated
Comment thread src/upload-sarif-action-post-helper.ts Outdated

henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good to me — just a couple of final comments.

Comment thread src/upload-sarif-action-post-helper.ts Outdated
Comment thread src/analyze-action-post.ts Outdated
Comment thread src/codeql.ts
Comment on lines +53 to +56
github?: {
"*"?: Options;
"merge-results"?: Options;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Not for you to fix, but I don't think this addition does anything.

Comment thread src/upload-lib.ts Outdated

henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Great, thanks!

koesie10 merged commit 84ba7fb into main Mar 27, 2024
koesie10 deleted the koesie10/cli-sarif-merge branch March 27, 2024 13:39
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL