Handle multiple whitespaces in runner temp regex.

Co-authored-by: Napalys Klicius <napalys@github.com>
This commit is contained in:
Adnan Khan
2025-07-10 12:22:14 -04:00
committed by GitHub
parent e40e4c3856
commit 7be938c6c3

View File

@@ -264,7 +264,7 @@ class ArtifactPoisoningSink extends DataFlow::Node {
download.getAFollowingStep() = poisonable and
// excluding artifacts downloaded to the temporary directory
not download.getPath().regexpMatch("^/tmp.*") and
not download.getPath().regexpMatch("^\\$\\{\\{\\s?runner\\.temp\\s?}}.*") and
not download.getPath().regexpMatch("^\\$\\{\\{\\s*runner\\.temp\\s*}}.*") and
not download.getPath().regexpMatch("^\\$RUNNER_TEMP.*") and
(
poisonable.(Run).getScript() = this.asExpr() and