Skip to content

Commit 17e5bdb

Browse files
davdhacsclaude
andcommitted
refactor: Consolidate CA trust setup into import-additional-cas
Merge trust-root-ca into import-additional-cas to align with how stackrox/stackrox handles CA trust (single script, single update-ca-trust call). This eliminates a redundant update-ca-trust invocation and simplifies the entrypoint. Changes: - Add copy_single() to import-additional-cas for the StackRox root CA at /run/secrets/stackrox.io/certs/ca.pem - Remove trust-root-ca script and its references in entrypoint.sh and create-bundle.sh - update-ca-trust extract --output is now called once instead of twice Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f48b1c7 commit 17e5bdb

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed

image/scanner/rhel/create-bundle.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ cp "${INPUT_ROOT}/scripts/entrypoint.sh" "${OUTPUT_DIR}/scripts"
4141
cp "${INPUT_ROOT}/scripts/import-additional-cas" "${OUTPUT_DIR}/scripts"
4242
cp "${INPUT_ROOT}/scripts/restore-all-dir-contents" "${OUTPUT_DIR}/scripts"
4343
cp "${INPUT_ROOT}/scripts/save-dir-contents" "${OUTPUT_DIR}/scripts"
44-
cp "${INPUT_ROOT}/scripts/trust-root-ca" "${OUTPUT_DIR}/scripts"
4544

4645
# =============================================================================
4746
# Add binaries and data files to be included in the Dockerfile here. This

image/scanner/scripts/entrypoint.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ set -euo pipefail
44

55
/restore-all-dir-contents
66
/import-additional-cas
7-
/trust-root-ca
87

98
exec /scanner

image/scanner/scripts/import-additional-cas

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ copy_existing /usr/local/share/ca-certificates
2222
# Copy the custom trusted CA bundles injected by the Openshift Network Operator.
2323
copy_existing /etc/pki/injected-ca-trust
2424

25+
# Copy the StackRox root CA if available (mounted by the operator).
26+
copy_existing /run/secrets/stackrox.io/certs
27+
2528
echo "Updating CA trust"
2629
# Though /etc/pki/ca-trust/extracted is the default output, update-ca-trust
2730
# will create the necessary directories with the required permissions if the `--output` flag is used.

image/scanner/scripts/trust-root-ca

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)