@@ -4,7 +4,6 @@ import * as path from "path";
44import * as toolrunner from "@actions/exec/lib/toolrunner" ;
55import { IHeaders } from "@actions/http-client/interfaces" ;
66import { default as deepEqual } from "fast-deep-equal" ;
7- import * as yaml from "js-yaml" ;
87import { default as queryString } from "query-string" ;
98import * as semver from "semver" ;
109
@@ -220,7 +219,6 @@ const CODEQL_VERSION_GROUP_RULES = "2.5.5";
220219const CODEQL_VERSION_SARIF_GROUP = "2.5.3" ;
221220export const CODEQL_VERSION_COUNTS_LINES = "2.6.2" ;
222221const CODEQL_VERSION_CUSTOM_QUERY_HELP = "2.7.1" ;
223- export const CODEQL_VERSION_CONFIG_FILES = "2.8.2" ; // Versions before 2.8.2 weren't tolerant to unknown properties
224222export const CODEQL_VERSION_ML_POWERED_QUERIES = "2.7.5" ;
225223
226224/**
@@ -735,28 +733,6 @@ async function getCodeQLForCmd(
735733 extraArgs . push ( `--trace-process-level=${ processLevel || 3 } ` ) ;
736734 }
737735 }
738- if ( await util . codeQlVersionAbove ( codeql , CODEQL_VERSION_CONFIG_FILES ) ) {
739- const configLocation = path . resolve ( config . tempDir , "user-config.yaml" ) ;
740- const augmentedConfig = config . originalUserInput ;
741- if ( config . injectedMlQueries ) {
742- // We need to inject the ML queries into the original user input before
743- // we pass this on to the CLI, to make sure these get run.
744- const pack = await util . getMlPoweredJsQueriesPack ( codeql ) ;
745- const packString =
746- pack . packName + ( pack . version ? `@${ pack . version } ` : "" ) ;
747-
748- if ( augmentedConfig . packs === undefined ) augmentedConfig . packs = [ ] ;
749- if ( Array . isArray ( augmentedConfig . packs ) ) {
750- augmentedConfig . packs . push ( packString ) ;
751- } else {
752- if ( ! augmentedConfig . packs . javascript )
753- augmentedConfig . packs [ "javascript" ] = [ ] ;
754- augmentedConfig . packs [ "javascript" ] . push ( packString ) ;
755- }
756- }
757- fs . writeFileSync ( configLocation , yaml . dump ( augmentedConfig ) ) ;
758- extraArgs . push ( `--codescanning-config=${ configLocation } ` ) ;
759- }
760736 await runTool ( cmd , [
761737 "database" ,
762738 "init" ,
@@ -914,9 +890,7 @@ async function getCodeQLForCmd(
914890 if ( extraSearchPath !== undefined ) {
915891 codeqlArgs . push ( "--additional-packs" , extraSearchPath ) ;
916892 }
917- if ( ! ( await util . codeQlVersionAbove ( this , CODEQL_VERSION_CONFIG_FILES ) ) ) {
918- codeqlArgs . push ( querySuitePath ) ;
919- }
893+ codeqlArgs . push ( querySuitePath ) ;
920894 await runTool ( cmd , codeqlArgs ) ;
921895 } ,
922896 async databaseInterpretResults (
@@ -952,9 +926,7 @@ async function getCodeQLForCmd(
952926 codeqlArgs . push ( "--sarif-category" , automationDetailsId ) ;
953927 }
954928 codeqlArgs . push ( databasePath ) ;
955- if ( ! ( await util . codeQlVersionAbove ( this , CODEQL_VERSION_CONFIG_FILES ) ) ) {
956- codeqlArgs . push ( ...querySuitePaths ) ;
957- }
929+ codeqlArgs . push ( ...querySuitePaths ) ;
958930 // capture stdout, which contains analysis summaries
959931 return await runTool ( cmd , codeqlArgs ) ;
960932 } ,
0 commit comments