github / codeql

CodeQL: the libraries and queries that power security researchers around the world, as well as code scanning in GitHub Advanced Security
https://codeql.github.com
MIT License
7.55k stars 1.5k forks source link

Missing some source codes for WebKit git #7124

Open is0l4t3dt0m4t0 opened 2 years ago

is0l4t3dt0m4t0 commented 2 years ago

Target: https://github.com/WebKit/WebKit with commit a9adb787a00f51002f150168c9a25ea1fcd1d2f0 Using CodeQL with following commands: Tools/Scripts/build-webkit --gtk --release Compiler: Pre-built version of clang12 (set export CC=clang; export CXX=clang++ before compilation) OS: Ubuntu 20.04 x64 CodeQL Version: 2.7.0

Although the compilation process is completed and a CodeQL database is created, CodeQL seems failed on analyzing some source codes. The path of missing files doesn't exist in database-create-DATE.log and aren't shown in ql query results(e.g. from File f select f.location()). but build-tracer.log includes archiving logs for these files.

For example, Source/WebCore/svg/properties/SVGPropertyAnimator.h is missing and Source/WebCore/svg/SVGZoomEvent.cpp is missing in database while its header file, Source/WebCore/svg/SVGZoomEvent.h, exist in the database.

is0l4t3dt0m4t0 commented 2 years ago

Additional note: An git version of WebKit uses flatpak and bubblewrap, which gives isolated(sandboxed) environment during compilation. but I think it isn't a cause of this issue since there are many other files are still analyzed in databases and can be found from ql query. I also have tried compilation with codeql inside of the flatpak environment, but the problem was not solved.

hmakholm commented 2 years ago

Thanks for the report. Can you provide a zip of the entire log directory from the database where source files went missing?

is0l4t3dt0m4t0 commented 2 years ago

https://1drv.ms/u/s!Aur4BddAgni6f5mNrpiyBIlpHEY?e=uoWIdk Here is compressed log directory.

hmakholm commented 2 years ago

Thanks. Hopefully @github/codeql-c-extractor will be able to investigate.