-
Notifications
You must be signed in to change notification settings - Fork 2
feat: trusted CA #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: trusted CA #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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