From b8096958f5b9e11ed0117f45bffb0193b255f801 Mon Sep 17 00:00:00 2001 From: darksworm <9987548+darksworm@users.noreply.github.com> Date: Wed, 7 Oct 2026 17:38:22 +0200 Subject: [PATCH 1/2] chore: update dependencies and build tools to current releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrade Go libraries, CI actions, and container and Nix inputs to keep builds current. Require Go 1.26 and use Go 1.27 for build tooling. 💘 Generated with Crush Assisted-by: Crush:gpt-6-astra --- .github/workflows/aur-git-publish.yml | 4 +- .github/workflows/goreleaser.yml | 22 +++---- .github/workflows/pr-prerelease.yml | 28 ++++---- .github/workflows/release-pipeline.yml | 6 +- .github/workflows/test.yml | 12 ++-- .github/workflows/update-nix-vendorhash.yml | 6 +- Dockerfile | 4 +- Dockerfile.runtime | 2 +- Dockerfile.v2 | 2 +- flake.lock | 8 +-- flake.nix | 8 +-- go.mod | 36 +++++------ go.sum | 71 +++++++++++---------- 13 files changed, 106 insertions(+), 103 deletions(-) diff --git a/.github/workflows/aur-git-publish.yml b/.github/workflows/aur-git-publish.yml index c136ce98..ffd241b4 100644 --- a/.github/workflows/aur-git-publish.yml +++ b/.github/workflows/aur-git-publish.yml @@ -18,7 +18,7 @@ jobs: if: github.repository == 'darksworm/argonaut' steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 persist-credentials: false @@ -51,7 +51,7 @@ jobs: - name: Publish to AUR if: env.AUR_SSH_PRIVATE_KEY != '' - uses: KSXGitHub/github-actions-deploy-aur@9dfe151cf48f26a957bbd0379c120e79cb990e13 # v2.7.2 + uses: KSXGitHub/github-actions-deploy-aur@084b0d9b15415bf9cdb65d44dad1efe37a354050 # v4.2.0 with: pkgname: argonaut-git pkgbuild: dist/aur/PKGBUILD diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index b2c59696..cf79ba6c 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout tag - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: # Fetch recent tags for GoReleaser changelog generation fetch-depth: 100 @@ -44,19 +44,19 @@ jobs: git config --global user.email "bot@goreleaser.com" - name: Setup Go - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: - go-version: '1.25' + go-version: '1.27' cache: false - name: Set up QEMU - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 + uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 - name: Log in to ghcr.io - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -64,7 +64,7 @@ jobs: - name: Setup SSH key for AUR if: env.AUR_SSH_PRIVATE_KEY != '' - uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 + uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 with: ssh-private-key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} env: @@ -72,7 +72,7 @@ jobs: - name: Import GPG key if: env.GPG_PRIVATE_KEY != '' - uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6 + uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} @@ -80,7 +80,7 @@ jobs: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6 + uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 with: distribution: goreleaser version: nightly @@ -93,14 +93,14 @@ jobs: TAG: ${{ inputs.tag }} - name: Upload GoReleaser artifacts for npm publishing - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: goreleaser-dist-release path: dist/ retention-days: 1 - name: Publish release - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: github-token: ${{ secrets.RELEASE_PLEASE_TOKEN }} script: | diff --git a/.github/workflows/pr-prerelease.yml b/.github/workflows/pr-prerelease.yml index c127a687..3b7ee906 100644 --- a/.github/workflows/pr-prerelease.yml +++ b/.github/workflows/pr-prerelease.yml @@ -30,7 +30,7 @@ jobs: - name: Get PR details for comment trigger id: pr-details if: github.event_name == 'issue_comment' - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const pr = await github.rest.pulls.get({ @@ -86,23 +86,23 @@ jobs: pre_version: ${{ steps.version.outputs.version }} steps: - name: Checkout PR code - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 1 ref: ${{ needs.check-release-pr.outputs.pr_sha }} persist-credentials: false - name: Setup Go - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: - go-version: '1.25' + go-version: '1.27' cache: false - name: Set up QEMU - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 + uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 - name: Create snapshot version id: version @@ -126,7 +126,7 @@ jobs: echo "Building pre-release version: $VERSION" - name: Run GoReleaser release with dev tags (no publishing) - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6 + uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 with: distribution: goreleaser version: nightly @@ -171,7 +171,7 @@ jobs: cd .. - name: Upload Linux binaries - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: linux-binaries-${{ steps.version.outputs.version }} path: pr-artifacts/argonaut-linux-* @@ -179,7 +179,7 @@ jobs: if-no-files-found: ignore - name: Upload macOS binaries - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: macos-binaries-${{ steps.version.outputs.version }} path: pr-artifacts/argonaut-darwin-* @@ -187,7 +187,7 @@ jobs: if-no-files-found: ignore - name: Upload DEB packages - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: deb-packages-${{ steps.version.outputs.version }} path: pr-artifacts/*.deb @@ -195,7 +195,7 @@ jobs: if-no-files-found: ignore - name: Upload RPM packages - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: rpm-packages-${{ steps.version.outputs.version }} path: pr-artifacts/*.rpm @@ -203,7 +203,7 @@ jobs: if-no-files-found: ignore - name: Upload APK packages - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: apk-packages-${{ steps.version.outputs.version }} path: pr-artifacts/*.apk @@ -211,14 +211,14 @@ jobs: if-no-files-found: ignore - name: Upload checksums - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: checksums-${{ steps.version.outputs.version }} path: pr-artifacts/checksums.txt retention-days: 30 - name: Comment on PR with download link - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: PRE_VERSION: ${{ steps.version.outputs.version }} PR_NUMBER: ${{ needs.check-release-pr.outputs.pr_number }} diff --git a/.github/workflows/release-pipeline.yml b/.github/workflows/release-pipeline.yml index 8c94e833..82ccf7e2 100644 --- a/.github/workflows/release-pipeline.yml +++ b/.github/workflows/release-pipeline.yml @@ -21,7 +21,7 @@ jobs: steps: - name: release id: release - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4 + uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 with: token: ${{ secrets.RELEASE_PLEASE_TOKEN }} config-file: release-please-config.json @@ -50,7 +50,7 @@ jobs: - manjarolinux/base:latest steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false @@ -72,7 +72,7 @@ jobs: - archlinux:latest steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c2165b97..129e4578 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,16 +11,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Go - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: - go-version: '1.25.x' + go-version: '1.27.x' check-latest: true - name: Cache Go build - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | ~/.cache/go-build @@ -39,7 +39,7 @@ jobs: fi - name: Run staticcheck - run: go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./... + run: go run honnef.co/go/tools/cmd/staticcheck@v0.8.1 ./... - name: Run tests (unit + e2e) # Match parallelism to the runner's core count — full CPU @@ -52,7 +52,7 @@ jobs: - name: Upload e2e test snapshots if: failure() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: e2e-test-snapshots path: e2e/test-snapshots/ diff --git a/.github/workflows/update-nix-vendorhash.yml b/.github/workflows/update-nix-vendorhash.yml index 29fadaa9..91d5949d 100644 --- a/.github/workflows/update-nix-vendorhash.yml +++ b/.github/workflows/update-nix-vendorhash.yml @@ -17,13 +17,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 ref: ${{ github.head_ref || github.ref }} - name: Install Nix - uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 + uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1 with: extra_nix_config: | experimental-features = nix-command flakes @@ -51,7 +51,7 @@ jobs: - name: Create pull request with updated vendorHash if: steps.diff.outputs.changed == 'true' && github.event_name == 'workflow_dispatch' - uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: commit-message: "chore: update Nix vendor hash" branch: bot/update-nix-vendor-hash diff --git a/Dockerfile b/Dockerfile index 5accc5e8..ce690c6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Builder # ########### # Build a static Linux binary with Go -FROM golang:1.25-alpine AS builder +FROM golang:1.27-alpine AS builder WORKDIR /src RUN apk add --no-cache git @@ -20,7 +20,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \ # Runtime # ############# # Use Alpine (musl) to match the compiled binary's dynamic linker -FROM alpine:3.20 +FROM alpine:3.24 ARG TARGETARCH diff --git a/Dockerfile.runtime b/Dockerfile.runtime index 96049dec..a83de3f1 100644 --- a/Dockerfile.runtime +++ b/Dockerfile.runtime @@ -1,4 +1,4 @@ -FROM alpine:3.20 +FROM alpine:3.24 ARG TARGETARCH diff --git a/Dockerfile.v2 b/Dockerfile.v2 index b5a4b358..78a24d03 100644 --- a/Dockerfile.v2 +++ b/Dockerfile.v2 @@ -1,4 +1,4 @@ -FROM alpine:3.20 +FROM alpine:3.24 ARG TARGETPLATFORM ARG TARGETARCH diff --git a/flake.lock b/flake.lock index 7dcc6c72..4b9ffca0 100644 --- a/flake.lock +++ b/flake.lock @@ -20,16 +20,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1774388614, - "narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", + "lastModified": 1791353474, + "narHash": "sha256-v72qr4LsSz61tQki/41nHKZKPY6NSeZavtGlAInOCng=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", + "rev": "2efa67fd26b6df417c33e4603185c701f260dd83", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-25.11", + "ref": "nixos-26.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index e4f28516..2e0a7bba 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -18,7 +18,7 @@ in { env.CGO_ENABLED = 0; - packages.default = pkgs.buildGoModule { + packages.default = pkgs.buildGo127Module { pname = "argonaut"; name = "argonaut"; meta = with pkgs.lib; { @@ -32,7 +32,7 @@ mainProgram = "argonaut"; }; src = ./.; - vendorHash = "sha256-b9Xq7CTEvdwtNtgF9PRKp2HkVNzxm6z+yCmH5ny9Hfc="; + vendorHash = "sha256-pJ/tE7Wrkk5RbXdWYrdGVK5New/wAtTAAPGLknaf2uw="; proxyVendor = true; subPackages = [ "cmd/app" ]; ldflags = [ @@ -61,7 +61,7 @@ self.packages.${system}.default argocd delta - go_1_25 + go_1_27 gopls gotools golangci-lint diff --git a/go.mod b/go.mod index 7830c6bf..2f22462e 100644 --- a/go.mod +++ b/go.mod @@ -1,20 +1,20 @@ module github.com/darksworm/argonaut -go 1.25.0 +go 1.26.0 require ( - charm.land/bubbles/v2 v2.1.1 - charm.land/bubbletea/v2 v2.0.8 - charm.land/lipgloss/v2 v2.0.5 + charm.land/bubbles/v2 v2.2.1 + charm.land/bubbletea/v2 v2.0.10 + charm.land/lipgloss/v2 v2.0.6 github.com/charmbracelet/log v1.0.0 github.com/creack/pty v1.1.24 github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 github.com/pelletier/go-toml/v2 v2.4.3 - github.com/tidwall/gjson v1.19.0 + github.com/tidwall/gjson v1.20.0 github.com/tidwall/sjson v1.2.5 - golang.org/x/oauth2 v0.36.0 - golang.org/x/sys v0.47.0 - golang.org/x/term v0.45.0 + golang.org/x/oauth2 v0.37.0 + golang.org/x/sys v0.48.0 + golang.org/x/term v0.46.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -23,8 +23,8 @@ require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/charmbracelet/colorprofile v0.4.3 // indirect github.com/charmbracelet/lipgloss v1.1.0 // indirect - github.com/charmbracelet/ultraviolet v0.0.0-20260720091822-7cc6674724ac // indirect - github.com/charmbracelet/x/ansi v0.11.7 // indirect + github.com/charmbracelet/ultraviolet v0.0.0-20261001125412-878653296cfd // indirect + github.com/charmbracelet/x/ansi v0.11.8 // indirect github.com/charmbracelet/x/cellbuf v0.0.15 // indirect github.com/charmbracelet/x/term v0.2.2 // indirect github.com/charmbracelet/x/termios v0.1.1 // indirect @@ -33,16 +33,16 @@ require ( github.com/clipperhouse/uax29/v2 v2.7.0 // indirect github.com/go-logfmt/logfmt v0.6.1 // indirect github.com/kr/pretty v0.3.1 // indirect - github.com/lucasb-eyer/go-colorful v1.4.0 // indirect - github.com/mattn/go-isatty v0.0.23 // indirect - github.com/mattn/go-runewidth v0.0.24 // indirect + github.com/lucasb-eyer/go-colorful v1.4.1 // indirect + github.com/mattn/go-isatty v0.0.24 // indirect + github.com/mattn/go-runewidth v0.0.30 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/termenv v0.16.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/tidwall/match v1.2.0 // indirect - github.com/tidwall/pretty v1.2.1 // indirect - github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - golang.org/x/exp v0.0.0-20260718201538-764159d718ef // indirect - golang.org/x/sync v0.22.0 // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + github.com/tidwall/pretty v1.2.2 // indirect + github.com/xo/terminfo v1.2.0 // indirect + golang.org/x/exp v0.0.0-20261005173118-76772065c9b0 // indirect + golang.org/x/sync v0.23.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/go.sum b/go.sum index 5ee9589a..a61c9d3f 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ -charm.land/bubbles/v2 v2.1.1 h1:7r55WzBxpo/R3z98hGmY7KKPd3ET6vsf0Fb9sDHOV60= -charm.land/bubbles/v2 v2.1.1/go.mod h1:GE6M31gaWZVXzGw73OeuTTgy4lX+OtkH0E5ymnNsHxo= -charm.land/bubbletea/v2 v2.0.8 h1:SxTJMhCAI3lbPmy4SgX5LWZ24AdINr4I6UEqzZvYJuY= -charm.land/bubbletea/v2 v2.0.8/go.mod h1:2SkdgoTXluXJHOUwAoRlRXF/28vklb1rFl6GcgV1/ss= -charm.land/lipgloss/v2 v2.0.5 h1:kbNxgeeUOYv5J0YdpxFjfvf3dFvqH8Aci4zB6xqFtrY= -charm.land/lipgloss/v2 v2.0.5/go.mod h1:9oqhxt4yxIMe6q5A4kHr44DremZk7J9UNh74GlWa5nc= +charm.land/bubbles/v2 v2.2.1 h1:Fq1+qm5hV6GkvzLQDhCBpXXE5tLgvh1PRriCLwSvIQU= +charm.land/bubbles/v2 v2.2.1/go.mod h1:wdMgn+sje1KNXdwFizIWjbf328fIUBxqEmJ/vYPo8yc= +charm.land/bubbletea/v2 v2.0.10 h1:oolvo20VBpI0PfqE7iFjkZ1bx0WpmXGfnKz5Yldjq5o= +charm.land/bubbletea/v2 v2.0.10/go.mod h1:QOatcnhOjYIfxzUSTz6raF7Ex4R/rIuHa3SnBdCCpMc= +charm.land/lipgloss/v2 v2.0.6 h1:EaGKeuA8FvF+v2BT5VmZd2LoYLaMZJXA5n34th8nCIQ= +charm.land/lipgloss/v2 v2.0.6/go.mod h1:ipDDJNSGa1hlwDtSfW1s2/xR8Vdhbut4PXh2zEKZd0Q= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -16,10 +16,10 @@ github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoF github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= github.com/charmbracelet/log v1.0.0 h1:HVVVMmfOorfj3BA9i8X8UL69Hoz9lI0PYwXfJvOdRc4= github.com/charmbracelet/log v1.0.0/go.mod h1:uYgY3SmLpwJWxmlrPwXvzVYujxis1vAKRV/0VQB7yWA= -github.com/charmbracelet/ultraviolet v0.0.0-20260720091822-7cc6674724ac h1:BP8qMDGjmOejoVTklEXXTHI0OwMIt8JHPSPHxscFFwA= -github.com/charmbracelet/ultraviolet v0.0.0-20260720091822-7cc6674724ac/go.mod h1:psnCZIfwwxVs6v6DhUc6NJ8AQ3ejvs2ejKwoOMeVmUk= -github.com/charmbracelet/x/ansi v0.11.7 h1:kzv1kJvjg2S3r9KHo8hDdHFQLEqn4RBCb39dAYC84jI= -github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ= +github.com/charmbracelet/ultraviolet v0.0.0-20261001125412-878653296cfd h1:W0HOPGkwRaAmV20plE/f+Rk6Xn+IdR8G0qHsGXcOnF8= +github.com/charmbracelet/ultraviolet v0.0.0-20261001125412-878653296cfd/go.mod h1:D9SVXVpAsD1pP6xR6BiERbe4+dUU6EW9US1TFrNutGA= +github.com/charmbracelet/x/ansi v0.11.8 h1:JMFwp0CgDC2+jcOB162HH5k7I3FVbgFSMMYg7dSPBQQ= +github.com/charmbracelet/x/ansi v0.11.8/go.mod h1:ZNN+3mXny/516oTQPLMPIBeSINvNJJQ8uQXDgbeJxY0= github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI= github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q= github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA= @@ -45,16 +45,19 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= -github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/mattn/go-isatty v0.0.23 h1:cYwCQTQf3HB6xUC+BtyCLZNr7IzbOmoZbmssVNzSyiQ= -github.com/mattn/go-isatty v0.0.23/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= -github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU= -github.com/mattn/go-runewidth v0.0.24/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/lucasb-eyer/go-colorful v1.4.1 h1:1EO+WB73+EH8EVbzlrG3KLAfEypQWVHIBqlTf+2hNss= +github.com/lucasb-eyer/go-colorful v1.4.1/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= +github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= +github.com/mattn/go-runewidth v0.0.30 h1:+KUuiDA4fF0R1p5FeueHefjDm+GIM+kWfFnDjybOPgk= +github.com/mattn/go-runewidth v0.0.30/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= @@ -71,30 +74,30 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.19.0 h1:xwxm7n691Uf3u5OFjzngavjGTh55KX5q/9w9xHW88JU= -github.com/tidwall/gjson v1.19.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc= +github.com/tidwall/gjson v1.20.0 h1:+agJ3rEzKcCXKDKo0ml26UROcpcAlnZyjq+TjbY5Fto= +github.com/tidwall/gjson v1.20.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= -github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.2 h1:dz1jrRuE7or/74V490B4/GP1pZm5WKlt2bgCP5A83w8= +github.com/tidwall/pretty v1.2.2/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= -github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= -golang.org/x/exp v0.0.0-20260718201538-764159d718ef h1:LkZ48HFgy/TvhTI0bcWkjgFkgLyKUwcTbDjS0DUjw+A= -golang.org/x/exp v0.0.0-20260718201538-764159d718ef/go.mod h1:EdfpwwqSu+0Li0mzskwHU6FWDV3t9Q+RZDo3QMUtL3Q= -golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= -golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= -golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= -golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= -golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= -golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= +github.com/xo/terminfo v1.2.0 h1:d0ZTOCpuGE0lwSAOs0zcJjwz3jWQyqcRt9XbGJpCOl4= +github.com/xo/terminfo v1.2.0/go.mod h1:lGzkSo8Fe7IRh/w+Gqz7n5mDog4FVXCj3gy/DYTBqio= +golang.org/x/exp v0.0.0-20261005173118-76772065c9b0 h1:qUp3i6M39kccSm3OMMIE3tvs7YQWO9rFeCKdk1sSaFk= +golang.org/x/exp v0.0.0-20261005173118-76772065c9b0/go.mod h1:SRjTzy5WcYqRRqquLUvHeeovSwLO0CZ3xcltZNO4Fck= +golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98= +golang.org/x/oauth2 v0.37.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE= +golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 3c6fedbd6031e00118f4dabfc6a798489632799f Mon Sep 17 00:00:00 2001 From: darksworm <9987548+darksworm@users.noreply.github.com> Date: Wed, 7 Oct 2026 17:52:47 +0200 Subject: [PATCH 2/2] fix: prevent TLS tests from failing when fixture certificates expire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generate fresh certificates for each test so CI keeps verifying trust and client authentication without relying on dated fixtures. 💘 Generated with Crush Assisted-by: Crush:gpt-6-astra --- e2e/tls_cert_test.go | 115 ++++++++++++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 29 deletions(-) diff --git a/e2e/tls_cert_test.go b/e2e/tls_cert_test.go index 1f1c6507..63e2609d 100644 --- a/e2e/tls_cert_test.go +++ b/e2e/tls_cert_test.go @@ -3,12 +3,81 @@ package main import ( + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "math/big" + "net" + "os" "path/filepath" "strings" "testing" "time" ) +func generateTLSCertificates(t *testing.T) string { + t.Helper() + directory := t.TempDir() + now := time.Now() + caKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + t.Fatal(err) + } + ca := &x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{CommonName: "Argonaut E2E CA"}, + NotBefore: now.Add(-time.Hour), + NotAfter: now.Add(24 * time.Hour), + KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageDigitalSignature, + BasicConstraintsValid: true, + IsCA: true, + } + writePEM := func(name, kind string, data []byte) { + t.Helper() + if err := os.WriteFile(filepath.Join(directory, name), pem.EncodeToMemory(&pem.Block{Type: kind, Bytes: data}), 0600); err != nil { + t.Fatal(err) + } + } + caDER, err := x509.CreateCertificate(rand.Reader, ca, ca, &caKey.PublicKey, caKey) + if err != nil { + t.Fatal(err) + } + writePEM("ca.pem", "CERTIFICATE", caDER) + for index, name := range []string{"server", "client"} { + key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + t.Fatal(err) + } + certificate := &x509.Certificate{ + SerialNumber: big.NewInt(int64(index + 2)), + Subject: pkix.Name{CommonName: name}, + NotBefore: ca.NotBefore, + NotAfter: ca.NotAfter, + KeyUsage: x509.KeyUsageDigitalSignature, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + } + if name == "server" { + certificate.ExtKeyUsage = []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth} + certificate.DNSNames = []string{"localhost"} + certificate.IPAddresses = []net.IP{net.ParseIP("127.0.0.1"), net.ParseIP("::1")} + } + certificateDER, err := x509.CreateCertificate(rand.Reader, certificate, ca, &key.PublicKey, caKey) + if err != nil { + t.Fatal(err) + } + keyDER, err := x509.MarshalPKCS8PrivateKey(key) + if err != nil { + t.Fatal(err) + } + writePEM(name+".crt", "CERTIFICATE", certificateDER) + writePEM(name+".key", "PRIVATE KEY", keyDER) + } + return directory +} + // TestTLSInvalidCertFile tests that argonaut shows proper error when cert file is invalid func TestTLSInvalidCertFile(t *testing.T) { t.Parallel() @@ -57,12 +126,9 @@ func TestTLSUntrustedCert(t *testing.T) { t.Cleanup(tf.Cleanup) // Get absolute paths to test certificates - cwd, err := filepath.Abs(".") - if err != nil { - t.Fatalf("failed to get working directory: %v", err) - } - serverCertPath := filepath.Join(cwd, "testdata", "certs", "server.crt") - serverKeyPath := filepath.Join(cwd, "testdata", "certs", "server.key") + cwd := generateTLSCertificates(t) + serverCertPath := filepath.Join(cwd, "server.crt") + serverKeyPath := filepath.Join(cwd, "server.key") // Create HTTPS server with self-signed certificate srv, err := MockArgoServerHTTPS(serverCertPath, serverKeyPath) @@ -109,13 +175,10 @@ func TestTLSTrustedCert(t *testing.T) { t.Cleanup(tf.Cleanup) // Get absolute paths to test certificates - cwd, err := filepath.Abs(".") - if err != nil { - t.Fatalf("failed to get working directory: %v", err) - } - serverCertPath := filepath.Join(cwd, "testdata", "certs", "server.crt") - serverKeyPath := filepath.Join(cwd, "testdata", "certs", "server.key") - caCertPath := filepath.Join(cwd, "testdata", "certs", "ca.pem") + cwd := generateTLSCertificates(t) + serverCertPath := filepath.Join(cwd, "server.crt") + serverKeyPath := filepath.Join(cwd, "server.key") + caCertPath := filepath.Join(cwd, "ca.pem") // Create HTTPS server with self-signed certificate srv, err := MockArgoServerHTTPS(serverCertPath, serverKeyPath) @@ -168,13 +231,10 @@ func TestTLSClientCertAuthFails(t *testing.T) { t.Cleanup(tf.Cleanup) // Get absolute paths to test certificates - cwd, err := filepath.Abs(".") - if err != nil { - t.Fatalf("failed to get working directory: %v", err) - } - serverCertPath := filepath.Join(cwd, "testdata", "certs", "server.crt") - serverKeyPath := filepath.Join(cwd, "testdata", "certs", "server.key") - caCertPath := filepath.Join(cwd, "testdata", "certs", "ca.pem") + cwd := generateTLSCertificates(t) + serverCertPath := filepath.Join(cwd, "server.crt") + serverKeyPath := filepath.Join(cwd, "server.key") + caCertPath := filepath.Join(cwd, "ca.pem") // Create HTTPS server that requires client certificates srv, err := MockArgoServerHTTPSWithClientAuth(serverCertPath, serverKeyPath, caCertPath) @@ -214,15 +274,12 @@ func TestTLSClientCertAuthSucceeds(t *testing.T) { t.Cleanup(tf.Cleanup) // Get absolute paths to test certificates - cwd, err := filepath.Abs(".") - if err != nil { - t.Fatalf("failed to get working directory: %v", err) - } - serverCertPath := filepath.Join(cwd, "testdata", "certs", "server.crt") - serverKeyPath := filepath.Join(cwd, "testdata", "certs", "server.key") - caCertPath := filepath.Join(cwd, "testdata", "certs", "ca.pem") - clientCertPath := filepath.Join(cwd, "testdata", "certs", "client.crt") - clientKeyPath := filepath.Join(cwd, "testdata", "certs", "client.key") + cwd := generateTLSCertificates(t) + serverCertPath := filepath.Join(cwd, "server.crt") + serverKeyPath := filepath.Join(cwd, "server.key") + caCertPath := filepath.Join(cwd, "ca.pem") + clientCertPath := filepath.Join(cwd, "client.crt") + clientKeyPath := filepath.Join(cwd, "client.key") // Create HTTPS server that requires client certificates srv, err := MockArgoServerHTTPSWithClientAuth(serverCertPath, serverKeyPath, caCertPath)