github / github/codeql

Use Cli to analyze database but get no result

Offen
#11,878 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
CodeQL
Sterne
10.1k
Forks
2.1k
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
141

Beschreibung

Hi, I write a ql like:

```
/**
* @name test_compile
* @description test if target is compiled
* @kind problem
* @severity error
* @id cpp/test-compile
* @tags security
*/

import cpp
from FunctionCall fc
where
fc.getTarget().hasName("av_dict_set")
select fc, fc.getLocation().toString()
```
I am sure there are some function calls, but the result is none.
And I found this situation maybe related with the `sourceLocationPrefix` ? I compile this software in one machine, and query this database in the other machine. And I found that in analyse log:
`[2023-01-12 21:13:24] [SPAMMY] database interpret-results> Skipping location 'file:///root/output/ffmpeg/HandBrake/libhb/decavcodec.c:1819:13:1819:23' since it is outside the source archive.`

But I change `sourceLocationPrefix` to the source code dir, and the log is the same. I can't get the right result in my output file. What can I do to solve this problem?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.