Skip to content

Commit ae9b8ec

Browse files
davdhacsclaude
andauthored
refactor: Consolidate CA trust setup into import-additional-cas (#2991)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6f8d323 commit ae9b8ec

4 files changed

Lines changed: 8 additions & 18 deletions

File tree

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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ 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+
# Only copy ca.pem — the mount also contains server cert and key which
27+
# should not be added as trusted CA anchors.
28+
CA_PATH="/run/secrets/stackrox.io/certs/ca.pem"
29+
echo "Copying StackRox root CA from '${CA_PATH}'"
30+
# For RHEL
31+
cp "${CA_PATH}" /etc/pki/ca-trust/source/anchors/root-ca.pem
32+
2533
echo "Updating CA trust"
2634
# Though /etc/pki/ca-trust/extracted is the default output, update-ca-trust
2735
# 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)