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 as a code owner Mar 30, 2022
Base automatically changed from henrymercer/stop-running-ml-powered-queries-on-windows to main Mar 30, 2022
cklin
cklin approved these changes Mar 30, 2022
@henrymercer henrymercer force-pushed the henrymercer/ml-powered-queries-pr-check branch from 9ea315c to dc0338e Compare Mar 31, 2022
@henrymercer
Copy link
Contributor Author

@henrymercer henrymercer commented Mar 31, 2022

Branch protection rules updated to incorporate these new PR checks.

@henrymercer henrymercer merged commit a90d8bf into main Mar 31, 2022
254 checks passed
@henrymercer henrymercer deleted the henrymercer/ml-powered-queries-pr-check branch Mar 31, 2022
@github-actions github-actions bot mentioned this pull request Apr 5, 2022
6 tasks
@github-actions github-actions bot mentioned this pull request Apr 5, 2022
4 tasks
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.

None yet

2 participants