Skip to content

Commit 2a70419

Browse files
committed
Revert "Revert "Add capability to filter queries #1098""
This reverts commit 99d4397.
1 parent 37d8b51 commit 2a70419

25 files changed

+766
-95
lines changed

.github/query-filter-test/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Query Filter Test
2-
description: Runs a test of query filters using the check sarif action
2+
description: Runs a test of query filters using the check SARIF action
33
inputs:
44
sarif-file:
55
required: true

.github/workflows/expected-queries-runs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
name: Expected queries runs
2-
env:
3-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1+
name: Check queries that ran
42

53
on:
64
push:

.github/workflows/query-filters.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Query filters tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- releases/v1
8+
- releases/v2
9+
pull_request:
10+
types:
11+
- opened
12+
- synchronize
13+
- reopened
14+
- ready_for_review
15+
workflow_dispatch: {}
16+
17+
jobs:
18+
query-filters:
19+
name: Query Filters Tests
20+
timeout-minutes: 45
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out repository
24+
uses: actions/checkout@v3
25+
- name: Prepare test
26+
id: prepare-test
27+
uses: ./.github/prepare-test
28+
with:
29+
version: latest
30+
31+
- name: Check SARIF for default queries with Single include, Single exclude
32+
uses: ./../action/.github/query-filter-test
33+
with:
34+
sarif-file: ${{ runner.temp }}/results/javascript.sarif
35+
queries-run: js/zipslip
36+
queries-not-run: js/path-injection
37+
config-file: ./.github/codeql/codeql-config-query-filters1.yml
38+
tools: ${{ steps.prepare-test.outputs.tools-url }}
39+
40+
- name: Check SARIF for query packs with Single include, Single exclude
41+
uses: ./../action/.github/query-filter-test
42+
with:
43+
sarif-file: ${{ runner.temp }}/results/javascript.sarif
44+
queries-run: js/zipslip,javascript/example/empty-or-one-block
45+
queries-not-run: js/path-injection
46+
config-file: ./.github/codeql/codeql-config-query-filters2.yml
47+
tools: ${{ steps.prepare-test.outputs.tools-url }}
48+
49+
- name: Check SARIF for query packs and local queries with Single include, Single exclude
50+
uses: ./../action/.github/query-filter-test
51+
with:
52+
sarif-file: ${{ runner.temp }}/results/javascript.sarif
53+
queries-run: js/zipslip,javascript/example/empty-or-one-block,inrepo-javascript-querypack/show-ifs
54+
queries-not-run: js/path-injection,complex-python-querypack/show-ifs,complex-python-querypack/foo/bar/show-ifs
55+
config-file: ./.github/codeql/codeql-config-query-filters3.yml
56+
tools: ${{ steps.prepare-test.outputs.tools-url }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ No user facing changes.
1212

1313
## 2.1.13 - 21 Jun 2022
1414

15+
- Add the ability to filter queries from a code scanning run by using the `query-filters` option in the code scanning configuration file. [#1098](https://github.com/github/codeql-action/pull/1098)
1516
- Update default CodeQL bundle version to 2.9.4. [#1100](https://github.com/github/codeql-action/pull/1100)
1617

1718
## 2.1.12 - 01 Jun 2022

lib/analyze.js

Lines changed: 54 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy