hex/.github/workflows/check-macos.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

74 lines
2.5 KiB
YAML

name: Check macOS
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "build.rs"
- "crates/**"
- "src/**"
- "native/**"
- "macos/HexMicrophoneDriver/Info.plist"
- "resources/**"
- "assets/**"
- "app/**"
- "scripts/validate-app.sh"
- "scripts/test-app-identity.sh"
- ".config/nextest.toml"
- ".github/workflows/check-macos.yml"
push:
branches: [dev]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "build.rs"
- "crates/**"
- "src/**"
- "native/**"
- "macos/HexMicrophoneDriver/Info.plist"
- "resources/**"
- "assets/**"
- "app/**"
- "scripts/validate-app.sh"
- "scripts/test-app-identity.sh"
- ".config/nextest.toml"
- ".github/workflows/check-macos.yml"
permissions:
contents: read
# A new push to a pull request cancels its stale run. Every push and manual run
# keeps its own group, so each dev commit gets a result.
concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-run-{1}', github.workflow, github.run_id) }}
cancel-in-progress: true
jobs:
test:
if: ${{ !github.event.pull_request.draft }}
runs-on: macos-26
timeout-minutes: 60
env:
CARGO_PROFILE_DEV_DEBUG: "0"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@86f7a0ffb25f40114606501a311ebcfaf882ea32 # v2
with:
tool: cargo-nextest
- name: Install the Metal toolchain
run: xcrun --sdk macosx metal --version || xcodebuild -downloadComponent MetalToolchain
- run: cargo fmt --all --check
- run: scripts/test-app-identity.sh
- run: cargo clippy --locked -p "$(cargo pkgid)" -p scrawl-capture --bin hex --lib --tests -- -D warnings
- run: cargo nextest run --locked --profile ci -p "$(cargo pkgid)" -p scrawl-capture --bin hex --lib
- name: No compromised eMudhra CA roots
run: cargo build --locked --bin hex && scripts/check-ca-roots.sh target/debug/hex