Skip to content

Conversation

@Wikid82
Copy link
Owner

@Wikid82 Wikid82 commented Jan 24, 2026

Summary

This PR migrates the Docker base image from Alpine 3.23 to Debian Trixie (slim) to address security vulnerabilities and improve package maintenance.

Key Changes

🐳 Base Image Migration: Alpine → Debian Trixie

  • Runtime image: alpine:3.23debian:trixie-slim
  • Node builder: node:24.13.0-alpinenode:24.13.0-slim
  • Rationale: Debian Trixie (testing) receives faster security updates. Packages marked "won't-fix" in Bookworm (stable) are actively maintained in Trixie.

🔒 Security: Build Gosu from Source

Added a dedicated build stage to compile gosu from source using Go 1.25, fixing 22 HIGH/CRITICAL CVEs embedded in Debian's pre-compiled gosu package (built with Go 1.19.8):

📦 Other Notable Changes

  • Nightly build workflow improvements (auto-sync, skip tests input, lowercase image name fix)
  • CrowdSec bumped to v1.7.6
  • E2E test infrastructure improvements (Phase 5/6 implementation)
  • User management UI implementation
  • Security module toggle actions
  • NPM/JSON import routes and SMTP persistence fixes

Testing

  • Docker image builds successfully for linux/amd64 and linux/arm64
  • Container smoke test passes (/health endpoint)
  • E2E Playwright tests pass
  • Security scans show reduced CVE count

Breaking Changes

None - this is a base image change with no API modifications.


Reviewers: Please verify the image size and startup time are acceptable compared to Alpine.

Wikid82 and others added 30 commits January 13, 2026 15:30
…tions-setup-go-digest

chore(deps): update actions/setup-go digest to 7a3fe6c (feature/beta-release)
…tions-setup-go-6.x

chore(deps): update actions/setup-go action to v6.2.0 (feature/beta-release)
Updated timezone and PR limits in Renovate config. Modified package rules for better grouping and automerge behavior.
…rts for PR #461

- Created `pr_461_remediation_complete.md` detailing the final remediation status, including bug fixes, test results, and coverage metrics.
- Added `pr_461_vulnerability_comment.md` summarizing the supply chain vulnerabilities accepted for PR #461, including risk assessments and mitigation strategies.
- Established `VULNERABILITY_ACCEPTANCE.md` to formally document the acceptance of 9 vulnerabilities in Alpine Linux packages, outlining the rationale, monitoring plans, and compliance with industry standards.

These documents ensure transparency and provide a clear audit trail for the vulnerability management process associated with PR #461.
Remove defensive audit error handlers that were blocking patch coverage
but were architecturally unreachable due to async buffered channel design.

Changes:

Remove 4 unreachable auditErr handlers from encryption_handler.go
Add test for independent audit failure (line 63)
Add test for duplicate domain import error (line 682)
Handler coverage improved to 86.5%
Phase 1 of Custom DNS Provider Plugin Support: the /api/v1/dns-providers/types
endpoint now returns types dynamically from the dnsprovider.Global() registry
instead of a hardcoded list.

Backend handler queries registry for all provider types, metadata, and fields
Response includes is_built_in flag to distinguish plugins from built-ins
Frontend types updated with DNSProviderField interface and new response shape
Fixed flaky WAF exclusion test (isolated file-based SQLite DB)
Updated operator docs for registry-driven discovery and plugin installation
Refs: #461
…ew fields

- Created a comprehensive documentation file for DNS provider types, including RFC 2136, Webhook, and Script providers, detailing their use cases, configurations, and security notes.
- Updated the DNSProviderForm component to handle new field types including select and textarea for better user input management.
- Enhanced the DNS provider schemas to include new fields for script execution, webhook authentication, and RFC 2136 configurations, improving flexibility and usability.
Implement Phase 3 of Custom DNS Provider Plugin Support with comprehensive
security controls for external plugin loading.

Add CHARON_PLUGIN_SIGNATURES env var for SHA-256 signature allowlisting
Support permissive (unset), strict ({}), and allowlist modes
Add directory permission verification (reject world-writable)
Configure container with non-root user and read-only plugin mount option
Add 22+ security tests for permissions, signatures, and allowlist logic
Create plugin-security.md operator documentation
Security controls:

Signature verification with sha256: prefix requirement
World-writable directory rejection
Non-root container execution (charon user UID 1000)
Read-only mount support for production deployments
Documented TOCTOU mitigation with atomic deployment workflow
- Implement API tests for DNS Provider Types, validating built-in and custom providers.
- Create UI tests for provider selection, ensuring all types are displayed and descriptions are shown.
- Introduce fixtures for consistent test data across DNS Provider tests.
- Update manual DNS provider tests to improve structure and accessibility checks.
Complete documentation overhaul for DNS Challenge Support feature (PR #461):

Rewrite features.md as marketing overview (87% reduction: 1,952 → 249 lines)
Organize features into 8 logical categories with "Learn More" links
Add comprehensive dns-challenge.md with:
15+ supported DNS providers (Cloudflare, Route53, DigitalOcean, etc.)
Step-by-step setup guides
Provider-specific configuration
Manual DNS challenge workflow
Troubleshooting section
Create 18 feature documentation stub pages
Update README.md with DNS Challenge in Top Features section
Refs: #21, #461
Comprehensive documentation overhaul for Charon features:

Rewrite features.md as marketing overview (87% reduction)
Create comprehensive dns-challenge.md for new DNS feature
Expand 18 feature stub pages into complete documentation:
SSL certificates, CrowdSec, WAF, ACLs, rate limiting
Security headers, proxy headers, web UI, Docker integration
Caddyfile import, logs, WebSocket, backup/restore
Live reload, localization, API, UI themes, supply chain security
Update README.md with DNS Challenge in Top Features
Total: ~2,000+ lines of new user-facing documentation

Refs: #21, #461
…sages

feat(tests): update Playwright configuration to include GitHub reporter and adjust base URL handling
The E2E test "should show script path field when Script type is selected"
was failing because the locator didn't match the actual UI field.

Update locator from /create/i to /script path/i
Update placeholder matcher from /create-dns/i to /dns-challenge.sh/i
Matches actual ScriptProvider field: label="Script Path",
placeholder="/scripts/dns-challenge.sh"
Also includes skill infrastructure for Playwright (separate feature):

Add test-e2e-playwright.SKILL.md for non-interactive test execution
Add run.sh script with argument parsing and report URL output
Add VS Code tasks for skill execution and report viewing
The DNS provider API endpoints were returning 404 in CI because the
encryption service failed to initialize with an invalid key.

Changed CHARON_ENCRYPTION_KEY from plain text to valid base64 string
Key "dGVzdC1lbmNyeXB0aW9uLWtleS1mb3ItY2ktMzJieXQ=" decodes to 32 bytes
Without valid encryption key, DNS provider routes don't register
This was causing all dns-provider-types.spec.ts tests to fail
Root cause: AES-256-GCM requires exactly 32 bytes for the key
The skip condition used github.ref to detect the beta-release branch,
but for PRs github.ref is "refs/pull/N/merge", not the branch name.

Added github.head_ref to env variables for PR branch detection
Updated condition to check both REF and HEAD_REF
This ensures E2E tests run for PRs from feature/beta-release branch
Separate PR-specific tests from docker-build.yml into dedicated workflows
that trigger via workflow_run. This creates a cleaner CI architecture where:

playwright.yml: E2E tests triggered after docker-build completes
security-pr.yml: Trivy binary scanning for PRs
supply-chain-pr.yml: SBOM generation + Grype vulnerability scanning
Implements all 13 fixes identified in the CI/CD audit against
github-actions-ci-cd-best-practices.instructions.md

Critical fixes:

Remove hardcoded encryption key from playwright.yml (security)
Fix artifact filename mismatch in supply-chain-pr.yml (bug)
Pin GoReleaser to ~> v2.5 instead of latest (supply chain)
High priority fixes:

Upgrade CodeQL action from v3 to v4 in supply-chain-pr.yml
Add environment protection for release workflow
Fix shell variable escaping ($$ → $) in release-goreleaser.yml
Medium priority fixes:

Add timeout-minutes to playwright.yml (20 min)
Add explicit permissions to quality-checks.yml
Add timeout-minutes to codecov-upload.yml jobs (15 min)
Fix benchmark.yml permissions (workflow-level read, job-level write)
Low priority fixes:

Add timeout-minutes to docs.yml jobs (10/5 min)
Add permissions block to docker-lint.yml
Add timeout-minutes to renovate.yml (30 min)
Update branch triggers and downstream workflow logic to support all
branches defined in docker-build.yml (main, development, feature/**).

Changes:

docker-build.yml: Expand branch glob to feature/**, use branch-based tags
playwright.yml: Replace is_beta_push with generic is_push detection
security-pr.yml: Same branch-agnostic pattern
supply-chain-pr.yml: Same pattern, skip PR comments for push events
The workflows now support any push that triggers docker-build:

main branch → tag: latest
development branch → tag: dev
feature/* branches → tag: {branch-name}
Pull requests → tag: pr-{number}
Dynamic artifact naming:

Push events: push-image (shared across all branches)
Pull requests: pr-image-{number}
This ensures CI/CD pipelines work for stable releases, bug fixes,
and new feature development without hardcoded branch names.
actions-user and others added 30 commits January 26, 2026 08:58
…oving caching strategies. Update Go version in e2e-tests.yml from 1.21 to 1.25.6, set GOTOOLCHAIN to auto across all workflows, and eliminate unnecessary npm installations to enhance CI performance by 30-40%.
Add missing emergency token environment variable to all E2E test workflows to
fix security teardown failures in CI. Without this token, the emergency reset
endpoint returns 501 "not configured", causing test teardown to fail and
leaving ACL enabled, which blocks 83 subsequent tests.

Changes:

Add CHARON_EMERGENCY_TOKEN to docker-build.yml test-image job
Add CHARON_EMERGENCY_TOKEN to e2e-tests.yml e2e-tests job
Add CHARON_EMERGENCY_TOKEN to playwright.yml playwright job
Verified:

Docker build strategy already optimal (build once, push to both GHCR + Docker Hub)
Testing strategy correct (test once by digest, validates both registries)
All workflows now have environment parity with local development setup
Requires GitHub repository secret:

Name: CHARON_EMERGENCY_TOKEN
Value: 64-char hex token (e.g., from openssl rand -hex 32)
Related:

Emergency endpoint rate limiting removal (proper fix)
Local emergency token configuration (.env, docker-compose.local.yml)
Security test suite teardown mechanism
Refs #550
Ensured that Playwright E2E shards reuse the pre-built Docker artifact
instead of triggering a full multi-stage build.

Added explicit image tag to docker-compose.playwright.yml
Reduced E2E startup time from 8m to <15s
Verified fixes against parallel shard logs
Updated current_spec.md with investigation details
Bypassed security-tests and security-teardown to isolate whether
ACL/rate limiting enforcement is causing shard failures.

Commented out security-tests project in playwright.config.js
Commented out security-teardown project
Removed security-tests dependency from browser projects
Test flow now: setup → chromium/firefox/webkit (direct)
This is a diagnostic change. Based on results:

If tests pass → security teardown is failing
If tests fail → investigate database/environment issues
References: PR #550
…n-dependencies

chore(deps): pin dependencies (feature/beta-release)
…ekly-non-major-updates

fix(deps): update weekly-non-major-updates (feature/beta-release)
…tions-checkout-6.x

chore(deps): update actions/checkout action to v6 (feature/beta-release)
…jor-6-github-artifact-actions

chore(deps): update actions/upload-artifact action to v6 (feature/beta-release)
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.

3 participants