mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: Add tests for functions with "use server" directive
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
async function getData(
|
||||
x, // $ MISSING: threatModelSource=remote
|
||||
y) { // $ MISSING: threatModelSource=remote
|
||||
"use server";
|
||||
}
|
||||
|
||||
async function getData2(
|
||||
x, // should not be remote flow sources (because the function does not have "use server")
|
||||
y) {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
"use server";
|
||||
|
||||
export async function getData(
|
||||
x, // $ MISSING: threatModelSource=remote
|
||||
y) { // $ MISSING: threatModelSource=remote
|
||||
}
|
||||
|
||||
async function getData2(
|
||||
x, // should not be remote flow sources (because the function is not exported)
|
||||
y) {
|
||||
}
|
||||
Reference in New Issue
Block a user