Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,35 @@ jobs:
security-events: write
id-token: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.3 — floating v2 tag no longer resolves upstream; pinned to commit per Scorecard's own pinned-deps recommendation
# The floating v2 tag no longer resolves upstream, so this is pinned to a
# commit, per Scorecard's own pinned-deps recommendation.
- uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: scorecard-sarif
path: results.sarif
retention-days: 30

- uses: github/codeql-action/upload-sarif@v4
- uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
sarif_file: results.sarif

sbom:
name: SBOM (syft)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: anchore/sbom-action@v0
- uses: anchore/sbom-action@66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c # v0.24.3
with:
path: .
format: cyclonedx-json
Expand All @@ -69,15 +71,15 @@ jobs:
name: Deterministic claims guard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # gitleaks needs full history

- uses: pnpm/action-setup@v6
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
version: 10.32.1

- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
cache: pnpm
Expand All @@ -91,7 +93,7 @@ jobs:
working-directory: frontend
run: pnpm build

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
Expand All @@ -110,14 +112,20 @@ jobs:
exit 1
fi

# The three scanners below are installed at fixed versions rather than
# @latest, so a run is reproducible and a new release cannot change the
# gate unannounced. Dependabot does not see `go install` lines, so these
# are bumped by hand. govulncheck reads the live vulnerability database
# on every run whatever its own version, so pinning it does not freeze
# what it knows about.
- name: govulncheck (clean-security-scan claim)
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
go install golang.org/x/vuln/cmd/govulncheck@v1.9.0
govulncheck ./...

- name: gosec (clean-security-scan claim — AUDIT.md says every finding is annotated)
run: |
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/securego/gosec/v2/cmd/gosec@v2.30.0
gosec ./...

- name: gitleaks (clean-security-scan claim)
Expand All @@ -127,5 +135,5 @@ jobs:
# same way govulncheck/gosec above do, and the same invocation AUDIT.md
# documents for a local run.
run: |
go install github.com/zricethezav/gitleaks/v8@latest
go install github.com/zricethezav/gitleaks/v8@v8.30.1
gitleaks detect --source . --no-banner -v
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
# Full history, because the CLA check below needs the fork point of the pull
# request, not just the tip of the base branch. The repository is small.
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

Expand Down Expand Up @@ -70,11 +70,11 @@ jobs:
print(f"CLA ledger append-only: {len(base_by_id)} signed at base, {len(head_ids)} now, none removed")
PY

- uses: pnpm/action-setup@v6
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
version: 10.32.1

- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
cache: pnpm
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
working-directory: frontend
run: pnpm test:visual

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- name: CLA Assistant
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: contributor-assistant/github-action@v2.6.1
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: docker/setup-qemu-action@v4
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0

- uses: docker/setup-buildx-action@v4
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

- name: Log in to GHCR
if: github.event_name == 'push'
uses: docker/login-action@v4
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -81,7 +81,7 @@ jobs:
# pre-release deploy can be pinned to an immutable tag that names its commit.
- name: Docker metadata
id: meta
uses: docker/metadata-action@v6
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -93,7 +93,7 @@ jobs:

- name: Build (push on branch pushes and on tags)
id: build
uses: docker/build-push-action@v7
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
platforms: ${{ env.BUILD_PLATFORMS }}
Expand All @@ -105,7 +105,7 @@ jobs:
COMMIT=${{ github.sha }}

- name: Export standalone binaries
uses: docker/build-push-action@v7
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
target: standalone
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
# workflow_dispatch dry run, or the rehearsal finds no artifact to download.
- name: Upload standalone binaries
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.dry_run)
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: standalone-binaries
path: dist/release/
Expand All @@ -164,7 +164,7 @@ jobs:
contents: read
packages: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Prove this runner is genuinely arm64
run: |
Expand Down Expand Up @@ -246,9 +246,11 @@ jobs:
# Regression guard for the quick-start trap: a first start with no
# CALNODE_ENCRYPTION_KEY must write a key beside the database, so stored
# credentials survive a restart instead of becoming unreadable.
# The helper image is pinned by digest (the multi-arch alpine:3 index).
# Dependabot does not read `docker run` lines, so bump it by hand.
run: |
set -euo pipefail
docker run --rm -v calnode-data:/data alpine:3 sh -c 'test -s /data/calnode.key' \
docker run --rm -v calnode-data:/data alpine:3@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a sh -c 'test -s /data/calnode.key' \
&& echo "key persisted beside the database"

- name: Assert a restart still finds the key
Expand Down Expand Up @@ -294,9 +296,9 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/download-artifact@v8
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: standalone-binaries
path: dist/release
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ns8-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Validate action scripts and schemas
working-directory: packaging/ns8
Expand Down Expand Up @@ -184,19 +184,19 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# Required to build the arm64 variant of the module image on an amd64
# runner. Without it the module image would be amd64-only and podman
# could not run it on an arm64 NS8 node.
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
with:
platforms: all

# The UI build is the slow part; cache the dependency tree the way the
# upstream NS8 publish workflow does, so branch and PR runs do not
# re-download the whole Vue/Carbon tree every time.
- uses: actions/cache@v6
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: packaging/ns8/ui/node_modules
key: "yarn-${{ hashFiles('packaging/ns8/ui/yarn.lock') }}"
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:

- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pullfrog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
- name: Run agent
uses: pullfrog/pullfrog@v0
uses: pullfrog/pullfrog@8302038bc7ab13f579cfef4bad72941b87f8c1c5 # v0.1.107
with:
prompt: ${{ inputs.prompt }}
model: opencode-go/deepseek-v4.1-flash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# Live evidence that the sibling lookup actually works against the real API.
# This runs unconditionally and does not depend on the gate's decision,
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ jobs:
contents: read
pull-requests: write
statuses: write
uses: NethServer/ns8-github-actions/.github/workflows/test-on-digitalocean-infra.yml@v1
# Pinned to a commit on NethServer's `v1` branch (a branch, not a tag).
# It is the last commit that still has this workflow: the branch has since
# removed test-on-digitalocean-infra.yml in favour of test-module-qemu.yml,
# so `@v1` no longer resolves to it. Moving this pin to the branch head
# would break the workflow, so check that the file exists before bumping.
uses: NethServer/ns8-github-actions/.github/workflows/test-on-digitalocean-infra.yml@3dc3a490752846c4cb0ea86921f8ae3790d7d78c
with:
# packaging/ns8 holds both the module definition and tests/, so this is the
# module root for the purposes of the runner.
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# syntax=docker/dockerfile:1

# Base images are pinned by digest (the multi-arch index, so every platform
# resolves). The tag stays beside it for readers and for Dependabot, whose
# docker entry bumps the digest when the tag moves.

# ── Frontend build stage ───────────────────────────────────────────────────────
# Built for the BUILD platform, not the target: the output is static JS/CSS that is
# identical for every architecture. Without this pin a multi-arch build (buildx:
# linux/amd64,linux/arm64) runs pnpm install and pnpm build a second time under QEMU
# for arm64, which is slow and occasionally hangs for hours.
FROM --platform=$BUILDPLATFORM node:22-alpine AS frontend-builder
FROM --platform=$BUILDPLATFORM node:22-alpine@sha256:fe4f6d74e20370acb04ad889077d14d0f64a9c8ea6a42bc60cddf1e844699914 AS frontend-builder

# Pin pnpm to the version in package.json's `packageManager` field (not @latest)
# so CI builds are reproducible and match the committed lockfile.
Expand All @@ -24,7 +28,7 @@ RUN pnpm build
# target arch; there is no reason for this stage to run under QEMU. Running it
# emulated is what made a multi-arch build stall: the arm64 leg spent its time
# interpreting the compiler instead of compiling.
FROM --platform=$BUILDPLATFORM golang:1.27.3-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.27.3-alpine@sha256:d200d2dd76b03a99b52651fd1325aff7dcd35422c35c01bac56571b0507f3deb AS builder

RUN apk add --no-cache ca-certificates wget

Expand Down Expand Up @@ -71,7 +75,7 @@ COPY LICENSE /LICENSE
# No --platform pin: under buildx this defaults to the TARGET platform, which is
# what we want (an arm64 final image for arm64 consumers). Only the two builder
# stages above are pinned to BUILDPLATFORM.
FROM alpine:3.24
FROM alpine:3.24@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a

RUN apk add --no-cache ca-certificates tzdata

Expand Down
Loading