mirror of
https://github.com/github/codeql-action.git
synced 2026-08-05 04:57:19 -05:00
ignore-default-queries -> disable-default-queries
This commit is contained in:
@@ -79,7 +79,7 @@ The CodeQL action should be run on `push` events, and on a `schedule`. `Push` ev
|
|||||||
### Configuration
|
### 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 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.
|
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:
|
Identifying potential files for extraction:
|
||||||
|
|||||||
Generated
+3
-3
@@ -23,7 +23,7 @@ exports.ExternalQuery = ExternalQuery;
|
|||||||
class Config {
|
class Config {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "";
|
this.name = "";
|
||||||
this.ignoreDefaultQueries = false;
|
this.disableDefaultQueries = false;
|
||||||
this.additionalQueries = [];
|
this.additionalQueries = [];
|
||||||
this.externalQueries = [];
|
this.externalQueries = [];
|
||||||
this.pathsIgnore = [];
|
this.pathsIgnore = [];
|
||||||
@@ -76,8 +76,8 @@ function initConfig() {
|
|||||||
if (parsedYAML.name && typeof parsedYAML.name === "string") {
|
if (parsedYAML.name && typeof parsedYAML.name === "string") {
|
||||||
config.name = parsedYAML.name;
|
config.name = parsedYAML.name;
|
||||||
}
|
}
|
||||||
if (parsedYAML['ignore-default-queries'] && typeof parsedYAML['ignore-default-queries'] === "boolean") {
|
if (parsedYAML['disable-default-queries'] && typeof parsedYAML['disable-default-queries'] === "boolean") {
|
||||||
config.ignoreDefaultQueries = parsedYAML['ignore-default-queries'];
|
config.disableDefaultQueries = parsedYAML['disable-default-queries'];
|
||||||
}
|
}
|
||||||
const queries = parsedYAML.queries;
|
const queries = parsedYAML.queries;
|
||||||
if (queries && queries instanceof Array) {
|
if (queries && queries instanceof Array) {
|
||||||
|
|||||||
Generated
+1
-1
@@ -89,7 +89,7 @@ async function runQueries(codeqlCmd, databaseFolder, sarifFolder, config) {
|
|||||||
for (let database of fs.readdirSync(databaseFolder)) {
|
for (let database of fs.readdirSync(databaseFolder)) {
|
||||||
core.startGroup('Analyzing ' + database);
|
core.startGroup('Analyzing ' + database);
|
||||||
const queries = [];
|
const queries = [];
|
||||||
if (!config.ignoreDefaultQueries) {
|
if (!config.disableDefaultQueries) {
|
||||||
queries.push(database + '-code-scanning.qls');
|
queries.push(database + '-code-scanning.qls');
|
||||||
}
|
}
|
||||||
queries.push(...queriesPerLanguage[database]);
|
queries.push(...queriesPerLanguage[database]);
|
||||||
|
|||||||
+3
-3
@@ -17,7 +17,7 @@ export class ExternalQuery {
|
|||||||
|
|
||||||
export class Config {
|
export class Config {
|
||||||
public name = "";
|
public name = "";
|
||||||
public ignoreDefaultQueries = false;
|
public disableDefaultQueries = false;
|
||||||
public additionalQueries: string[] = [];
|
public additionalQueries: string[] = [];
|
||||||
public externalQueries: ExternalQuery[] = [];
|
public externalQueries: ExternalQuery[] = [];
|
||||||
public pathsIgnore: string[] = [];
|
public pathsIgnore: string[] = [];
|
||||||
@@ -82,8 +82,8 @@ function initConfig(): Config {
|
|||||||
config.name = parsedYAML.name;
|
config.name = parsedYAML.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsedYAML['ignore-default-queries'] && typeof parsedYAML['ignore-default-queries'] === "boolean") {
|
if (parsedYAML['disable-default-queries'] && typeof parsedYAML['disable-default-queries'] === "boolean") {
|
||||||
config.ignoreDefaultQueries = parsedYAML['ignore-default-queries'];
|
config.disableDefaultQueries = parsedYAML['disable-default-queries'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const queries = parsedYAML.queries;
|
const queries = parsedYAML.queries;
|
||||||
|
|||||||
+1
-1
@@ -103,7 +103,7 @@ async function runQueries(codeqlCmd: string, databaseFolder: string, sarifFolder
|
|||||||
core.startGroup('Analyzing ' + database);
|
core.startGroup('Analyzing ' + database);
|
||||||
|
|
||||||
const queries: string[] = [];
|
const queries: string[] = [];
|
||||||
if (!config.ignoreDefaultQueries) {
|
if (!config.disableDefaultQueries) {
|
||||||
queries.push(database + '-code-scanning.qls');
|
queries.push(database + '-code-scanning.qls');
|
||||||
}
|
}
|
||||||
queries.push(...queriesPerLanguage[database]);
|
queries.push(...queriesPerLanguage[database]);
|
||||||
|
|||||||
Reference in New Issue
Block a user