1
0
mirror of synced 2025-12-23 21:07:12 -05:00

Clarify how to exclude files from code scanning analysis (#16658)

* Clarify how to exclude files from analysis

* Update content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

* Update content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

* Update content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
This commit is contained in:
hubwriter
2020-11-27 14:19:49 +00:00
committed by GitHub
parent 9340ce03f6
commit 17444b74bd
2 changed files with 34 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ queries:
- uses: security-and-quality
```
The following configuration file disables the default queries and specifies a set of custom queries to run instead. It also configures {% data variables.product.prodname_codeql %} to scan files in the _src_ directory (relative to the root), and to exclude the _node_modules_ directory (also relative to the root), as well as any file whose name ends in _.test.js_.
The following configuration file disables the default queries and specifies a set of custom queries to run instead. It also configures {% data variables.product.prodname_codeql %} to scan files in the _src_ directory (relative to the root), except for the _src/node_modules_ directory, and except for files whose name ends in _.test.js_. Files in _src/node_modules_ and files with names ending _.test.js_ are therefore excluded from analysis.
``` yaml
name: "My {% data variables.product.prodname_codeql %} config"
@@ -24,9 +24,9 @@ queries:
- name: Use a query suite file (run queries from a query suite in this repo)
uses: ./codeql-qlpacks/complex-python-qlpack/rootAndBar.qls
paths-ignore:
- node_modules
- '**/*.test.js'
paths:
- src
paths-ignore:
- src/node_modules
- '**/*.test.js'
```