@@ -4,7 +4,6 @@ import * as path from "path";
4
4
import * as toolrunner from "@actions/exec/lib/toolrunner" ;
5
5
import { IHeaders } from "@actions/http-client/interfaces" ;
6
6
import { default as deepEqual } from "fast-deep-equal" ;
7
- import * as yaml from "js-yaml" ;
8
7
import { default as queryString } from "query-string" ;
9
8
import * as semver from "semver" ;
10
9
@@ -220,7 +219,6 @@ const CODEQL_VERSION_GROUP_RULES = "2.5.5";
220
219
const CODEQL_VERSION_SARIF_GROUP = "2.5.3" ;
221
220
export const CODEQL_VERSION_COUNTS_LINES = "2.6.2" ;
222
221
const 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
224
222
export const CODEQL_VERSION_ML_POWERED_QUERIES = "2.7.5" ;
225
223
226
224
/**
@@ -735,28 +733,6 @@ async function getCodeQLForCmd(
735
733
extraArgs . push ( `--trace-process-level=${ processLevel || 3 } ` ) ;
736
734
}
737
735
}
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
- }
760
736
await runTool ( cmd , [
761
737
"database" ,
762
738
"init" ,
@@ -914,9 +890,7 @@ async function getCodeQLForCmd(
914
890
if ( extraSearchPath !== undefined ) {
915
891
codeqlArgs . push ( "--additional-packs" , extraSearchPath ) ;
916
892
}
917
- if ( ! ( await util . codeQlVersionAbove ( this , CODEQL_VERSION_CONFIG_FILES ) ) ) {
918
- codeqlArgs . push ( querySuitePath ) ;
919
- }
893
+ codeqlArgs . push ( querySuitePath ) ;
920
894
await runTool ( cmd , codeqlArgs ) ;
921
895
} ,
922
896
async databaseInterpretResults (
@@ -952,9 +926,7 @@ async function getCodeQLForCmd(
952
926
codeqlArgs . push ( "--sarif-category" , automationDetailsId ) ;
953
927
}
954
928
codeqlArgs . push ( databasePath ) ;
955
- if ( ! ( await util . codeQlVersionAbove ( this , CODEQL_VERSION_CONFIG_FILES ) ) ) {
956
- codeqlArgs . push ( ...querySuitePaths ) ;
957
- }
929
+ codeqlArgs . push ( ...querySuitePaths ) ;
958
930
// capture stdout, which contains analysis summaries
959
931
return await runTool ( cmd , codeqlArgs ) ;
960
932
} ,
0 commit comments