Skip to content

Commit 17399e5

Browse files
committed
Remove cryptography docs to fix Trivy secret scan
- Cryptography documentation contains example private keys in docs/hazmat/primitives/asymmetric/serialization.rst and docs/x509/ocsp.rst that trigger Trivy's secret scanner - These are documentation examples, not real secrets - Removing /opt/conda/lib/python3.12/site-packages/docs (cryptography- specific, confirmed via conf.py project name)
1 parent a8ce0b3 commit 17399e5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

docker/Dockerfile.baseimage

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ COPY docker/install-conda-deps.sh /tmp/
6363
# Remove gcloud-crc32c — Go binary compiled with old Go stdlib (CVEs).
6464
# Remove gsutil's vendored urllib3 dummyserver — contains a dummy private key
6565
# that triggers secret-detection scanners (e.g. Trivy).
66+
# Remove cryptography documentation — contains example private keys that
67+
# trigger secret-detection scanners (e.g. Trivy).
6668
# gcloud/gsutil use the conda environment Python, not the bundled one.
6769
RUN /tmp/install-conda-deps.sh /tmp/requirements/baseimage.txt && \
6870
rm -rf /opt/conda/share/google-cloud-sdk-*/platform/bundledpythonunix && \
6971
rm -f /opt/conda/share/google-cloud-sdk-*/bin/gcloud-crc32c && \
7072
rm -rf /opt/conda/share/google-cloud-sdk-*/platform/gsutil/third_party/urllib3/dummyserver && \
73+
rm -rf /opt/conda/lib/python3.12/site-packages/docs && \
7174
rm -rf /tmp/requirements /tmp/install-conda-deps.sh
7275

7376
# Install firecloud via pip instead of conda because the conda noarch

0 commit comments

Comments
 (0)