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.36k stars 1.47k forks source link

Error downloading/installing codeql cpp-queries package #14492

Open shravan-ltts opened 9 months ago

shravan-ltts commented 9 months ago

I am trying to setup codeql for windows driver program on local machine,

Followed CodeQL readme for WHCP and Windows-Driver-Developer-Supplemental-Tools, ReadMe and cloned WHCP_22H2 branch. When tried to analyse the database I see below error.

A fatal error occured: The QL Pack 'codeql/cpp-queries@latest' which is referenced from C:\codeql-home\codeql\Windows-Driver-Developer-Supplemental-Tools-main\src\suites\windows-driver-mustfix.qls cannot be found.

In order to resolve this I have cloned the Windows-Driver-Developer-Supplemental-Tools main branch and tried to manually download/install the codeql/cpp-queries package and faced the similar error.

C:\codeql-home\codeql>codeql pack install C:\codeql-home\codeql\Windows-Driver-Developer-Supplemental-Tools-main\src
Dependencies resolved. Installing packages...
Install location: C:\Users\shravan\.codeql\packages
A fatal error occured: Could not create access credentials for codeql/cpp-queries.
(eventual cause: SunCertPathBuilderException "unable to find valid certification path to requested target")

C:\codeql-home\codeql>codeql pack download codeql/cpp-queries
Dependencies resolved. Installing packages...
Package Install location: C:\Users\shravan\.codeql\packages
A fatal error occured: Could not create access credentials for codeql/cpp-queries.
(eventual cause: SunCertPathBuilderException "unable to find valid certification path to requested target")

Please help me resolve this issue.

MathiasVP commented 8 months ago

Hi @shravan-ltts,

Sorry for not responding to this issue. It seems it may have fallen through the cracks. Are you still experiencing this issue?

It looks like you need to add some missing domain certificates to the Java certificate store. Are you running under a network proxy?

shravan-ltts commented 1 month ago

yes still facing the same error.

MathiasVP commented 1 month ago

Please see my above suggestion (and question) 🙂

It looks like you need to add some missing domain certificates to the Java certificate store. Are you running under a network proxy?

shravan-ltts commented 1 month ago

Can you please tell me how to add these domain certificates?

MathiasVP commented 1 month ago

I don't know how to add such domain certificates. The error you're seeing isn't coming from CodeQL, so we can't really be much help to you. A quick search gave me this. Maybe that's something you can try? I don't know if this will work in your case, though.