Closed
Description
Description of the issue
In http-handlers.ql
I have specified @kind problem
metadata property:
/**
* @name Finds functions that look like HTTP route handlers based on parameter names.
* @description ...
* @id js/http-handlers
* @kind problem
* @tags etherpad 1
* @problem.severity recommendation
*/
import javascript
/**
* A function with `req` and `res` parameters, and hence most likely an
* HTTP route handler.
*/
class LikelyRouteHandler extends DataFlow::FunctionNode {
DataFlow::ParameterNode req;
DataFlow::ParameterNode res;
LikelyRouteHandler() {
req = getParameter(0) and req.getName() = "req" and
res = getParameter(1) and res.getName() = "res"
}
}
// Find HTTP route handlers, using the heuristic of looking for parameters
// named `req` and `res`.
from LikelyRouteHandler l
select l
However, when I use codeql database analyze
, it shows that
$ codeql database analyze ethdb/ http-handlers.ql --format=csv --output=./
Running queries.
[1/1] No need to rerun /home/cpphusky/Downloads/etherpad-lite-revision-1.6.2/http-handlers.ql.
Shutting down query evaluator.
Interpreting results.
A fatal error occurred: Could not process query metadata for /home/cpphusky/Downloads/etherpad-lite-revision-1.6.2/ethdb/results/my-queries/http-handlers.bqrs.
Error was: Cannot process query metadata for a query without the '@kind' metadata property. To learn more, see https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/ [NO_KIND_SPECIFIED]
I've read the documentation but unable to find what's wrong with my ql. Can anyone help with me?