How to display full text in CodeQL exported results? - Stack Overflow

admin2025-04-16  4

Using CodeQL CLI, when I decode the results of query below to get initialized values, the output for longer strings are truncated (For instance, instead of Hello World in full, it appears as Hel .. rld).

...
 from VariableDeclarator decl
 where not decl.inExternsFile()
 select decl.getBindingPattern(), decl.getInit()

Commands used query command: codeql query run <query.ql> --database <dbpath> --output <filename.bqrs decode command: codeql bqrs decode --format=csv <filename.bqrs> --output <filename.csv

I tried the solutions from similar post but I couldn't figure out where to re-install the javascript pack (step 5). I have literally run codeql pack install --force in almost all directories containing a 'qlpack.yml' file but still run into the error below when I try to re-create the database:

...
[2025-02-02 02:18:29] [build-stderr] at com.semmle.js.extractor.AutoBuild.extractSource(AutoBuild.java:751)
[2025-02-02 02:18:29] [build-stderr] at com.semmle.js.extractor.AutoBuild.run(AutoBuild.java:464)
[2025-02-02 02:18:29] [build-stderr] at com.semmle.js.extractor.AutoBuild.main(AutoBuild.java:1360)
[2025-02-02 02:18:29] [ERROR] Spawned process exited abnormally (code 1; tried to run: [C:\Users\Akwasi\codeql-home\codeql\tools\win64\runner.exe, cmd.exe, /C, type, NUL, &&, C:\Users\Akwasi\codeql-home\codeql\javascript\tools\autobuild.cmd])
A fatal error occurred: Exit status 1 from command: [C:\Users\Akwasi\codeql-home\codeql\tools\win64\runner.exe, cmd.exe, /C, type, NUL, &&, C:\Users\Akwasi\codeql-home\codeql\javascript\tools\autobuild.cmd]
转载请注明原文地址:http://www.anycun.com/QandA/1744809645a87924.html