- notify-ci-failure.yml lists its workflows by name. `workflows: ['*']` is not a wildcard to workflow_run: it matched nothing, so `main` was red from 2026-09-23 with no one told. - cargo audit runs a prebuilt cargo-audit (taiki-e/install-action, pinned by commit) with `--deny warnings`, replacing rustsec/audit-check@v2 - Node 20, a check-run write token, and on a pull request a failure only for "critical", which is how September's advisories passed every PR. .cargo/audit.toml's contract (a new informational advisory fails CI) is now what runs. - security-scan.yml: both audits daily against `main`, so an advisory against something already merged is reported the day it is published, not at the next PR. - cargo deny (licences, sources, bans) with deny.toml: the licence allowlist makes "every bundled licence is GPL-3.0-compatible" a test. The workspace declares `publish = false`, which it never had - and without which cargo-deny judged the app crates as published ones. - CodeQL analyses rust and actions as well as javascript-typescript. The comment saying CodeQL had no Rust support stopped being true in 2025. - ci-node.yml: Pages and id-token write move from the workflow to the one job that needs them (Sonar S8233); the audit installs with --ignore-scripts (S6505); a new `tauri lockstep` job fails when a Tauri crate and its npm package drift apart on Cargo.lock and package-lock.json. - release.yml: build (read-only token, no persisted credentials) and publish (attest + draft) are separate jobs; the tag must match all five version fields; SHA256SUMS.txt is LF, which `sha256sum -c` elsewhere needs; actions/attest-build-provenance attests the .exe and .msi; softprops/action-gh-release is pinned by commit; `workflow_dispatch` with `dry_run` builds any ref without attesting or drafting. - ci-integration.yml also runs for the CLI, exec, audit, release metadata, errors, store, index, Cargo.lock and rust-toolchain.toml - every one of which its end-to-end steps run through. - dependabot.yml: cooldowns, a group per ecosystem for Tauri packages and for actions and pip, TypeScript held below 6.1 (typescript-eslint's peer range), and the rust-toolchain ecosystem. A multi-ecosystem group would put both Tauri halves in one PR, but what it does to dependencies outside its patterns is undocumented; the lockstep job covers the gap instead. - Sonar: NOSONAR with reasons on the dev scripts' argv and PATH lookups; bundle-cli.mjs no longer claims to run from beforeBuildCommand. The dev CSP moves out of index.html into a Vite plugin that reads devCsp from tauri.conf.json, so a release build carries one policy, the strict one (S7039); checked in the dev server, where React Refresh's preamble still runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
111 lines
3.4 KiB
YAML
111 lines
3.4 KiB
YAML
# Project-local: the ops repo (poli0981/.github) has no reusable Rust workflow, and only its
|
|
# desktop-csharp reusable runs on Windows. See docs/RELEASE-CI.md §1.
|
|
#
|
|
# Windows runner because the environment-discovery module reads the PEP 514 registry and the `py`
|
|
# launcher — a Linux run would skip exactly the code most likely to break.
|
|
|
|
name: CI / Rust
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-rust-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
check:
|
|
name: fmt · clippy · test
|
|
runs-on: windows-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# rust-toolchain.toml pins the exact version, so no toolchain action is needed — rustup
|
|
# honours it on first invocation and installs rustfmt and clippy with it.
|
|
- name: Show toolchain
|
|
run: |
|
|
rustup show
|
|
cargo --version
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
|
|
restore-keys: ${{ runner.os }}-cargo-
|
|
|
|
- name: Format
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --workspace --locked
|
|
|
|
audit:
|
|
name: cargo audit
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
# cargo-audit only reads Cargo.lock, so it runs under the runner's stable cargo rather than
|
|
# making rustup install the toolchain rust-toolchain.toml pins — that pin exists to make
|
|
# PipDock reproducible, not its tooling.
|
|
RUSTUP_TOOLCHAIN: stable
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# A prebuilt cargo-audit, pinned by commit. This replaced rustsec/audit-check@v2, which ran
|
|
# on Node 20, needed a check-run write token, and on a pull request failed only on
|
|
# "critical" — so the advisories that turned `main` red in September passed every PR.
|
|
- name: Install cargo-audit
|
|
uses: taiki-e/install-action@83ac0ad63c0167e6f06796fab0fce28db1bf3db0 # v2.87.22
|
|
with:
|
|
tool: cargo-audit
|
|
|
|
# RustSec advisories against the committed Cargo.lock. `--deny warnings`, because
|
|
# .cargo/audit.toml's contract is that a *new* informational advisory fails CI and is looked
|
|
# at; the known ones are ignored there one by one, with reasons.
|
|
- name: Audit
|
|
run: cargo audit --deny warnings
|
|
|
|
deny:
|
|
name: cargo deny
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
RUSTUP_TOOLCHAIN: stable
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install cargo-deny
|
|
uses: taiki-e/install-action@83ac0ad63c0167e6f06796fab0fce28db1bf3db0 # v2.87.22
|
|
with:
|
|
tool: cargo-deny
|
|
|
|
# Licences, sources and bans — deny.toml says why each. Advisories stay cargo audit's.
|
|
- name: Licences, sources, bans
|
|
run: cargo deny --locked check licenses sources bans
|