CodeScene: Difference between revisions
| Line 62: | Line 62: | ||
Use Firefox, view the SSL certificate chain, and export it out. (Click the lock in the address bar, select More Information, | Use Firefox, view the SSL certificate chain, and export it out. (Click the lock in the address bar, select More Information, | ||
<img src="https://i.imgur.com/PJYEaxG.png" width=" | <img src="https://i.imgur.com/PJYEaxG.png" width="200" /> | ||
<img src="https://i.imgur.com/sVQsqb1.png" width=" | <img src="https://i.imgur.com/sVQsqb1.png" width="100" /> | ||
Revision as of 23:17, 1 February 2026
CodeScene
https://codescene.com/
CLI Tools
https://codescene.io/docs/cli/index.html
CLI Usage
cs review
CLI Configuration
Version update check failed, proceeding. In order to use the full CLI tool you will need to set up your environment with a Personal Access Token. - codescene.io -> https://codescene.io/users/me/pat - CodeScene Enterprise -> https://your.codescene.com/configuration/user/token Generate a new PAT token then set your environment variables as follows: - codescene.io -> $env:CS_ACCESS_TOKEN = '<your-PAT>' - CodeScene Enterprise -> $env:CS_ACCESS_TOKEN = '<your-PAT>'
Windows CLI Tools Installation
Invoke-WebRequest -Uri 'https://downloads.codescene.io/enterprise/cli/install-cs-tool.ps1' -OutFile install-cs-tool.ps1 .\install-cs-tool.ps1
$env:CS_ACCESS_TOKEN = 'your-access-token'
If using an onpremise code scene server:
$env:CS_ONPREM_URL = 'https://codescene.example.com'
Run a code scene command:
cs review
Issues
SSL Certificate Issues
Untrusted On Premise CodeScene Server - Legitimate SSL Certificate
Okay, so you paid for an official SSL Certificate, but CodeScene is not trusting it? No worries, likey the problem is the web server is just simply not exporting out the full SSL certificate chain. Should be easily resolved. Just tell your IT team not to just export the end leaf SSL certificate, but the full SSL chain, including the intermediary certificates. This should resolve the issue
Error:
PS C:\> cs review Version update check failed, proceeding. License check failed (https://good-codescene.example.com/api/v2/tool-license/cli): error - javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
If you don't want to wait for IT, you can test it out by checking out the next section, "Custom SSL Certificate"...
Use Firefox, view the SSL certificate chain, and export it out. (Click the lock in the address bar, select More Information,
Untrusted On Premise CodeScene Server - Custom SSL Certificate
Okay, so you didn't pay for an official SSL Certificate? Sigh, Java is the worst when it comes to dealing with Custom SSL Certificates. Sorry. But you've made your bed, and wish to sleep in it, so buckle up, and here we go...
Error:
PS C:\> cs review Version update check failed, proceeding. License check failed (https://bad-codescene.example.com/api/v2/tool-license/cli): error - javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
First, you will need to build a custom Java Keystore, and every command, tool, and application will need to reference this custom Keystore. It's ugly. Very ugly.
Untrusted Internal SSL Certificate
If your company uses a SSL decryption monitoring certificate, you may run into this:
PS C:\> cs review Version update check failed, proceeding. License check failed (https://api.codescene.io/v2/tool-license/cli): error - javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Solution
- First - cry. Java is the worst at dealing with custom SSL keystores. Sorry.
- Second - okay, so you still want to continue?