-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
When I run:
codeql database analyze ./database/squid-df2eb1a --format=csv --output=./output/squid-df2eb1a.csv --ram=2048 --rerun ./vscode-codeql-starter/codeql-custom-queries-cpp/ldap_search_s2.ql
I got:
WARNING: A problem query must define precisely one query clause.
A fatal error occurred: Could not process query metadata for /home/Desktop/CodeQL/vscode-codeql-starter/codeql-custom-queries-cpp/search_api.ql.
Error was: Expected result pattern(s) are not present for problem query: Expected exactly one pattern. [INVALID_RESULT_PATTERNS]
I search for some issues and found It might because import semmle.code.cpp.dataflow.DataFlow and I use @kind problem?
But I use DataFlow in some predicate and I don't use any PathNode in my select clause...I don't know how to select four elements if I use @kind path-problem
That's part of code, and in getLeakBlock, I use some dataflow analyse
/**
* @name Aname
* @description description
* @kind problem
* @problem.severity error
* @precision high
* @id cpp/squid
* @tags security
*/
import cpp
import semmle.code.cpp.dataflow.TaintTracking
import semmle.code.cpp.dataflow.DataFlow
import semmle.code.cpp.security.Security
import DataFlow::PathGraph
from FunctionCall malloc, BasicBlock leak, FunctionCall fc
where
isSourceFC(malloc)
and fc = getparentCall*(malloc)
and leak = getLeakBlock(fc, malloc)
select malloc.getLocation(), malloc.getTarget().getQualifiedName()
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested