Pass through OPENSSL_FORCE_FIPS_MODE env var to containers#1622
Pass through OPENSSL_FORCE_FIPS_MODE env var to containers#1622jeffwidman merged 1 commit intomainfrom
OPENSSL_FORCE_FIPS_MODE env var to containers#1622Conversation
|
I think this will allow OpenSSL to work based on user reports in dependabot/dependabot-core#13433 , but I didn't take the time to actually spin up a FIPS host to test. |
There was a problem hiding this comment.
Pull request overview
This PR addresses OpenSSL failures on FIPS-enabled self-hosted runners by propagating the OPENSSL_FORCE_FIPS_MODE environment variable from the host to both updater and proxy containers. The container images (Ubuntu 24.04) lack the OpenSSL FIPS provider, causing "out of memory" errors during update-ca-certificates execution. By passing through the host's OPENSSL_FORCE_FIPS_MODE setting (typically set to "0"), OpenSSL is explicitly prevented from attempting FIPS mode, allowing updates to proceed normally.
Changes:
- Added conditional pass-through of
OPENSSL_FORCE_FIPS_MODEenvironment variable to updater containers - Added conditional pass-through of
OPENSSL_FORCE_FIPS_MODEenvironment variable to proxy containers - Both implementations only propagate the variable when explicitly set, preserving default behavior when unset
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/updater-builder.ts | Adds OPENSSL_FORCE_FIPS_MODE pass-through to updater container environment using conditional block |
| src/proxy.ts | Adds OPENSSL_FORCE_FIPS_MODE pass-through to proxy container environment using spread operator with conditional array |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
On FIPS-enabled self-hosted runners, OpenSSL inside the updater and proxy containers fails with "out of memory" errors when running update-ca-certificates because the FIPS provider is not installed in the container images (Ubuntu 24.04). If the host has OPENSSL_FORCE_FIPS_MODE set (e.g. to "0"), propagate it into both the updater and proxy containers. When the variable is not set on the host, nothing changes — default behavior is preserved. Fixes: dependabot/dependabot-core#13433
ae00abe to
714fa45
Compare
OPENSSL_FORCE_FIPS_MODE env var to containers
@jeffwidman I tested this out All of these tests were running from a self-hosted runner I setup (
Running with the
Ignore the first failure, it was because I had the wrong initial test setup(the part of the ssl setup did run though)
https://github.com/yeikel/test-FIPS/actions/runs/22227623749/job/64298338812
That said, I don’t think the action should proceed when |
|
Thanks for testing it! Glad to see it working.
That'd be a nice improvement. For now though, I'm planning to start with this. I should add that once But yeah, it'd be nice to eventually to surface to them "if you want to workaround this, you can disable FIPS on OpenSSL via setting this env var" |
If I can secure a review from you(big if!), I'd be happy to send that over as a follow up after this is merged |
kbukum1
left a comment
There was a problem hiding this comment.
LGTM: Everything is clean and specs are covering it properly.
@yeikel if it's simple you're welcome to do it... I think there's a 50/50 chance it gets complicated since this code is happening in dockerfile invoking openssl rather than in ruby or Go... so if it gets complicated then not worth it IMO... eg if it needs a custom wrapper script etc. This only affects users running self-hosted runners on FIPS. As long as we provide a solution and a clearly searchable answer (which is why I added the exact error string to the issue), then there are other more impactful problems to solve. |


On FIPS-enabled self-hosted runners, OpenSSL inside the updater and proxy containers fails with "out of memory" errors when running update-ca-certificates because the FIPS provider is not installed in the container images (Ubuntu 24.04).
If the host has OPENSSL_FORCE_FIPS_MODE set (e.g. to "0"), propagate it into both the updater and proxy containers. When the variable is not set on the host, nothing changes — default behavior is preserved.
Fixes: dependabot/dependabot-core#13433