Compare commits

...

2 Commits

Author SHA1 Message Date
Aditya Sharad
93efbfe1c7 WIP: Go: Add context query for retrieving call graph edges 2025-04-17 15:06:16 -07:00
Aditya Sharad
4a1b988f39 WIP: Ruby: Add context query for retrieving XSS sanitisers 2025-04-17 15:05:56 -07:00
2 changed files with 27 additions and 0 deletions

15
go/ql/src/CallGraph.ql Normal file
View File

@@ -0,0 +1,15 @@
/**
* @name Call graph
* @description Generates the call graph for the program.
* @kind graph
* @id go/call-graph
*/
import go
import semmle.go.dataflow.DataFlow
query predicate edges(CallExpr call, Function f, string key, string value) {
call.getTarget() = f and
key = "semmle.label" and
value = f.getQualifiedName()
}

12
ruby/ql/src/Sanitizers.ql Normal file
View File

@@ -0,0 +1,12 @@
/**
* @name Sanitizers
* @id rb/meta/sanitizers
* @kind problem
* @severity info
*/
import codeql.ruby.DataFlow
import codeql.ruby.security.XSS
from StoredXss::Sanitizer s
where s instanceof DataFlow::CallNode
select s, "XSS sanitizer"