-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: Model React 'use' and 'use server' #19852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.