Skip to content

Error was: Expected result pattern(s) are not present for query kind "Problem"(INVALID_RESULT_PATTERNS) #2905

@4cce1er

Description

@4cce1er

Describe what i do:

git clone https://github.com/Semmle/ql.git
my dir is ~/Github/ql

touch .config/codeql/config
content is --search-path=~/Github/ql

cd ~/Github/ql
cd java/ql/src
touch test.ql

/**
 * @name Using a predictable seed in a pseudo-random number generator can lead to predictability of the numbers generated by it
 * @description Using a predictable seed in a pseudo-random number generator can lead to predictability of the numbers generated by it.
 * @kind problem
 * @problem.severity error
 * @precision high
 * @id java/Random
 * @tags security
 */
import java
import Random

from GetRandomData da,Method m
where m.fromSource() and m.getName().toLowerCase().regexpMatch(".*tok.*")
select da,m,"predictable seed"
  1. run
codeql database analyze --format=sarif-latest --output=~/Tests/  javatest ~/Github/ql/java/ql/src/test.ql 

javatest is my database
codeql is the codeql-cli

  1. then
Running queries.
[1/1] No need to rerun /Users/xxxxx/Github/ql/java/ql/src/test.ql.
Shutting down query evaluator.
Interpreting results.
A fatal error occurred: Could not process query metadata.
Error was: Expected result pattern(s) are not present for query kind "Problem"(INVALID_RESULT_PATTERNS).

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions