Skip to content

Commit

Permalink
Ignore test files in env vars query
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Aug 7, 2023
1 parent ba5812e commit 97ce1b0
Showing 1 changed file with 1 addition and 0 deletions.
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

0 comments on commit 97ce1b0

Please sign in to comment.