From b017f8edcda2b7d02ea8f5fdb84083743a77fc26 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 9 Apr 2026 09:55:37 +0100 Subject: [PATCH] fix: remediate default branch dependency alerts --- .github/workflows/create-release.yml | 6 ++--- .github/workflows/deploy-demo-server.yml | 2 +- .github/workflows/test-e2e.yml | 1 + .github/workflows/test-updates.yml | 4 +-- Dockerfile | 2 +- frontend-modern/package-lock.json | 8 +++--- frontend-modern/package.json | 2 +- go.mod | 18 ++++++------- go.sum | 32 ++++++++++++------------ tests/integration/playwright.config.ts | 2 +- tests/integration/scripts/pretest.mjs | 10 +++----- tests/integration/tests/helpers.ts | 2 +- 12 files changed, 42 insertions(+), 47 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 5cd415910..eb06cc7c6 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -140,7 +140,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version-file: go.mod cache: true - name: Run backend tests @@ -239,7 +239,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version-file: go.mod cache: true - name: Build Pulse Docker image for integration tests @@ -309,7 +309,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version-file: go.mod cache: true - name: Set up Node.js diff --git a/.github/workflows/deploy-demo-server.yml b/.github/workflows/deploy-demo-server.yml index b2052a939..f5d396a1b 100644 --- a/.github/workflows/deploy-demo-server.yml +++ b/.github/workflows/deploy-demo-server.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version-file: go.mod cache: true - name: Set up Node.js diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index a14a557fe..601eb6792 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -57,6 +57,7 @@ jobs: - name: Build Docker images for test environment run: | + docker build -t pulse:test --target runtime . docker build -t pulse-mock-github:test ./tests/integration/mock-github-server env: PULSE_LICENSE_PUBLIC_KEY: ${{ secrets.PULSE_LICENSE_PUBLIC_KEY }} diff --git a/.github/workflows/test-updates.yml b/.github/workflows/test-updates.yml index 7bddc8fc3..aa879e9fa 100644 --- a/.github/workflows/test-updates.yml +++ b/.github/workflows/test-updates.yml @@ -75,7 +75,7 @@ jobs: docker build -t pulse-mock-github:test ./mock-github-server # Build Pulse test image - cd ../../ + docker build -t pulse:test --target runtime ../../ env: PULSE_LICENSE_PUBLIC_KEY: ${{ secrets.PULSE_LICENSE_PUBLIC_KEY }} @@ -89,7 +89,7 @@ jobs: run: | docker compose -f docker-compose.test.yml up -d --wait npx playwright test tests/00-diagnostic.spec.ts --reporter=list,html - UPDATE_API_BASE_URL=http://localhost:7655 go test ../../tests/integration/api -run TestUpdateFlowIntegration -count=1 + UPDATE_API_BASE_URL=http://127.0.0.1:7655 go test ../../tests/integration/api -run TestUpdateFlowIntegration -count=1 docker compose -f docker-compose.test.yml down -v - name: Upload test results diff --git a/Dockerfile b/Dockerfile index 44a480eda..cd699afb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN --mount=type=cache,id=pulse-npm-cache,target=/root/.npm \ # Build stage for Go backend # Force amd64 platform - Go cross-compiles for all targets anyway, # and this avoids slow QEMU emulation during multi-arch builds -FROM --platform=linux/amd64 golang:1.24-alpine AS backend-builder +FROM --platform=linux/amd64 golang:1.25-alpine AS backend-builder ARG BUILD_AGENT ARG PULSE_LICENSE_PUBLIC_KEY diff --git a/frontend-modern/package-lock.json b/frontend-modern/package-lock.json index 3cc634d40..9be08690f 100644 --- a/frontend-modern/package-lock.json +++ b/frontend-modern/package-lock.json @@ -33,7 +33,7 @@ "tailwindcss": "^3.4.18", "typescript": "^5.3.0", "typescript-eslint": "^8.57.2", - "vite": "^6.4.1", + "vite": "^6.4.2", "vite-plugin-solid": "^2.8.0", "vitest": "^4.1.2" } @@ -5253,9 +5253,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", - "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", + "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/frontend-modern/package.json b/frontend-modern/package.json index cbfa2229c..b37efb5ec 100644 --- a/frontend-modern/package.json +++ b/frontend-modern/package.json @@ -56,7 +56,7 @@ "tailwindcss": "^3.4.18", "typescript": "^5.3.0", "typescript-eslint": "^8.57.2", - "vite": "^6.4.1", + "vite": "^6.4.2", "vite-plugin-solid": "^2.8.0", "vitest": "^4.1.2" } diff --git a/go.mod b/go.mod index 196db9d0d..bd52e4197 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/rcourtman/pulse-go-rewrite -go 1.24.0 - -toolchain go1.24.7 +go 1.25.0 require ( github.com/IGLOU-EU/go-wildcard/v2 v2.1.0 @@ -25,7 +23,7 @@ require ( golang.org/x/crypto v0.48.0 golang.org/x/oauth2 v0.35.0 golang.org/x/sync v0.19.0 - golang.org/x/sys v0.41.0 + golang.org/x/sys v0.42.0 golang.org/x/term v0.40.0 k8s.io/api v0.32.0 k8s.io/apimachinery v0.32.0 @@ -49,7 +47,7 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/go-jose/go-jose/v4 v4.1.3 // indirect + github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -94,12 +92,10 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect - go.opentelemetry.io/otel v1.40.0 // indirect - go.opentelemetry.io/otel/metric v1.40.0 // indirect - go.opentelemetry.io/otel/sdk v1.40.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.40.0 // indirect - go.opentelemetry.io/otel/trace v1.40.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect + go.opentelemetry.io/otel v1.43.0 // indirect + go.opentelemetry.io/otel/metric v1.43.0 // indirect + go.opentelemetry.io/otel/trace v1.43.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect golang.org/x/net v0.50.0 // indirect diff --git a/go.sum b/go.sum index a1cab3c5e..7b372733a 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= -github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= +github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -204,18 +204,18 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg= -go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= -go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= -go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= -go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= -go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= -go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= -go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= -go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= -go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= -go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo= +go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= +go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= +go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= +go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= +go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= +go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= +go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= +go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= +go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= +go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= @@ -252,8 +252,8 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= -golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/tests/integration/playwright.config.ts b/tests/integration/playwright.config.ts index 6c8977e8c..e95d87eea 100644 --- a/tests/integration/playwright.config.ts +++ b/tests/integration/playwright.config.ts @@ -35,7 +35,7 @@ export default defineConfig({ /* Shared settings for all projects */ use: { /* Base URL for all tests */ - baseURL: process.env.PULSE_BASE_URL || process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:7655', + baseURL: process.env.PULSE_BASE_URL || process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:7655', /* Allow testing against self-signed TLS when explicitly enabled */ ignoreHTTPSErrors: ['1', 'true', 'yes', 'on'].includes( diff --git a/tests/integration/scripts/pretest.mjs b/tests/integration/scripts/pretest.mjs index 9cfdcfb84..d309a5365 100644 --- a/tests/integration/scripts/pretest.mjs +++ b/tests/integration/scripts/pretest.mjs @@ -68,13 +68,11 @@ const waitForHealth = async (healthURL, timeoutMs = 120_000) => { const checkHealth = () => { return new Promise((resolve) => { - const req = client.get({ - ...target, - agent, - }, (res) => { + const onResponse = (res) => { res.resume(); // Consume response data to free up memory resolve(res.statusCode >= 200 && res.statusCode < 300); - }); + }; + const req = agent ? client.get(target, { agent }, onResponse) : client.get(target, onResponse); req.on('error', () => resolve(false)); req.setTimeout(5000, () => { req.destroy(); @@ -133,7 +131,7 @@ try { process.exit(1); } -const baseURL = (process.env.PULSE_BASE_URL || 'http://localhost:7655').replace(/\/+$/, ''); +const baseURL = (process.env.PULSE_BASE_URL || 'http://127.0.0.1:7655').replace(/\/+$/, ''); console.log(`[pretest] Waiting for health check at ${baseURL}/api/health...`); try { diff --git a/tests/integration/tests/helpers.ts b/tests/integration/tests/helpers.ts index 0c93f01f6..b3fca8527 100644 --- a/tests/integration/tests/helpers.ts +++ b/tests/integration/tests/helpers.ts @@ -331,7 +331,7 @@ export async function resetTestEnvironment() { * Make API request to Pulse backend */ export async function apiRequest(page: Page, endpoint: string, options: any = {}) { - const baseURL = 'http://localhost:7655'; + const baseURL = process.env.PULSE_BASE_URL || process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:7655'; const response = await page.request.fetch(`${baseURL}${endpoint}`, options); return response; }