File tree Expand file tree Collapse file tree 1 file changed +25
-6
lines changed
javascript/ql/lib/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,34 @@ private API::Node taintSource() {
37
37
result = commitObj ( ) .getMember ( "message" )
38
38
or
39
39
result = commitObj ( ) .getMember ( [ "author" , "committer" ] ) .getMember ( [ "name" , "email" ] )
40
- or
41
- result =
42
- API:: moduleImport ( "@actions/core" ) .getMember ( [ "getInput" , "getMultilineInput" ] ) .getReturn ( )
43
40
}
44
41
45
- private class GitHubActionsSource extends RemoteFlowSource {
46
- GitHubActionsSource ( ) { this = taintSource ( ) .asSource ( ) }
42
+ /**
43
+ * A source of taint originating from the context.
44
+ */
45
+ private class GitHubActionsContextSource extends RemoteFlowSource {
46
+ GitHubActionsContextSource ( ) { this = taintSource ( ) .asSource ( ) }
47
+
48
+ override string getSourceType ( ) { result = "GitHub Actions context" }
49
+ }
50
+
51
+ /**
52
+ * A source of taint originating from user input.
53
+ *
54
+ * At the momemnt this is treated as a remote flow source, although it is not
55
+ * always possible for an attacker to control this. In the future we might classify
56
+ * this differently.
57
+ */
58
+ private class GitHubActionsInputSource extends RemoteFlowSource {
59
+ GitHubActionsInputSource ( ) {
60
+ this =
61
+ API:: moduleImport ( "@actions/core" )
62
+ .getMember ( [ "getInput" , "getMultilineInput" ] )
63
+ .getReturn ( )
64
+ .asSource ( )
65
+ }
47
66
48
- override string getSourceType ( ) { result = "GitHub Actions input" }
67
+ override string getSourceType ( ) { result = "GitHub Actions user input" }
49
68
}
50
69
51
70
private class ExecActionsCall extends SystemCommandExecution , DataFlow:: CallNode {
You can’t perform that action at this time.
0 commit comments