Revert to form of original command, skip errors#182
Conversation
WalkthroughThe Docker build step that imports trusted certificates now uses a shell loop over ChangesCertificate bundle import
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Dockerfile (1)
35-36: 🩺 Stability & Availability | 🔵 TrivialAvoid masking real CA import failures in the shell loop.
Suppressing
lserrors with2>/dev/nullhides listing failures beyond "no match", and theforloop discards thelsexit code. Additionally,cat $FILEwithout quotes breaks on filenames containing whitespace. These issues can leave/etc/PKI/tls/certs/ca-bundle.crtincomplete while downstream steps likewgetrely on it.Suggested change
- for FILE in `ls /opt/certs/*.pem /opt/certs/*.crt 2>/dev/null`; \ - do cat $FILE >> /etc/pki/tls/certs/ca-bundle.crt ; done && \ + for FILE in /opt/certs/*.pem /opt/certs/*.crt; do \ + [ -e "$FILE" ] || continue; \ + cat "$FILE" >> /etc/pki/tls/certs/ca-bundle.crt; \ + done && \🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Dockerfile` around lines 35 - 36, The CA import loop in the Dockerfile is masking real failures because it relies on `ls ... 2>/dev/null` inside a `for` loop and then concatenates files with an unquoted `cat $FILE`. Update this section to iterate over matching cert files directly without suppressing listing errors, preserve failure behavior when no files are present or a read fails, and quote the file variable in the `cat` call so filenames with whitespace are handled safely.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Dockerfile`:
- Around line 35-36: The CA import loop in the Dockerfile is masking real
failures because it relies on `ls ... 2>/dev/null` inside a `for` loop and then
concatenates files with an unquoted `cat $FILE`. Update this section to iterate
over matching cert files directly without suppressing listing errors, preserve
failure behavior when no files are present or a read fails, and quote the file
variable in the `cat` call so filenames with whitespace are handled safely.
Overview
The command
findis not available in the base image.Using
findwould be preferable tols, but this is the best option in this case.The PR reverts the cert enumeration command to the original and suppresses errors in the case that either
.pemor.crtfiles are not found.Release Notes
Related
Closes #181
Summary by CodeRabbit