Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for custom trusted Certificate Authorities (CAs) by introducing a STABLE_CA build argument that allows passing CA certificates to be trusted at runtime.
Key Changes:
- Added
STABLE_CAbuild argument and environment variable to both Deno and Bun Dockerfiles - CA certificate is written to a file and configured for runtime use in each environment
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tails/javascript-deno.tail.dockerfile | Added STABLE_CA support with certificate file creation and --cert flag for Deno |
| tails/javascript-bun.tail.dockerfile | Added STABLE_CA support with certificate file creation and NODE_EXTRA_CA_CERTS for Bun |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ARG STABLE_CA | ||
| ENV STABLE_CA=${STABLE_CA} | ||
|
|
||
| RUN echo "${STABLE_CA}" > /stable.crt |
There was a problem hiding this comment.
The certificate file is being written to the root directory without proper validation. If STABLE_CA is empty or malformed, this could create an invalid certificate file that fails silently. Consider adding validation to check if STABLE_CA is set and contains valid certificate data before writing the file, or make the certificate optional by conditionally writing it only when STABLE_CA is provided.
| ARG STABLE_CA | ||
| ENV STABLE_CA=${STABLE_CA} | ||
|
|
||
| RUN echo "${STABLE_CA}" > /home/bun/stable.crt |
There was a problem hiding this comment.
The certificate file is being written without validation. If STABLE_CA is empty or malformed, this could create an invalid certificate file that fails silently. Consider adding validation to check if STABLE_CA is set and contains valid certificate data before writing the file, or make the certificate optional by conditionally writing it only when STABLE_CA is provided.
| RUN echo "${STABLE_CA}" > /home/bun/stable.crt | |
| RUN if [ -n "${STABLE_CA}" ]; then echo "${STABLE_CA}" > /home/bun/stable.crt; fi |
fixes #15