File tree Expand file tree Collapse file tree
javascript/ql/lib/semmle/javascript/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,15 +37,34 @@ private API::Node taintSource() {
3737 result = commitObj ( ) .getMember ( "message" )
3838 or
3939 result = commitObj ( ) .getMember ( [ "author" , "committer" ] ) .getMember ( [ "name" , "email" ] )
40- or
41- result =
42- API:: moduleImport ( "@actions/core" ) .getMember ( [ "getInput" , "getMultilineInput" ] ) .getReturn ( )
4340}
4441
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+ }
4766
48- override string getSourceType ( ) { result = "GitHub Actions input" }
67+ override string getSourceType ( ) { result = "GitHub Actions user input" }
4968}
5069
5170private class ExecActionsCall extends SystemCommandExecution , DataFlow:: CallNode {
You can’t perform that action at this time.
0 commit comments