Tags: zopdev/static-server
Tags
Add Config Hydration (#19) * Add multi-platform Docker image support (amd64 + arm64) Enable native arm64 support for Apple Silicon users by building multi-architecture images via buildx. Uses TARGETARCH for explicit Go cross-compilation. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Update README.md with tag v0.0.7 Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add QEMU setup for multi-platform Docker builds Required for arm64 emulation on amd64 runners. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Use cross-compilation for multi-platform Docker builds Replace QEMU emulation with native cross-compilation by adding --platform=$BUILDPLATFORM to the build stage. Go cross-compiles to the target architecture natively, eliminating slow emulation. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Update GitHub Actions to latest versions and add image output - actions/checkout v4 → v6 - actions/setup-go v4 → v6 (caching now enabled by default) - golangci/golangci-lint-action v8 → v9 - Add step to output pushed image registry path Co-Authored-By: Claude Opus 4.5 <[email protected]> * Added support for env hydration * Updated README.md * Code refactor * Fixed implementation * Fixed linter issues * Converted fields to unexported * Updated tests * Fixed linter issue * Added go doc for HydrateFile --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
Multi Platform Support (#18) * Add multi-platform Docker image support (amd64 + arm64) Enable native arm64 support for Apple Silicon users by building multi-architecture images via buildx. Uses TARGETARCH for explicit Go cross-compilation. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Update README.md with tag v0.0.7 Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add QEMU setup for multi-platform Docker builds Required for arm64 emulation on amd64 runners. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Use cross-compilation for multi-platform Docker builds Replace QEMU emulation with native cross-compilation by adding --platform=$BUILDPLATFORM to the build stage. Go cross-compiles to the target architecture natively, eliminating slow emulation. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Update GitHub Actions to latest versions and add image output - actions/checkout v4 → v6 - actions/setup-go v4 → v6 (caching now enabled by default) - golangci/golangci-lint-action v8 → v9 - Add step to output pushed image registry path Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
Build Fixes & Optimisations (#16) * Update workflow config and migrate golangci-lint to v2 - Bump Go version to 1.26 in workflow and Dockerfile - Update golangci-lint to v2.10.1 and migrate config to v2 format - Update docker/login-action to v3 - Make Docker push configurable via DOCKER_USERNAME, DOCKER_PASSWORD, and DOCKER_REGISTRY_TARGET variables - Add validation step to fail fast if Docker config is missing - Push both version tag and latest tag on release - Fix errcheck issues in tests Co-Authored-By: Claude Opus 4.5 <[email protected]> * Fix path traversal vulnerability (gosec G703) - Add sanitizePath function to validate paths stay within static directory - Extract resolveFilePath function to reduce cyclomatic complexity - Prevents directory traversal attacks via malicious URL paths Co-Authored-By: Claude Opus 4.5 <[email protected]> * Add tests for path traversal protection - TestSanitizePath: verifies path normalization behavior - TestSanitizePathPreventsEscape: verifies all paths stay within static dir Co-Authored-By: Claude Opus 4.5 <[email protected]> * Exclude gosec G703/G704 false positives in linter config - G703 (path traversal) in main.go: paths are sanitized via sanitizePath - G704 (SSRF) in tests: test code intentionally makes HTTP requests Co-Authored-By: Claude Opus 4.5 <[email protected]> * Revert unnecessary path traversal fix Go's net/http server already handles path traversal by returning 307 redirects for paths containing '..', normalizing them before they reach the handler. The original code using filepath.Join was already safe. Keeping gosec exclusions in .golangci.yml for the false positives. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Skip Docker push with warning if config is missing Instead of failing the workflow when Docker credentials are not configured, emit warnings and skip the Docker login/push steps. This allows the release job to complete successfully even without Docker Hub configuration. Co-Authored-By: Claude Opus 4.5 <[email protected]> * Optimize workflow build times with caching - Add Go module caching via actions/setup-go cache: true - Replace container-based golangci-lint with golangci-lint-action@v6 (eliminates container pull, adds lint caching) - Add Docker layer caching via buildx and GitHub Actions cache - Skip all release steps if Docker config is missing (not just push) - Remove redundant go mod download steps Co-Authored-By: Claude Opus 4.5 <[email protected]> * Update golangci-lint-action to v8 Co-Authored-By: Claude Opus 4.5 <[email protected]> * Extract Docker config check into separate job - New check_docker_config job outputs whether Docker is configured - release_package job skipped cleanly if config missing (via job-level if) - Cleaner workflow visualization - job shows as "skipped" instead of running with all steps skipped Co-Authored-By: Claude Opus 4.5 <[email protected]> * Switch to distroless base image - Use gcr.io/distroless/static-debian12 for minimal attack surface - Build with CGO_ENABLED=0 for static binary - Add -s -w ldflags to strip debug info and reduce size - Remove Alpine and apk dependencies Co-Authored-By: Claude Opus 4.5 <[email protected]> * Updated secret name to DOCKER_HUB_PAT to match existing secret in repo * Updated gofr version to 1.54.3 * Addressed image scanning issues * Removed the latest tagging from workflow Updated README.md with tag v0.0.6 instead of latest --------- Co-authored-by: Claude Opus 4.5 <[email protected]>