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 capability to filter queries #1098

Merged
merged 9 commits into from
Jun 16, 2022

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Jun 14, 2022

This change adds a query-filters property to the codeql-config file.

This property is an array of exclude/include entries for a query
suite. These filters are appended to the generated query suite files
and used to filter queries after they are selected.

A related change is that now, all pack references are run in a single
query suite, which has the query filters appended to them.

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.

This change adds a `query-filters` property to the codeql-config file.

This property is an array of `exclude`/`include` entries for a query
suite. These filters are appended to the generated query suite files
and used to filter queries after they are selected.

A related change is that now, all pack references are run in a single
query suite, which has the query filters appended to them.
@aeisenberg aeisenberg requested a review from a team as a code owner June 14, 2022 19:40
@aeisenberg aeisenberg force-pushed the aeisenberg/remove-queries branch 5 times, most recently from 153ab19 to b0c630e Compare June 14, 2022 20:55
src/analyze.ts Outdated Show resolved Hide resolved
src/analyze.ts Show resolved Hide resolved
.github/workflows/query-filters.yml Outdated Show resolved Hide resolved
Removes duplicated yaml.

Also add some better typings.
@aeisenberg aeisenberg force-pushed the aeisenberg/remove-queries branch from 6772540 to 59ca9b5 Compare June 15, 2022 23:32
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

A few minor comments, but generally this looks good to me.

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -0,0 +1,10 @@
name: "CodeQL config 1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for naming the tests in the workflow file. We could potentially add those names here too.

- include:
tags contain: external/cwe/cwe-022

# Removes out js/path-injection
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Removes out js/path-injection
# Removes js/path-injection

- include:
tags contain: external/cwe/cwe-022

# Removes out js/path-injection
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Removes out js/path-injection
# Removes js/path-injection

- include:
tags contain: external/cwe/cwe-022

# Removes out js/path-injection
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Removes out js/path-injection
# Removes js/path-injection

.github/query-filter-test/action.yml Outdated Show resolved Hide resolved
@aeisenberg aeisenberg merged commit 25cbd7a into aeisenberg/check-sarif-action Jun 16, 2022
@aeisenberg aeisenberg deleted the aeisenberg/remove-queries branch June 16, 2022 00:42
aeisenberg added a commit that referenced this pull request Jun 16, 2022
@aeisenberg
Copy link
Contributor Author

I am reverting this feature and creating a new release without it since we don't want this feature in GHES 3.6.

aeisenberg added a commit that referenced this pull request Jun 21, 2022
#1098
This reverts commit 777b778.
This reverts commit 59ca9b5.
This reverts commit eec34d5.
This reverts commit 40b2800.
aeisenberg added a commit that referenced this pull request Jun 21, 2022
#1098
This reverts commit 777b778.
This reverts commit 59ca9b5.
This reverts commit eec34d5.
This reverts commit 40b2800.
aeisenberg added a commit that referenced this pull request Jun 21, 2022
#1098
This reverts commit 777b778.
This reverts commit 59ca9b5.
This reverts commit eec34d5.
This reverts commit 40b2800.
aeisenberg added a commit that referenced this pull request Jun 21, 2022
Revert "Add capability to filter queries #1098"
aeisenberg added a commit that referenced this pull request Jun 27, 2022
zendesk-ops-ci pushed a commit to zendesk/codeql-action that referenced this pull request Aug 11, 2022
…filters

Revert "Revert "Add capability to filter queries github#1098""
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