Merge pull request #13 from GitHubSecurityLab/github_ctx

Improve regexs
This commit is contained in:
Alvaro Muñoz
2024-02-15 12:03:33 +01:00
committed by GitHub
2 changed files with 12 additions and 6 deletions

View File

@@ -355,15 +355,21 @@ class CtxAccessExpr extends ExprAccessExpr {
abstract Expression getRefExpr();
}
private string stepsCtxRegex() { result = "steps\\.([A-Za-z0-9_-]+)\\.outputs\\.([A-Za-z0-9_-]+)" }
private string stepsCtxRegex() {
result = "\\bsteps\\.([A-Za-z0-9_-]+)\\.outputs\\.([A-Za-z0-9_-]+)\\b"
}
private string needsCtxRegex() { result = "needs\\.([A-Za-z0-9_-]+)\\.outputs\\.([A-Za-z0-9_-]+)" }
private string needsCtxRegex() {
result = "\\bneeds\\.([A-Za-z0-9_-]+)\\.outputs\\.([A-Za-z0-9_-]+)\\b"
}
private string jobsCtxRegex() { result = "jobs\\.([A-Za-z0-9_-]+)\\.outputs\\.([A-Za-z0-9_-]+)" }
private string jobsCtxRegex() {
result = "\\bjobs\\.([A-Za-z0-9_-]+)\\.outputs\\.([A-Za-z0-9_-]+)\\b"
}
private string envCtxRegex() { result = "env\\.([A-Za-z0-9_-]+)" }
private string envCtxRegex() { result = "\\benv\\.([A-Za-z0-9_-]+)\\b" }
private string inputsCtxRegex() { result = "inputs\\.([A-Za-z0-9_-]+)" }
private string inputsCtxRegex() { result = "\\binputs\\.([A-Za-z0-9_-]+)\\b" }
/**
* Holds for an expression accesing the `steps` context.

View File

@@ -137,7 +137,7 @@ private class ExternallyDefinedSource extends RemoteFlowSource {
}
/**
* Composite action input sources
* An input for a Composite Action
*/
private class CompositeActionInputSource extends RemoteFlowSource {
CompositeActionStmt c;