{"id":136,"date":"2020-05-25T05:42:43","date_gmt":"2020-05-25T12:42:43","guid":{"rendered":"https:\/\/blog.mozilla.org\/attack-and-defense\/?p=136"},"modified":"2022-10-17T07:20:52","modified_gmt":"2022-10-17T14:20:52","slug":"firefox-codeql-databases-available-for-download","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/attack-and-defense\/2020\/05\/25\/firefox-codeql-databases-available-for-download\/","title":{"rendered":"Firefox CodeQL Databases Available for Download"},"content":{"rendered":"<div style=\"display: none; visibility: none;\"><\/div>\n<p>In November of 2019 we added <a href=\"https:\/\/blog.mozilla.org\/attack-and-defense\/2019\/11\/14\/adding-codeql-and-clang-to-our-bug-bounty-program\/\">static analysis bounties for CodeQL queries and Clang plugins<\/a>. Github has a <a href=\"https:\/\/securitylab.github.com\/tools\/codeql\">great CodeQL portal<\/a> with detailed instructions for <a href=\"https:\/\/help.semmle.com\/codeql\/codeql-cli\/procedures\/create-codeql-database.html\">creating a database<\/a> that will work efficiently with Firefox.<\/p>\n<p>Generating that database might be a time consuming task, because building historical versions of Firefox can be bulky due to toolchain changes over time. On the flip side, building historical CodeQL databases of Firefox can be rewarding because <a href=\"https:\/\/www.mozilla.org\/en-US\/security\/client-bug-bounty\/#static-analysis-bounty\">we will pay a bounty for CodeQL queries that match previously fixed security issues<\/a>.<\/p>\n<p>Given all this, we are making CodeQL databases available for download for Firefox versions 68 through the present. You can find them on S3 at <a href=\"https:\/\/bug-bounty-codeql-databases.s3.us-east-2.amazonaws.com\/index.html\">https:\/\/bug-bounty-codeql-databases.s3.us-east-2.amazonaws.com\/index.html<\/a> &#8211; if you have any issues with the databases or find some missing, please email <a href=\"mailto:security@mozilla.org\">security@mozilla.org<\/a><\/p>\n<p><b>Update<\/b> (October, 2022): Due to low usage and maintenance burden, we have stopped publishing codeql databases. However, you can still generate them locally. Our script for generating the JavaScript database <a href=\"https:\/\/searchfox.org\/mozilla-central\/rev\/b4150d1c6fae0c51c522df2d2c939cf5ad331d4c\/taskcluster\/scripts\/misc\/generate-codeql-db-javascript.sh\">was here<\/a>. The <a href=\"https:\/\/searchfox.org\/mozilla-central\/rev\/b4150d1c6fae0c51c522df2d2c939cf5ad331d4c\/taskcluster\/scripts\/builder\/build-linux.sh\">the cpp database script<\/a> was more complicated and tied into the build mechanics, but the general approach of giving it a high memory limit and running <code>.\/mach build<\/code> will probably work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In November of 2019 we added static analysis bounties for CodeQL queries and Clang plugins. Github has a great CodeQL portal with detailed instructions for creating a database that will &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/attack-and-defense\/2020\/05\/25\/firefox-codeql-databases-available-for-download\/\">Read more<\/a><\/p>\n","protected":false},"author":1610,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[448815],"tags":[],"coauthors":[323226],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/posts\/136"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/users\/1610"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/tags?post=136"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/attack-and-defense\/wp-json\/wp\/v2\/coauthors?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}