Ignore test files in env vars query

This commit is contained in:
Henry Mercer 2023-08-07 17:31:09 +01:00
parent ba5812e64f
commit 97ce1b094a

View file

@ -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 +