JS: Model React 'use' and 'use server'#19852
Conversation
This is not testing anything interesting, and is noisy when adding inline expectations
Will update files in next commit
Mostly noise due to renamed predicates and reordered result sets
| import javascript | ||
| import semmle.javascript.frameworks.React | ||
|
|
||
| query predicate getADirectStateAccess(ReactComponent c, DataFlow::SourceNode res) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning test
| res = c.getADirectStateAccess() | ||
| } | ||
|
|
||
| query predicate getInstanceMethod(ReactComponent c, string n, Function res) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning test
| res = c.getInstanceMethod(n) | ||
| } | ||
|
|
||
| query predicate getAPreviousStateSource(ReactComponent c, DataFlow::SourceNode res) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning test
|
|
||
| query predicate reactComponentRef(ReactComponent c, DataFlow::Node res) { res = c.ref() } | ||
|
|
||
| query predicate getACandidateStateSource(ReactComponent c, DataFlow::SourceNode res) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning test
| res = c.getACandidateStateSource() | ||
| } | ||
|
|
||
| query predicate getADirectPropsSource(ReactComponent c, DataFlow::SourceNode res) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning test
| res = c.getADirectPropsAccess() | ||
| } | ||
|
|
||
| query predicate getACandidatePropsValue(DataFlow::Node res) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning test
|
|
||
| query predicate reactComponent(ReactComponent c) { any() } | ||
|
|
||
| query predicate getAPropRead(ReactComponent c, string n, DataFlow::PropRead res) { |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning test
21f1b4b to
4fc5738
Compare
Yeah I saw the change note CI check failing and was confused why my change note had disappeared, and I just wrote a new one. Not sure what happened. Maybe I forgot to push the commit with the original change note. Anyways, I've removed the duplicate change note. |
react.