Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ jobs:
components: clippy
- uses: Swatinem/rust-cache@f0d9c3887740aee45f6153b24b3a6b815192ec16 # v2
- run: cargo clippy --locked --all-targets -- -D warnings
- name: Check for unused dependencies and unlinked source files
run: |
cargo install cargo-shear --version 1.13.4 --locked
cargo shear --locked --deny-warnings
cargo shear --locked --deny-warnings gui/linux

# Classifies the change set. No job reads the `code` output: build and test
# jobs run on every change, including docs-only ones, and the publication
Expand Down
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ axis-sandbox = { path = "crates/axis-sandbox" }
axis-proxy = { path = "crates/axis-proxy" }
axis-router = { path = "crates/axis-router" }
axis-gpu = { path = "crates/axis-gpu" }
axis-daemon = { path = "crates/axis-daemon" }
axis-pty = { path = "crates/axis-pty" }
axis-gateway = { path = "crates/axis-gateway" }

# Serialization
Expand Down
19 changes: 18 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,23 @@ from the repository root unless it says otherwise:
cargo fmt --all -- --check
cargo fmt --manifest-path gui/linux/Cargo.toml -- --check
cargo clippy --locked --all-targets -- -D warnings
cargo shear --locked --deny-warnings
cargo shear --locked --deny-warnings gui/linux
cargo test --locked
bash scripts/test_security_tier0.sh
```

`cargo shear` is not part of Cargo: install the version that `ci.yml` installs.

- `cargo shear` false positive, such as a dependency used in a way it cannot
see or a source file that must stay unlinked: keep the code and suppress the
finding with a comment giving the reason. Use `ignored` (dependency names) or
`ignored-paths` (file patterns) under `[package.metadata.cargo-shear]` in
that crate's `Cargo.toml`, with paths relative to the crate. For an entry in
the root `[workspace.dependencies]` that no member crate declares, use
`[workspace.metadata.cargo-shear]` in the root `Cargo.toml`, with paths
relative to the repository root. Delete a suppression that is no longer
needed: cargo-shear warns about it, and `--deny-warnings` makes that fail.
- GUI: from `gui/shared`, run `npm ci`, `npm test`, `npm run typecheck`,
`npm run build`, and `npm run audit:deps`. The last one runs `npm audit` and
fails on any high or critical advisory not listed in
Expand Down Expand Up @@ -258,7 +271,11 @@ Every PR automatically runs the following checks:

1. **Lint & format** — `cargo fmt --all -- --check`,
`cargo fmt --manifest-path gui/linux/Cargo.toml -- --check`, and
`cargo clippy --locked --all-targets -- -D warnings`.
`cargo clippy --locked --all-targets -- -D warnings`. CI also runs
`cargo shear --locked --deny-warnings` in the Clippy job, once for the root
workspace and once for `gui/linux`. It fails on an unused dependency, an
unlinked source file, or any other cargo-shear warning, such as a
suppression that is no longer needed.
2. **Correctness tests** — `cargo test --locked`, the security tier 0/1 tests,
the Linux, macOS and Windows test jobs, e2e tests, and policy validation.
3. **Security checks** — dependency audit and review, secret scan, CodeQL, and
Expand Down
Loading
Loading