Skip to content
Merged
Prev Previous commit
Next Next commit
Ignore test files in env vars query
  • Loading branch information
henrymercer committed Aug 7, 2023
commit 97ce1b094a8b06ef39177f5909c4811b09541b46
1 change: 1 addition & 0 deletions queries/default-setup-environment-variables.ql
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ predicate envVarRead(DataFlow::Node node, string envVar) {
from DataFlow::Node read, string envVar
where
envVarRead(read, envVar) and
not read.getFile().getBaseName().matches("%.test.ts") and
not isSafeForDefaultSetup(envVar)
select read,
"The environment variable " + envVar +
Expand Down