hex/.github/workflows/site.yml
Dax f9ab7b5a9c
Security: sign Linux releases, lock the installers, vendor the release client, pin actions and download hosts (#370)
From the 2026-10-29 security review:
- H1: Release signs each Linux executable with Anomaly's ed25519 key (HEX_RELEASE_SIGNING_KEY, .github/release/sign-linux.sh, which refuses a key that does not match linux-signing.pub) and publishes the signature as the linux-<arch>-sig target. The updater (updater/linux.rs SIGNING_KEY) and install-linux.sh refuse an executable without a valid signature over its SHA-256, before downloading it. Installed builds that predate this ignore the extra target, so the transition needs nothing from them.
- H3: the installers move to the locked .github/release/ (CODEOWNERS @thdxr); the Installers workflow publishes them from a sparse checkout of that directory.
- M1: the release service client is vendored as .github/release/release-client.sh instead of piping anoma.ly/release/client.sh into bash.
- M2: check-windows.yml gets permissions: contents: read; every third-party action is pinned by SHA.
- M3: resolve_url accepts only URLs on the manifest's host.
2026-10-29 11:06:30 -04:00

58 lines
1.6 KiB
YAML

name: Site
# Builds site/ and checks every download link on pull requests; a push to dev
# deploys dev (https://dev.anoma.ly/hex). Production (https://anoma.ly/hex)
# deploys after a stable Release publishes, or by dispatching this workflow
# with mode production from production.
on:
pull_request:
paths:
- "site/**"
- ".github/workflows/site.yml"
- ".github/workflows/site-deploy.yml"
- ".github/release/deploy-site.sh"
- ".github/release/cf/**"
push:
branches: [dev]
paths:
- "site/**"
- ".github/workflows/site.yml"
- ".github/workflows/site-deploy.yml"
- ".github/release/deploy-site.sh"
- ".github/release/cf/**"
workflow_dispatch:
inputs:
mode:
type: choice
options: [dev, production]
default: dev
permissions:
contents: read
concurrency:
group: site-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- run: bun install --frozen-lockfile
- run: bun run build
- run: bun run check:downloads
deploy:
if: github.event_name == 'push' || inputs.mode == 'dev' || github.ref == 'refs/heads/production'
uses: ./.github/workflows/site-deploy.yml
with:
mode: ${{ github.event_name == 'workflow_dispatch' && inputs.mode || 'dev' }}
secrets: inherit