Skip to content

Conversation

@pernydev
Copy link
Member

@pernydev pernydev commented Oct 25, 2025

fixes #15

@pernydev pernydev requested a review from Copilot October 27, 2025 00:04
Copy link

Copilot AI left a 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_CA build 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
Copy link

Copilot AI Oct 27, 2025

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.

Copilot uses AI. Check for mistakes.
ARG STABLE_CA
ENV STABLE_CA=${STABLE_CA}

RUN echo "${STABLE_CA}" > /home/bun/stable.crt
Copy link

Copilot AI Oct 27, 2025

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.

Suggested change
RUN echo "${STABLE_CA}" > /home/bun/stable.crt
RUN if [ -n "${STABLE_CA}" ]; then echo "${STABLE_CA}" > /home/bun/stable.crt; fi

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: trusted CA

2 participants