mirror of
https://github.com/github/codeql-action.git
synced 2026-01-03 13:10:06 +08:00
add optional workflow input to specify whether snippets are added to sarif output
This commit is contained in:
@@ -79,6 +79,7 @@ export interface CodeQL {
|
||||
sarifFile: string,
|
||||
querySuite: string,
|
||||
memoryFlag: string,
|
||||
addSnippetsFlag: string,
|
||||
threadsFlag: string): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -467,6 +468,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
||||
sarifFile: string,
|
||||
querySuite: string,
|
||||
memoryFlag: string,
|
||||
addSnippetsFlag: string,
|
||||
threadsFlag: string) {
|
||||
|
||||
await new toolrunnner.ToolRunner(cmd, [
|
||||
@@ -477,7 +479,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
||||
databasePath,
|
||||
'--format=sarif-latest',
|
||||
'--output=' + sarifFile,
|
||||
'--no-sarif-add-snippets',
|
||||
addSnippetsFlag,
|
||||
...getExtraOptionsFromEnv(['database', 'analyze']),
|
||||
querySuite
|
||||
]).exec();
|
||||
|
||||
Reference in New Issue
Block a user