Skip to content

Commit

Permalink
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -79,7 +79,7 @@ The CodeQL action should be run on `push` events, and on a `schedule`. `Push` ev
### Configuration
You may optionally specify additional queries for CodeQL to execute by using a config file. The queries must belong to a [QL pack](https://help.semmle.com/codeql/codeql-cli/reference/qlpack-overview.html) and can be in your repository or any public repository. You can choose a single .ql file, a folder containing multiple .ql files, a .qls [query suite](https://help.semmle.com/codeql/codeql-cli/procedures/query-suites.html) file, or any combination of the above. To use queries from other repositories use the same syntax as when [using an action](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses).

You can disable the default queries using `ignore-default-queries: true`.
You can disable the default queries using `disable-default-queries: true`.

You can choose to ignore some files or folders from the analysis, or include additional files/folders for analysis. This *only* works for Javascript and Python analysis.
Identifying potential files for extraction:
6 changes: 3 additions & 3 deletions lib/config-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/finalize-db.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/config-utils.ts
@@ -17,7 +17,7 @@ export class ExternalQuery {

export class Config {
public name = "";
public ignoreDefaultQueries = false;
public disableDefaultQueries = false;
public additionalQueries: string[] = [];
public externalQueries: ExternalQuery[] = [];
public pathsIgnore: string[] = [];
@@ -82,8 +82,8 @@ function initConfig(): Config {
config.name = parsedYAML.name;
}

if (parsedYAML['ignore-default-queries'] && typeof parsedYAML['ignore-default-queries'] === "boolean") {
config.ignoreDefaultQueries = parsedYAML['ignore-default-queries'];
if (parsedYAML['disable-default-queries'] && typeof parsedYAML['disable-default-queries'] === "boolean") {
config.disableDefaultQueries = parsedYAML['disable-default-queries'];
}

const queries = parsedYAML.queries;
2 changes: 1 addition & 1 deletion src/finalize-db.ts
@@ -103,7 +103,7 @@ async function runQueries(codeqlCmd: string, databaseFolder: string, sarifFolder
core.startGroup('Analyzing ' + database);

const queries: string[] = [];
if (!config.ignoreDefaultQueries) {
if (!config.disableDefaultQueries) {
queries.push(database + '-code-scanning.qls');
}
queries.push(...queriesPerLanguage[database]);

0 comments on commit 2809bdc

Please sign in to comment.