Add sarifRunPropertyFlag to databaseInterpretResults()

This commit is contained in:
Chuan-kai Lin 2024-10-21 10:30:56 -07:00
parent db539989ff
commit b311eee555
3 changed files with 9 additions and 0 deletions

View file

@ -166,6 +166,7 @@ export interface CodeQL {
addSnippetsFlag: string,
threadsFlag: string,
verbosityFlag: string | undefined,
sarifRunPropertyFlag: string | undefined,
automationDetailsId: string | undefined,
config: Config,
features: FeatureEnablement,
@ -834,6 +835,7 @@ export async function getCodeQLForCmd(
addSnippetsFlag: string,
threadsFlag: string,
verbosityFlag: string,
sarifRunPropertyFlag: string | undefined,
automationDetailsId: string | undefined,
config: Config,
features: FeatureEnablement,
@ -861,6 +863,9 @@ export async function getCodeQLForCmd(
...(await getJobRunUuidSarifOptions(this)),
...getExtraOptionsFromEnv(["database", "interpret-results"]),
];
if (sarifRunPropertyFlag !== undefined) {
codeqlArgs.push(sarifRunPropertyFlag);
}
if (automationDetailsId !== undefined) {
codeqlArgs.push("--sarif-category", automationDetailsId);
}