mirror of
https://github.com/github/codeql.git
synced 2026-01-11 13:40:21 +01:00
Account for github.event.label check as a sanitizer for untrusted checkout
This commit is contained in:
@@ -25,7 +25,10 @@ class ActorCheckStmt extends IfStmt {
|
||||
* An If node that contains a `label` check
|
||||
*/
|
||||
class LabelCheckStmt extends IfStmt {
|
||||
LabelCheckStmt() { this.getCondition().regexpMatch(".*github\\.event\\.pull_request\\.labels.*") }
|
||||
LabelCheckStmt() {
|
||||
this.getCondition().regexpMatch(".*github\\.event\\.pull_request\\.labels.*") or
|
||||
this.getCondition().regexpMatch(".*github\\.event\\.label\\.name.*")
|
||||
}
|
||||
}
|
||||
|
||||
from WorkflowStmt w, JobStmt job, StepUsesExpr checkoutStep
|
||||
|
||||
Reference in New Issue
Block a user