Open
Conversation
Install libnss3-tools and create Chrome/Chromium NSS database before running mkcert -install, eliminating the 'no Firefox and/or Chrome/Chromium security databases found' warning from E2E test logs. This replaces the grep -v workaround with a proper fix that ensures mkcert can install certificates into the browser trust store.
mkcert checks both Chrome (~/.pki/nssdb) and Firefox (~/.mozilla/firefox/*) certificate databases. Add Firefox profile database creation to eliminate the warning completely.
Since mkcert -install runs with sudo, it looks for browser certificate databases under /root (root's HOME), not the runner user's home directory. Create the NSS databases in /root/.pki/nssdb and /root/.mozilla/firefox/default.
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/make.yaml">
<violation number="1" location=".github/workflows/make.yaml:224">
P1: Installing mkcert as root creates a different CA than the one later used to generate the test certificates. The warning disappears, but the Pebble certs from `make stack-up` are still signed by the runner user's CA, not the root CA you installed here.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
sudo mkcert -install created a CA under /root, but make stack-up generates certificates as the runner user using a different CA. This caused a CA mismatch where the installed root CA didn't match the one signing the Pebble certificates. Fix by creating NSS databases for the runner user and running mkcert -install without sudo. The runner user's CA is then explicitly copied into the system trust store with sudo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
libnss3-toolsand create Chrome/Chromium NSS certificate database (~/.pki/nssdb) before runningmkcert -install, properly eliminating theERROR: no Firefox and/or Chrome/Chromium security databases foundwarning from E2E test logsgrep -vworkaround with a proper fix that ensures mkcert can install certificates into the browser trust storeChanges
In
.github/workflows/make.yaml(test-e2e job):libnss3-toolsto theapt-get installalongsidemkcertcertutilsudo mkcert -install 2>&1 | grep -v '...' || truewith a cleansudo mkcert -installContext
The mkcert certificate installation step was showing a warning in all E2E test runs:
While the warning was suppressed with
grep -v, this approach:The fix creates the NSS database that mkcert expects, so certificates are properly installed in both the system trust store and the browser trust store.
Summary by cubic
Install
libnss3-toolsand initialize Chrome/Chromium and Firefox NSS DBs in CI somkcert -installcan add the CA to browser trust stores. Runmkcertas the runner user to avoid CA mismatch and remove the warning from E2E logs.Bug Fixes
$HOMEfor Chrome/Chromium (~/.pki/nssdb) and Firefox (~/.mozilla/firefox/default) withcertutil, then runmkcert -installas the runner user to keep a single CA./usr/local/share/ca-certificates) and replace thegrep -vworkaround with a clean install.Dependencies
libnss3-toolstoapt-get install.Written for commit f602214. Summary will update on new commits.