initial generated files

This commit is contained in:
2025-09-01 22:58:51 -07:00
committed by =michael hohn
parent a47c7da446
commit 4b69003806
5 changed files with 392 additions and 0 deletions

20
SourceGetUserInfo.ql Normal file
View File

@@ -0,0 +1,20 @@
/**
* Identify the source: the return value of function `getUserInfo`.
* Uses AST matching to find return expressions within that function.
*/
import go
/** A source expression corresponding to the value returned from getUserInfo. */
predicate isSource(Expr e) {
exists(Function f, ReturnStmt r, int i |
f.getName() = "getUserInfo" and
r.getEnclosingFunction() = f and
e = r.getExpr(i)
)
}
from Expr e
where isSource(e)
select e, "Source: return value of getUserInfo"