Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a PR check to validate that ML-powered queries are run correctly #1011

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Mar 30, 2022

Based on #1010.

This PR adds a check to ensure that ML-powered queries are run correctly:

  • On Linux and macOS, validate that:
    • The four ML-powered queries appear in the rules of the SARIF output
    • At least one of these queries generates an alert with a score on a test database
  • On Windows, validate that:
    • None of the four ML-powered queries appear in the rules of the SARIF output
    • No alerts are generated by ML-powered queries on a test database (admittedly this is a little redundant with the prior check)

Example run: https://github.com/github/codeql-action/actions/runs/2066597691

We should add these jobs to the branch protection rules immediately before merging this PR.

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.

@henrymercer henrymercer requested a review from a team as a code owner March 30, 2022 18:18
Base automatically changed from henrymercer/stop-running-ml-powered-queries-on-windows to main March 30, 2022 18:57
@henrymercer henrymercer force-pushed the henrymercer/ml-powered-queries-pr-check branch from 9ea315c to dc0338e Compare March 31, 2022 09:11
@henrymercer
Copy link
Contributor Author

Branch protection rules updated to incorporate these new PR checks.

@henrymercer henrymercer merged commit a90d8bf into main Mar 31, 2022
@henrymercer henrymercer deleted the henrymercer/ml-powered-queries-pr-check branch March 31, 2022 10:13
This was referenced Apr 5, 2022
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.

2 participants