diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c21d274a..ea7eb707 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,22 @@ jobs: - name: Build frontend run: npm run build:frontend + clean-install: + # What a user gets from the source archive: only tracked files, an empty npm + # cache, no prior node_modules. Fails on lockfile drift or integrity errors. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install from an exported tree with a cold cache + run: | + export_dir="$(mktemp -d)" + git archive HEAD | tar -x -C "$export_dir" + cd "$export_dir" + npm_config_cache="$(mktemp -d)" npm ci --ignore-scripts --no-audit --no-fund + postgres-suite: # The migration, transaction and upgrade tests that only run when a real # PostgreSQL server is reachable. Without this job they are skipped diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c2456cef..ed6b1460 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,24 @@ concurrency: cancel-in-progress: false jobs: + verify-source-install: + # The tagged tree must install cleanly from an empty cache before any image + # is published, so the source archive is as buildable as the images. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install from an exported tree with a cold cache + run: | + export_dir="$(mktemp -d)" + git archive HEAD | tar -x -C "$export_dir" + cd "$export_dir" + npm_config_cache="$(mktemp -d)" npm ci --ignore-scripts --no-audit --no-fund + build-and-publish: + needs: verify-source-install runs-on: ubuntu-latest strategy: fail-fast: false @@ -29,6 +46,17 @@ jobs: attestations: write steps: - uses: actions/checkout@v4 + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - name: Extract release metadata @@ -69,15 +97,6 @@ jobs: with: name: release-evidence-${{ matrix.profile }}-${{ matrix.arch }} path: artifacts/*.json - - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push the verified image to both registries without rebuilding id: push run: | @@ -119,11 +138,11 @@ jobs: run: | version="${GITHUB_REF_NAME#v}" for image in "${REGISTRY}/${IMAGE_NAME}" "${DOCKERHUB_IMAGE}"; do - core_tags=(--tag "$image:$version" --tag "$image:sha-${GITHUB_SHA:0:7}") - batteries_tags=(--tag "$image:batteries-$version" --tag "$image:batteries-sha-${GITHUB_SHA:0:7}") + core_tags=(--tag "$image:$version") + batteries_tags=(--tag "$image:batteries-$version") if [[ "$version" != *-* ]]; then - core_tags+=(--tag "$image:${version%.*}" --tag "$image:${version%%.*}" --tag "$image:latest") - batteries_tags+=(--tag "$image:batteries-${version%.*}" --tag "$image:batteries-${version%%.*}" --tag "$image:batteries") + core_tags+=(--tag "$image:latest") + batteries_tags+=(--tag "$image:batteries") fi docker buildx imagetools create "${core_tags[@]}" \ "$image:${GITHUB_REF_NAME}-amd64" "$image:${GITHUB_REF_NAME}-arm64" diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ccdd4d..63bbebfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [1.6.1] - 2026-10-29 + +### Security + +- Dependency refresh in the reviewed lockfile (`@azure/identity` 4.14.0, + `body-parser` 2.4.0 and 1.20.9, `fast-uri`, `iconv-lite` and others). +- `@azure/msal-node` is pinned to 7.1.1 through an npm override to clear + GHSA-xcx6-jx8p-x3h5 (fixed in 7.1.0), which `@azure/identity` 4.14.0 does not + yet allow through its own `^6.0.0` range. +- `zod` moves to 4.6.7 to clear GHSA-mrhx-c7xc-m3w5. Backend schemas import + `zod/v3`, so validation behaviour is unchanged. +- `npm audit --omit=dev` reports no vulnerabilities. + +### Fixed + +- Version metadata is consistent across the packages, lockfile, OpenAPI + document, Helm chart, image labels, health endpoint and UI header. + +### Release process + +- Release images are tagged only ``, `latest`, `batteries-` + and `batteries`. The major, minor and commit-SHA tag families are no longer + published; `latest` and `batteries` move only on stable releases. Pin to + `` for reproducible deployments. +- CI and the release workflow install the tagged tree from a `git archive` + export with an empty npm cache (`npm ci --ignore-scripts`). Image publishing + waits for this check, so a lockfile that does not install cleanly from the + source archive blocks the release. + ## [1.6.0] - 2026-10-22 ### Added diff --git a/Dockerfile b/Dockerfile index 6c86e1d5..41fcce14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,7 +80,7 @@ ARG BUILDPLATFORM # Add metadata labels LABEL org.opencontainers.image.title="Pabawi Core" LABEL org.opencontainers.image.description="Pabawi infrastructure management web interface" -LABEL org.opencontainers.image.version="1.6.0" +LABEL org.opencontainers.image.version="1.6.1" LABEL org.opencontainers.image.vendor="example42" LABEL org.opencontainers.image.source="https://github.com/example42/pabawi" @@ -91,7 +91,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ bash \ ca-certificates \ - && apt-get install -y --only-upgrade libpcre2-8-0 \ + && apt-get install -y --only-upgrade libpcre2-8-0 perl-base \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 184767f7..cd837f47 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -45,7 +45,7 @@ ARG BUILDPLATFORM # Add metadata labels LABEL org.opencontainers.image.title="Pabawi" LABEL org.opencontainers.image.description="Puppet Ansible Bolt Awesome Web Interface" -LABEL org.opencontainers.image.version="1.6.0" +LABEL org.opencontainers.image.version="1.6.1" LABEL org.opencontainers.image.vendor="example42" LABEL org.opencontainers.image.source="https://github.com/example42/pabawi" diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index e0d494a4..383b694a 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -54,7 +54,7 @@ ARG BUILDPLATFORM # Add metadata labels LABEL org.opencontainers.image.title="Pabawi" LABEL org.opencontainers.image.description="Puppet Ansible Bolt Awesome Web Interface" -LABEL org.opencontainers.image.version="1.6.0" +LABEL org.opencontainers.image.version="1.6.1" LABEL org.opencontainers.image.vendor="example42" LABEL org.opencontainers.image.source="https://github.com/example42/pabawi" diff --git a/backend/package.json b/backend/package.json index 76855546..93dd32da 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "backend", - "version": "1.6.0", + "version": "1.6.1", "description": "Backend API server for Pabawi", "main": "dist/server.js", "scripts": { @@ -34,7 +34,7 @@ "ssh2": "^1.17.0", "ws": "^8.21.0", "yaml": "^2.8.2", - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "@types/bcrypt": "^5.0.2", diff --git a/backend/src/config/ConfigService.ts b/backend/src/config/ConfigService.ts index 3100465f..c79322db 100644 --- a/backend/src/config/ConfigService.ts +++ b/backend/src/config/ConfigService.ts @@ -8,7 +8,7 @@ import { type EntraIdConfig, type WhitelistConfig, } from "./schema"; -import { z } from "zod"; +import { z } from "zod/v3"; import { parseJson } from "../utils/json"; import { LoggerService } from "../services/LoggerService"; diff --git a/backend/src/config/ldap.ts b/backend/src/config/ldap.ts index a299085c..a3b97ee8 100644 --- a/backend/src/config/ldap.ts +++ b/backend/src/config/ldap.ts @@ -3,7 +3,7 @@ import { isIP } from 'node:net'; import { X509Certificate } from 'node:crypto'; import { parseLdapDn } from './ldapDn'; import { parseLdapFilter } from './ldapFilter'; -import { z } from 'zod'; +import { z } from "zod/v3"; const attribute = z.string().regex(/^(?:[a-zA-Z][a-zA-Z0-9-]*|[0-9]+(?:\.[0-9]+)+)$/); const hostname = z.string().max(253).refine(value => diff --git a/backend/src/config/schema.ts b/backend/src/config/schema.ts index b940816e..9eec90d5 100644 --- a/backend/src/config/schema.ts +++ b/backend/src/config/schema.ts @@ -1,6 +1,6 @@ import { LdapConfigSchema } from "./ldap"; export { LdapConfigSchema, type LdapConfig } from "./ldap"; -import { z } from "zod"; +import { z } from "zod/v3"; /** * Command whitelist configuration schema diff --git a/backend/src/integrations/ssh/hostTrust.ts b/backend/src/integrations/ssh/hostTrust.ts index 72021035..26c0b15e 100644 --- a/backend/src/integrations/ssh/hostTrust.ts +++ b/backend/src/integrations/ssh/hostTrust.ts @@ -1,6 +1,6 @@ import { createHash } from 'node:crypto'; import { readFileSync } from 'node:fs'; -import { z } from 'zod'; +import { z } from "zod/v3"; const fingerprintMap = z.record(z.array(z.string().regex(/^SHA256:[A-Za-z0-9+/]{43}$/)).min(1)); diff --git a/backend/src/mcp/McpServer.ts b/backend/src/mcp/McpServer.ts index b1e0c350..af1fe437 100644 --- a/backend/src/mcp/McpServer.ts +++ b/backend/src/mcp/McpServer.ts @@ -15,7 +15,7 @@ import type { HieraPlugin } from '../integrations/hiera/HieraPlugin'; import type { PuppetDBService } from '../integrations/puppetdb/PuppetDBService'; import type { PuppetRunHistoryService } from '../services/PuppetRunHistoryService'; import type { LoggerService } from '../services/LoggerService'; -import type { ZodTypeAny } from 'zod'; +import type { ZodTypeAny } from "zod/v3"; import { registerAllTools } from './McpToolHandlers'; // MCP SDK uses package.json "exports" which requires moduleResolution >= node16. diff --git a/backend/src/mcp/McpToolHandlers.ts b/backend/src/mcp/McpToolHandlers.ts index 32933b5b..8bc58a42 100644 --- a/backend/src/mcp/McpToolHandlers.ts +++ b/backend/src/mcp/McpToolHandlers.ts @@ -13,7 +13,7 @@ import { redactText } from '../shared/diagnosticRedaction'; * Requirements: 11–18, 19.1–19.4, 14.1–14.6 */ -import { z } from 'zod'; +import { z } from "zod/v3"; import type { McpDependencies, McpServerInstance } from './McpServer'; import { TOOL_PERMISSIONS } from './McpServer'; import { diff --git a/backend/src/routes/auth.ts b/backend/src/routes/auth.ts index 40d4ae33..fd78ad75 100644 --- a/backend/src/routes/auth.ts +++ b/backend/src/routes/auth.ts @@ -1,6 +1,6 @@ import { PermissionService } from "../services/PermissionService"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { FederatedAccountError, UserService } from "../services/UserService"; import { SetupService } from "../services/SetupService"; @@ -16,7 +16,7 @@ import { isDuplicateError, extractDuplicateField } from "../utils/errorHandling"; -import { ZodError } from "zod"; +import { ZodError } from "zod/v3"; import { createAuthMiddleware } from "../middleware/authMiddleware"; import { type DIContainer, createDefaultContainer, resolveAuthenticationService } from "../container/DIContainer"; import type { EntraIdService } from "../services/EntraIdService"; diff --git a/backend/src/routes/commands.ts b/backend/src/routes/commands.ts index d6c7bc4d..03db9f2d 100644 --- a/backend/src/routes/commands.ts +++ b/backend/src/routes/commands.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { type ExecutionService, ExecutionLifecycleError } from "../services/ExecutionService"; import { ExecutionQueueFullError } from "../services/ExecutionQueue"; import type { BoltCommandWhitelistService } from "../validation/CommandWhitelistService"; diff --git a/backend/src/routes/console.ts b/backend/src/routes/console.ts index a091b9ba..97bb5cd1 100644 --- a/backend/src/routes/console.ts +++ b/backend/src/routes/console.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { DatabaseAdapter } from "../database/DatabaseAdapter"; import type { IntegrationManager } from "../integrations/IntegrationManager"; diff --git a/backend/src/routes/crashDumps.ts b/backend/src/routes/crashDumps.ts index ab6c9015..88bc24c1 100644 --- a/backend/src/routes/crashDumps.ts +++ b/backend/src/routes/crashDumps.ts @@ -9,7 +9,7 @@ import { readDiagnosticFile, retainedDiagnosticFiles } from "../utils/diagnostic import { Router, type Request, type Response } from "express"; import fs from "node:fs"; import path from "node:path"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import type { DIContainer } from "../container/DIContainer"; diff --git a/backend/src/routes/debug.ts b/backend/src/routes/debug.ts index c102018c..9e05bbfc 100644 --- a/backend/src/routes/debug.ts +++ b/backend/src/routes/debug.ts @@ -7,7 +7,7 @@ import { redactDiagnostics } from '../shared/diagnosticRedaction'; */ import { Router, type Request, type Response } from 'express'; -import { z } from 'zod'; +import { z } from "zod/v3"; import { asyncHandler } from './asyncHandler'; import type { DIContainer } from '../container/DIContainer'; diff --git a/backend/src/routes/entraIdAuth.ts b/backend/src/routes/entraIdAuth.ts index ab9e923e..9442c9f2 100644 --- a/backend/src/routes/entraIdAuth.ts +++ b/backend/src/routes/entraIdAuth.ts @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import { randomBytes } from "node:crypto"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { type EntraIdService, EntraIdError, ENTRA_ID_ERROR_CODES } from "../services/EntraIdService"; import type { DatabaseService } from "../database/DatabaseService"; diff --git a/backend/src/routes/executions.ts b/backend/src/routes/executions.ts index b88f937f..f17d37b2 100644 --- a/backend/src/routes/executions.ts +++ b/backend/src/routes/executions.ts @@ -1,7 +1,7 @@ import { type ExecutionService, ExecutionLifecycleError } from "../services/ExecutionService"; import { ExecutionDispatchError } from "../services/ExecutionDispatcher"; import { Router, type Request, type Response, type RequestHandler } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { ExecutionRepository, ExecutionType, diff --git a/backend/src/routes/facts.ts b/backend/src/routes/facts.ts index 08420f2e..a1e62db1 100644 --- a/backend/src/routes/facts.ts +++ b/backend/src/routes/facts.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response, type RequestHandler } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../integrations/IntegrationManager"; import { BoltNodeUnreachableError, diff --git a/backend/src/routes/groups.ts b/backend/src/routes/groups.ts index d0925b5f..d04a31f9 100644 --- a/backend/src/routes/groups.ts +++ b/backend/src/routes/groups.ts @@ -1,13 +1,13 @@ import assert from "node:assert/strict"; import { AuditLoggingService } from "../services/AuditLoggingService"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { GroupService } from "../services/GroupService"; import { PermissionService } from "../services/PermissionService"; import type { DatabaseService } from "../database/DatabaseService"; import { sendValidationError, ERROR_CODES } from "../utils/errorHandling"; -import { ZodError } from "zod"; +import { ZodError } from "zod/v3"; import { createAuthMiddleware } from "../middleware/authMiddleware"; import { createRbacMiddleware } from "../middleware/rbacMiddleware"; import { type DIContainer, createDefaultContainer, resolveAuthenticationService } from "../container/DIContainer"; diff --git a/backend/src/routes/hiera.ts b/backend/src/routes/hiera.ts index 2b3afb93..5547e96a 100644 --- a/backend/src/routes/hiera.ts +++ b/backend/src/routes/hiera.ts @@ -7,7 +7,7 @@ */ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../integrations/IntegrationManager"; import type { HieraPlugin } from "../integrations/hiera/HieraPlugin"; import { diff --git a/backend/src/routes/integrations/aws.ts b/backend/src/routes/integrations/aws.ts index a33822b7..66520647 100644 --- a/backend/src/routes/integrations/aws.ts +++ b/backend/src/routes/integrations/aws.ts @@ -1,6 +1,6 @@ import { Router, type Request, type RequestHandler, type Response } from "express"; -import { z } from "zod"; -import { ZodError } from "zod"; +import { z } from "zod/v3"; +import { ZodError } from "zod/v3"; import { asyncHandler } from "../asyncHandler"; import type { AWSPlugin } from "../../integrations/aws/AWSPlugin"; import type { IntegrationManager } from "../../integrations/IntegrationManager"; diff --git a/backend/src/routes/integrations/azure.ts b/backend/src/routes/integrations/azure.ts index b03c420a..7c82568e 100644 --- a/backend/src/routes/integrations/azure.ts +++ b/backend/src/routes/integrations/azure.ts @@ -1,6 +1,6 @@ import { Router, type Request, type RequestHandler, type Response } from "express"; -import { z } from "zod"; -import { ZodError } from "zod"; +import { z } from "zod/v3"; +import { ZodError } from "zod/v3"; import { asyncHandler } from "../asyncHandler"; import type { AzurePlugin } from "../../integrations/azure/AzurePlugin"; import type { IntegrationManager } from "../../integrations/IntegrationManager"; diff --git a/backend/src/routes/integrations/monitoring.ts b/backend/src/routes/integrations/monitoring.ts index 63339b32..a15f9489 100644 --- a/backend/src/routes/integrations/monitoring.ts +++ b/backend/src/routes/integrations/monitoring.ts @@ -1,6 +1,6 @@ import type { PermissionMiddlewareFactory } from "../../middleware/routeAuthorization"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../../integrations/IntegrationManager"; import type { CheckmkPlugin } from "../../integrations/checkmk/CheckmkPlugin"; import { asyncHandler } from "../asyncHandler"; diff --git a/backend/src/routes/integrations/monitoringActions.ts b/backend/src/routes/integrations/monitoringActions.ts index 7b031f94..7a211602 100644 --- a/backend/src/routes/integrations/monitoringActions.ts +++ b/backend/src/routes/integrations/monitoringActions.ts @@ -14,7 +14,7 @@ */ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../../integrations/IntegrationManager"; import type { CheckmkPlugin } from "../../integrations/checkmk/CheckmkPlugin"; import type { DatabaseService } from "../../database/DatabaseService"; diff --git a/backend/src/routes/integrations/monitoringOverview.ts b/backend/src/routes/integrations/monitoringOverview.ts index f3d3253e..118a584c 100644 --- a/backend/src/routes/integrations/monitoringOverview.ts +++ b/backend/src/routes/integrations/monitoringOverview.ts @@ -10,7 +10,7 @@ */ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../../integrations/IntegrationManager"; import type { CheckmkPlugin } from "../../integrations/checkmk/CheckmkPlugin"; import { asyncHandler } from "../asyncHandler"; diff --git a/backend/src/routes/integrations/proxmox.ts b/backend/src/routes/integrations/proxmox.ts index 35f41515..eab9bcfe 100644 --- a/backend/src/routes/integrations/proxmox.ts +++ b/backend/src/routes/integrations/proxmox.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../../integrations/IntegrationManager"; import type { ProxmoxIntegration } from "../../integrations/proxmox/ProxmoxIntegration"; import { asyncHandler } from "../asyncHandler"; diff --git a/backend/src/routes/integrations/puppetdb.ts b/backend/src/routes/integrations/puppetdb.ts index 3e336470..701dce54 100644 --- a/backend/src/routes/integrations/puppetdb.ts +++ b/backend/src/routes/integrations/puppetdb.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { PuppetDBService } from "../../integrations/puppetdb/PuppetDBService"; import { PuppetDBConnectionError, diff --git a/backend/src/routes/integrations/puppetserver.ts b/backend/src/routes/integrations/puppetserver.ts index 8664fcff..69a742c1 100644 --- a/backend/src/routes/integrations/puppetserver.ts +++ b/backend/src/routes/integrations/puppetserver.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { PuppetserverService } from "../../integrations/puppetserver/PuppetserverService"; import type { PuppetDBService } from "../../integrations/puppetdb/PuppetDBService"; import { diff --git a/backend/src/routes/integrations/utils.ts b/backend/src/routes/integrations/utils.ts index 856a69b1..ad03ccc7 100644 --- a/backend/src/routes/integrations/utils.ts +++ b/backend/src/routes/integrations/utils.ts @@ -1,5 +1,5 @@ import { type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { ExpertModeService } from "../../services/ExpertModeService"; import type { LoggerService } from "../../services/LoggerService"; import type { DIContainer } from "../../container/DIContainer"; diff --git a/backend/src/routes/inventory.ts b/backend/src/routes/inventory.ts index d3743e64..13c94317 100644 --- a/backend/src/routes/inventory.ts +++ b/backend/src/routes/inventory.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response, type RequestHandler } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { BoltService } from "../integrations/bolt/BoltService"; import { BoltInventoryNotFoundError, diff --git a/backend/src/routes/journal.ts b/backend/src/routes/journal.ts index 180af87f..8d8b23a6 100644 --- a/backend/src/routes/journal.ts +++ b/backend/src/routes/journal.ts @@ -1,6 +1,6 @@ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; -import { ZodError } from "zod"; +import { z } from "zod/v3"; +import { ZodError } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { JournalService } from "../services/journal/JournalService"; import { diff --git a/backend/src/routes/ldapAdministration.ts b/backend/src/routes/ldapAdministration.ts index 3b95c4e8..75de91c7 100644 --- a/backend/src/routes/ldapAdministration.ts +++ b/backend/src/routes/ldapAdministration.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { randomBytes } from 'node:crypto'; import { Router, type Request, type Response, type NextFunction } from 'express'; import rateLimit from 'express-rate-limit'; -import { z } from 'zod'; +import { z } from "zod/v3"; import type { DatabaseService } from '../database/DatabaseService'; import { type DIContainer, resolveAuthenticationService } from '../container/DIContainer'; import type { LdapDirectoryGroup, LdapDirectoryService } from '../services/LdapDirectoryService'; diff --git a/backend/src/routes/packages.ts b/backend/src/routes/packages.ts index 6d3313d9..2df71505 100644 --- a/backend/src/routes/packages.ts +++ b/backend/src/routes/packages.ts @@ -1,6 +1,6 @@ import type { PermissionMiddlewareFactory } from "../middleware/routeAuthorization"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { type ExecutionService, ExecutionLifecycleError } from "../services/ExecutionService"; import { ExecutionQueueFullError } from "../services/ExecutionQueue"; import type { IntegrationManager } from "../integrations/IntegrationManager"; diff --git a/backend/src/routes/permissions.ts b/backend/src/routes/permissions.ts index e70d7da7..c2cc1da5 100644 --- a/backend/src/routes/permissions.ts +++ b/backend/src/routes/permissions.ts @@ -1,12 +1,12 @@ import assert from "node:assert/strict"; import { AuditLoggingService } from "../services/AuditLoggingService"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { PermissionService } from "../services/PermissionService"; import type { DatabaseService } from "../database/DatabaseService"; import { sendValidationError, ERROR_CODES } from "../utils/errorHandling"; -import { ZodError } from "zod"; +import { ZodError } from "zod/v3"; import { createAuthMiddleware } from "../middleware/authMiddleware"; import { createRbacMiddleware } from "../middleware/rbacMiddleware"; import { type DIContainer, createDefaultContainer, resolveAuthenticationService } from "../container/DIContainer"; diff --git a/backend/src/routes/playbookBrowser.ts b/backend/src/routes/playbookBrowser.ts index e3696999..136a8bce 100644 --- a/backend/src/routes/playbookBrowser.ts +++ b/backend/src/routes/playbookBrowser.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../integrations/IntegrationManager"; import type { AnsiblePlugin } from "../integrations/ansible/AnsiblePlugin"; import { asyncHandler } from "./asyncHandler"; diff --git a/backend/src/routes/playbooks.ts b/backend/src/routes/playbooks.ts index 79c55a26..f0961bf5 100644 --- a/backend/src/routes/playbooks.ts +++ b/backend/src/routes/playbooks.ts @@ -1,6 +1,6 @@ import type { PermissionMiddlewareFactory } from "../middleware/routeAuthorization"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { IntegrationManager } from "../integrations/IntegrationManager"; import { type ExecutionService, ExecutionLifecycleError } from "../services/ExecutionService"; import { ExecutionQueueFullError } from "../services/ExecutionQueue"; diff --git a/backend/src/routes/puppet.ts b/backend/src/routes/puppet.ts index f51f14c5..88bea55b 100644 --- a/backend/src/routes/puppet.ts +++ b/backend/src/routes/puppet.ts @@ -1,7 +1,7 @@ import { PuppetRunBodySchema, type PuppetRunBody } from "../services/PuppetExecution"; import type { PermissionMiddlewareFactory } from "../middleware/routeAuthorization"; import { Router, type Request, type Response, type RequestHandler } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import type { ExecutionTool } from "../database/ExecutionRepository"; import { type ExecutionService, ExecutionLifecycleError, type ExecutionSubmission } from "../services/ExecutionService"; import { ExecutionQueueFullError } from "../services/ExecutionQueue"; diff --git a/backend/src/routes/puppetHistory.ts b/backend/src/routes/puppetHistory.ts index 5b44fb1c..d189d47c 100644 --- a/backend/src/routes/puppetHistory.ts +++ b/backend/src/routes/puppetHistory.ts @@ -7,7 +7,7 @@ import type { PermissionMiddlewareFactory } from "../middleware/routeAuthorizati */ import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import type { PuppetRunHistoryService } from "../services/PuppetRunHistoryService"; import { NodeIdParamSchema } from "../validation/commonSchemas"; diff --git a/backend/src/routes/roles.ts b/backend/src/routes/roles.ts index 40b87bac..f359cbcf 100644 --- a/backend/src/routes/roles.ts +++ b/backend/src/routes/roles.ts @@ -1,13 +1,13 @@ import assert from "node:assert/strict"; import { AuditLoggingService } from "../services/AuditLoggingService"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { RoleService } from "../services/RoleService"; import { PermissionService } from "../services/PermissionService"; import type { DatabaseService } from "../database/DatabaseService"; import { sendValidationError, ERROR_CODES } from "../utils/errorHandling"; -import { ZodError } from "zod"; +import { ZodError } from "zod/v3"; import { createAuthMiddleware } from "../middleware/authMiddleware"; import { createRbacMiddleware } from "../middleware/rbacMiddleware"; import { type DIContainer, createDefaultContainer, resolveAuthenticationService } from "../container/DIContainer"; diff --git a/backend/src/routes/setup.ts b/backend/src/routes/setup.ts index 9926b81c..d8930d5a 100644 --- a/backend/src/routes/setup.ts +++ b/backend/src/routes/setup.ts @@ -1,6 +1,6 @@ import { Router, type Request, type Response } from "express"; import { tokensEqual } from "../utils/tokensEqual"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { UserService } from "../services/UserService"; import { SetupService } from "../services/SetupService"; @@ -15,7 +15,7 @@ import { isDuplicateError, extractDuplicateField } from "../utils/errorHandling"; -import { ZodError } from "zod"; +import { ZodError } from "zod/v3"; import { createAuthRateLimitMiddleware } from "../middleware/securityMiddleware"; import { type DIContainer, createDefaultContainer, resolveAuthenticationService } from "../container/DIContainer"; diff --git a/backend/src/routes/streaming.ts b/backend/src/routes/streaming.ts index 0b034bdb..0aad4dbe 100644 --- a/backend/src/routes/streaming.ts +++ b/backend/src/routes/streaming.ts @@ -1,5 +1,5 @@ import { Router, type Request, type Response, type NextFunction } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import crypto from "crypto"; import type { StreamingExecutionManager } from "../services/StreamingExecutionManager"; import { isTerminalExecutionStatus, type ExecutionRepository } from "../database/ExecutionRepository"; diff --git a/backend/src/routes/tasks.ts b/backend/src/routes/tasks.ts index 2a51d2a4..4a65be2b 100644 --- a/backend/src/routes/tasks.ts +++ b/backend/src/routes/tasks.ts @@ -1,6 +1,6 @@ import type { PermissionMiddlewareFactory } from "../middleware/routeAuthorization"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { type ExecutionService, ExecutionLifecycleError } from "../services/ExecutionService"; import { ExecutionQueueFullError } from "../services/ExecutionQueue"; import type { IntegrationManager } from "../integrations/IntegrationManager"; diff --git a/backend/src/routes/users.ts b/backend/src/routes/users.ts index b0efcf63..21a9acd0 100644 --- a/backend/src/routes/users.ts +++ b/backend/src/routes/users.ts @@ -1,13 +1,13 @@ import assert from "node:assert/strict"; import { AuditLoggingService } from "../services/AuditLoggingService"; import { Router, type Request, type Response } from "express"; -import { z } from "zod"; +import { z } from "zod/v3"; import { asyncHandler } from "./asyncHandler"; import { FederatedAccountError, UserService } from "../services/UserService"; import { PermissionService } from "../services/PermissionService"; import type { DatabaseService } from "../database/DatabaseService"; import { sendValidationError, ERROR_CODES } from "../utils/errorHandling"; -import { ZodError } from "zod"; +import { ZodError } from "zod/v3"; import { createAuthMiddleware } from "../middleware/authMiddleware"; import { createRbacMiddleware } from "../middleware/rbacMiddleware"; import { type DIContainer, createDefaultContainer, resolveAuthenticationService } from "../container/DIContainer"; diff --git a/backend/src/server.ts b/backend/src/server.ts index f0153c29..e7992b19 100644 --- a/backend/src/server.ts +++ b/backend/src/server.ts @@ -603,7 +603,7 @@ async function startServer(): Promise { res.status(overall === "ok" ? 200 : 503).json({ status: overall, message: "Backend API is running", - version: "1.6.0", + version: "1.6.1", checks: { database: dbError ? { status: dbStatus, error: dbError } : { status: dbStatus }, }, diff --git a/backend/src/services/ExecutionDispatcher.ts b/backend/src/services/ExecutionDispatcher.ts index 2371381a..9355b1f4 100644 --- a/backend/src/services/ExecutionDispatcher.ts +++ b/backend/src/services/ExecutionDispatcher.ts @@ -1,4 +1,4 @@ -import { z } from "zod"; +import { z } from "zod/v3"; import type { ExecutionRecord } from "../database/ExecutionRepository"; import type { IntegrationManager } from "../integrations/IntegrationManager"; import type { BoltService } from "../integrations/bolt/BoltService"; diff --git a/backend/src/services/PuppetExecution.ts b/backend/src/services/PuppetExecution.ts index 9b7f4e72..e97c2f9e 100644 --- a/backend/src/services/PuppetExecution.ts +++ b/backend/src/services/PuppetExecution.ts @@ -1,4 +1,4 @@ -import { z } from "zod"; +import { z } from "zod/v3"; import { PuppetEnvironmentSchema, PuppetTagSchema } from "../validation/commonSchemas"; import type { JournalService } from "./journal/JournalService"; import type { CreateJournalEntry } from "./journal/types"; diff --git a/backend/src/services/journal/types.ts b/backend/src/services/journal/types.ts index 2a9a7b0f..b4b9f91e 100644 --- a/backend/src/services/journal/types.ts +++ b/backend/src/services/journal/types.ts @@ -1,4 +1,4 @@ -import { z } from "zod"; +import { z } from "zod/v3"; /** * Journal Service Types and Zod Schemas diff --git a/backend/src/utils/errorHandling.ts b/backend/src/utils/errorHandling.ts index 6071bf4f..09ca8e22 100644 --- a/backend/src/utils/errorHandling.ts +++ b/backend/src/utils/errorHandling.ts @@ -6,7 +6,7 @@ */ import type { Response } from "express"; -import { ZodError } from "zod"; +import { ZodError } from "zod/v3"; import { LoggerService } from "../services/LoggerService"; /** diff --git a/backend/src/validation/commonSchemas.ts b/backend/src/validation/commonSchemas.ts index da75bd59..bb7cb3c5 100644 --- a/backend/src/validation/commonSchemas.ts +++ b/backend/src/validation/commonSchemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod"; +import { z } from "zod/v3"; /** * Regex for valid hostnames, IPs, and Bolt target URIs. diff --git a/backend/src/validation/rbacSchemas.ts b/backend/src/validation/rbacSchemas.ts index 2e904904..9531e5a8 100644 --- a/backend/src/validation/rbacSchemas.ts +++ b/backend/src/validation/rbacSchemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod"; +import { z } from "zod/v3"; /** * RBAC Validation Schemas diff --git a/backend/test/properties/config/secret-validation.property.test.ts b/backend/test/properties/config/secret-validation.property.test.ts index a5ad2688..e74bd23a 100644 --- a/backend/test/properties/config/secret-validation.property.test.ts +++ b/backend/test/properties/config/secret-validation.property.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; import * as fc from 'fast-check'; -import { ZodError } from 'zod'; +import { ZodError } from "zod/v3"; import { AppConfigSchema } from '../../../src/config/schema'; /** diff --git a/backend/test/security/jazzy-launching-wombat-regressions.test.ts b/backend/test/security/jazzy-launching-wombat-regressions.test.ts index 2f994b4b..e83414fa 100644 --- a/backend/test/security/jazzy-launching-wombat-regressions.test.ts +++ b/backend/test/security/jazzy-launching-wombat-regressions.test.ts @@ -12,7 +12,7 @@ import { describe, it, expect, vi, beforeEach, afterEach, beforeAll, afterAll } import express, { type Express } from "express"; import request from "supertest"; import { createHttpHarness, type HttpHarness } from "../helpers/httpHarness"; -import { z } from "zod"; +import { z } from "zod/v3"; import { AppConfigSchema, type WhitelistConfig } from "../../src/config/schema"; import { BoltCommandWhitelistService } from "../../src/validation/CommandWhitelistService"; import { diff --git a/charts/pabawi/Chart.yaml b/charts/pabawi/Chart.yaml index bab84b03..fab030b4 100644 --- a/charts/pabawi/Chart.yaml +++ b/charts/pabawi/Chart.yaml @@ -3,7 +3,7 @@ name: pabawi description: Pabawi infrastructure management web UI type: application version: 0.2.1 -appVersion: "1.6.0" +appVersion: "1.6.1" home: https://github.com/example42/pabawi sources: - https://github.com/example42/pabawi diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index f78b05d8..250d28c0 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -56,6 +56,25 @@ docker buildx build --platform linux/amd64,linux/arm64 --target core -t pabawi:c docker buildx build --platform linux/amd64,linux/arm64 --target batteries -t pabawi:batteries . ``` +## Publishing Releases + +The tag-triggered workflow publishes both profiles to GHCR and Docker Hub. +It authenticates to both registries before building, then requires smoke tests +and the vulnerability scan to pass before pushing any image. + +Configure these repository secrets under **Settings > Secrets and variables > +Actions**: + +- `DOCKERHUB_USERNAME`: the Docker ID that owns the token and has write access + to `example42/pabawi`. +- `DOCKERHUB_TOKEN`: a valid Docker Hub personal access token with Read & Write + permission, created by that same Docker ID. + +GHCR uses the workflow's automatic `GITHUB_TOKEN`. A Docker Hub error saying +`unauthorized: incorrect username or password` requires correcting the Docker +Hub secrets. Rebuilding the image does not repair registry authentication. +See [Docker Hub access tokens](https://docs.docker.com/security/access-tokens/). + ## Volume Mounts All paths in `.env` must be **container paths** (under `/opt/pabawi/`), not host paths. diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 04e2adbc..d9084d82 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -41,7 +41,7 @@ info: enabled sources. Subscribe to `/journal/global/stream` for a live SSE feed, or query `/journal/{nodeId}` for a node's history. - version: 1.6.0 + version: 1.6.1 contact: name: Pabawi Support url: https://pabawi.example42.com diff --git a/frontend/package.json b/frontend/package.json index 9ed6ab6c..50ff99e3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "1.6.0", + "version": "1.6.1", "description": "Pabawi frontend web interface", "type": "module", "scripts": { diff --git a/frontend/src/components/Navigation.svelte b/frontend/src/components/Navigation.svelte index 33dbade9..db4d58ac 100644 --- a/frontend/src/components/Navigation.svelte +++ b/frontend/src/components/Navigation.svelte @@ -148,7 +148,7 @@

Pabawi

- v1.6.0 + v1.6.1
diff --git a/package-lock.json b/package-lock.json index 09a552c2..9e15c4b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pabawi", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pabawi", - "version": "1.6.0", + "version": "1.6.1", "license": "Apache-2.0", "workspaces": [ "frontend", @@ -29,7 +29,7 @@ } }, "backend": { - "version": "1.6.0", + "version": "1.6.1", "dependencies": { "@aws-sdk/client-ec2": "^3.700.0", "@aws-sdk/client-sts": "^3.700.0", @@ -51,7 +51,7 @@ "ssh2": "^1.17.0", "ws": "^8.21.0", "yaml": "^2.8.2", - "zod": "^3.23.8" + "zod": "^4.6.7" }, "devDependencies": { "@types/bcrypt": "^5.0.2", @@ -85,7 +85,7 @@ } }, "frontend": { - "version": "1.6.0", + "version": "1.6.1", "dependencies": { "@novnc/novnc": "^1.7.0", "@xterm/addon-attach": "^0.12.0", @@ -1056,6 +1056,15 @@ "node": ">=18.0.0" } }, + "node_modules/@azure/core-process": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/core-process/-/core-process-1.0.0.tgz", + "integrity": "sha512-/shnJ+ooO8WPxDhPEeI/2oRQuubn16gZ6CvlbpWbEswZfzwI9tI/sMAHmF3x1LuQ9yZYXfLW3TjzGMLEC5blKg==", + "license": "MIT", + "engines": { + "node": ">=22.0.0" + } + }, "node_modules/@azure/core-rest-pipeline": { "version": "1.23.0", "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.23.0.tgz", @@ -1101,25 +1110,26 @@ } }, "node_modules/@azure/identity": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.13.1.tgz", - "integrity": "sha512-5C/2WD5Vb1lHnZS16dNQRPMjN6oV/Upba+C9nBIs15PmOi6A3ZGs4Lr2u60zw4S04gi+u3cEXiqTVP7M4Pz3kw==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.14.0.tgz", + "integrity": "sha512-8utCLdTZn14CiAe0HW4JbtzUMsc0mdDwnjUvStFMrR4IxQP8S2eL9zVAdplpfORVJGYmidZElpeXRYjJQ4UyUw==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.9.0", "@azure/core-client": "^1.9.2", + "@azure/core-process": "^1.0.0", "@azure/core-rest-pipeline": "^1.17.0", "@azure/core-tracing": "^1.0.0", "@azure/core-util": "^1.11.0", "@azure/logger": "^1.0.0", "@azure/msal-browser": "^5.5.0", - "@azure/msal-node": "^5.1.0", - "open": "^10.1.0", + "@azure/msal-node": "^6.0.0", + "open": "^11.0.0", "tslib": "^2.2.0" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.0.0" } }, "node_modules/@azure/logger": { @@ -1157,12 +1167,12 @@ } }, "node_modules/@azure/msal-node": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-5.2.3.tgz", - "integrity": "sha512-YYX4TchEVddVBiybKvKhV9QO/q22jgewP+BVxKG7Uh115voPcviGlypbKERDsqQdAiSTJrwi80gcWFjYKdo8+Q==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-7.1.1.tgz", + "integrity": "sha512-zHXTJB38XVrsNaXrPBCMqEUjeyQysFfgmKtUHRDsEKTRjNIPckJ/w6fE5wBXrmJXBim1D3C7O7LOag0msPTrgw==", "license": "MIT", "dependencies": { - "@azure/msal-common": "16.7.0", + "@azure/msal-common": "16.14.3", "jsonwebtoken": "^9.0.0" }, "engines": { @@ -1170,9 +1180,9 @@ } }, "node_modules/@azure/msal-node/node_modules/@azure/msal-common": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-16.7.0.tgz", - "integrity": "sha512-Jb8Y7pX6KM42SIT7KWP6YbY3+vLbwB5b5m+tpiiOzMU1QeyelQzs9lO8jv1e7/Uj9r7tg7VjPvW4T0KB1jF3UQ==", + "version": "16.14.3", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-16.14.3.tgz", + "integrity": "sha512-tz3GvMrR9V/plb2lDdW8qaO8CPpfZevdExBKjltzzbAtyhK0eB2UIvji1aU+gkyHj3fxQ2ie+LNHyMXdmo8wOg==", "license": "MIT", "engines": { "node": ">=0.8.0" @@ -2232,18 +2242,18 @@ } }, "node_modules/@modelcontextprotocol/sdk/node_modules/body-parser": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz", - "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.4.0.tgz", + "integrity": "sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==", "license": "MIT", "dependencies": { "bytes": "^3.1.2", - "content-type": "^2.0.0", + "content-type": "^2.1.0", "debug": "^4.4.3", "http-errors": "^2.0.1", - "iconv-lite": "^0.7.2", + "iconv-lite": "^0.7.3", "on-finished": "^2.4.1", - "qs": "^6.15.2", + "qs": "^6.16.1", "raw-body": "^3.0.2", "type-is": "^2.1.0" }, @@ -2364,9 +2374,9 @@ } }, "node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", - "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -5074,9 +5084,9 @@ } }, "node_modules/body-parser": { - "version": "1.20.8", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.8.tgz", - "integrity": "sha512-JNcyFQ64OiijEkPzUBTCe+hyPXUD/3LEldGQ6iF5LR1w00mx9o7xtDWHXBY2iItjdCFGoilOLNQbH943ut7pHA==", + "version": "1.20.9", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.9.tgz", + "integrity": "sha512-FISIQxV5u91Y9gvuFq3q/tA/qTqLJn3AhRcEvyozyhJTh5OBFFtv827AdHU7Rbyct4r+Ba1/99oFa1Y3yuFsdw==", "license": "MIT", "dependencies": { "bytes": "~3.1.2", @@ -5231,9 +5241,9 @@ } }, "node_modules/bundle-name": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", - "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.1.tgz", + "integrity": "sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA==", "license": "MIT", "dependencies": { "run-applescript": "^7.0.0" @@ -5888,9 +5898,9 @@ } }, "node_modules/default-browser": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", - "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.1.tgz", + "integrity": "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw==", "license": "MIT", "dependencies": { "bundle-name": "^4.1.0", @@ -6727,9 +6737,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz", - "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", "funding": [ { "type": "github", @@ -7595,6 +7605,18 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-in-ssh": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", + "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-inside-container": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", @@ -9358,18 +9380,20 @@ } }, "node_modules/open": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", - "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/open/-/open-11.0.4.tgz", + "integrity": "sha512-++Zlftm0kVLPmzC06t6epuWmcRMDbI4z5P3NNX979WA/k23+NtSOynEGzsVfZwguKw2mi5umVgnBlJQMwRz4Pg==", "license": "MIT", "dependencies": { - "default-browser": "^5.2.1", + "default-browser": "^5.5.1", "define-lazy-prop": "^3.0.0", + "is-in-ssh": "^1.0.0", "is-inside-container": "^1.0.0", - "wsl-utils": "^0.1.0" + "powershell-utils": "^0.2.1", + "wsl-utils": "^1.0.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -9873,9 +9897,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz", - "integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.5.tgz", + "integrity": "sha512-TEHFzb5KRDKaOgJ4TYE+0jyJtFbjLvkdVOu0fZ2b6MTWzoqZd4Le+61aEppWkvTlYePgOX4ATL1wsAIPMLTw6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -9932,6 +9956,18 @@ "node": ">=0.10.0" } }, + "node_modules/powershell-utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.2.1.tgz", + "integrity": "sha512-C+y9x90UElAddDZmV4qOx9W53B61PO7cIqWz2dQsWlwswuq4mr8NEwytdGKboYbQlGZ3awrkTeNvcZiZNHnQ8A==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/prebuild-install": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", @@ -12782,15 +12818,16 @@ } }, "node_modules/wsl-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", - "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-1.0.1.tgz", + "integrity": "sha512-c16PKLIRxBYpR3jSWsdS7SFp0COm5SOQdiFjY818dYFHJbMGuLBszpF07LBWmOS1uzrHa9VGdynsEgoeKy0oOQ==", "license": "MIT", "dependencies": { - "is-wsl": "^3.1.0" + "is-wsl": "^3.1.0", + "powershell-utils": "^0.2.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12933,9 +12970,9 @@ "license": "MIT" }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index afacb8c7..72d3c858 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pabawi", - "version": "1.6.0", + "version": "1.6.1", "description": "Pabawi - Web interface for Bolt automation tool", "private": true, "workspaces": [ @@ -44,7 +44,8 @@ "overrides": { "tar": "7.5.22", "brace-expansion": "1.1.18", - "smol-toml": "1.8.0" + "smol-toml": "1.8.0", + "@azure/msal-node": "7.1.1" }, "devDependencies": { "@eslint/js": "^9.39.1", diff --git a/scripts/deployment/docker-images.test.mjs b/scripts/deployment/docker-images.test.mjs index 97ab3f69..12cf455b 100644 --- a/scripts/deployment/docker-images.test.mjs +++ b/scripts/deployment/docker-images.test.mjs @@ -63,6 +63,12 @@ test("release CI builds and publishes both profiles", () => { assert.match(publishWorkflow, /trivy-batteries-ignore\.yaml/); }); +test("release publishes only version, latest, batteries and batteries-version tags", () => { + assert.doesNotMatch(publishWorkflow, /sha-\$\{GITHUB_SHA/); + assert.doesNotMatch(publishWorkflow, /\$\{version%\.\*\}|\$\{version%%\.\*\}/); + assert.equal((publishWorkflow.match(/--tag "/g) ?? []).length, 4); +}); + test("the batteries vulnerability exception is narrow and expiring", () => { assert.match(scanScript, /--ignorefile/); assert.match(batteriesIgnore, /id: CVE-2026-85396/); @@ -98,3 +104,18 @@ test("the batteries smoke profile requires every bundled command", () => { assert.match(batteriesProfile, new RegExp(`\\b${command}\\b`)); } }); + +test("release CI authenticates to both registries before building", () => { + const buildJob = publishWorkflow.slice( + publishWorkflow.indexOf(" build-and-publish:"), + publishWorkflow.indexOf(" publish-manifest:"), + ); + const build = buildJob.indexOf(" - name: Build release candidate locally"); + const logins = [...buildJob.matchAll(/uses: docker\/login-action@v3/g)]; + + assert.ok(build >= 0, "missing candidate build"); + assert.equal(logins.length, 2, "both registry logins are required"); + for (const login of logins) { + assert.ok(login.index < build, "registry authentication must precede the build"); + } +});