Skip to content

fix: add tool-install guards to Makefile audit/deny targets and update docs/CI (#46)#73

Open
Topmatrixmor2014 wants to merge 4 commits into
OrbitChainLabs:mainfrom
Topmatrixmor2014:fix/issue-46-makefile-audit-deny-guards
Open

fix: add tool-install guards to Makefile audit/deny targets and update docs/CI (#46)#73
Topmatrixmor2014 wants to merge 4 commits into
OrbitChainLabs:mainfrom
Topmatrixmor2014:fix/issue-46-makefile-audit-deny-guards

Conversation

@Topmatrixmor2014

@Topmatrixmor2014 Topmatrixmor2014 commented Jun 23, 2026

Copy link
Copy Markdown

Description

Fixes #46 — Makefile audit/deny targets now fail with a clear installation guide instead of a cryptic "command not found" error.

Changes Made

Makefile

  • Added command -v pre-checks to audit and deny targets that emit a clear "tool not installed — run cargo install …" message and exit non-zero when the binary is missing
  • Created audit-ci and deny-ci targets that auto-install the tools (used by CI)
  • Added audit-ci and deny-ci to .PHONY declaration
  • Added audit and deny entries to make help output

CONTRIBUTING.md (new)

  • Created comprehensive contributor guide with prerequisites section
  • Documents cargo-audit and cargo-deny install commands explicitly
  • Includes development workflow, branch naming, PR process, and code style guidelines

README.md

  • Added "Prerequisites" subsection under "Security Scans" with install commands for cargo-audit and cargo-deny
  • Updated Automated CI description to mention dedicated CI jobs

.github/workflows/ci.yml

  • Added security-audit job: installs cargo-audit via cargo install --locked, then runs cargo audit
  • Added license-check job: installs cargo-deny via cargo install --locked, then runs cargo deny check
  • Both jobs follow the same patterns as existing jobs (dtolnay/rust-toolchain, Swatinem/rust-cache)

Acceptance Criteria Met

  1. make audit / make deny emit clear "tool not installed" message with non-zero exit when binary is missing
  2. ✅ Normal flow (tool installed) is unchanged
  3. ✅ CONTRIBUTING.md and README "Security Scans" section explicitly mention install commands
  4. ✅ CI workflow installs cargo-audit and cargo-deny via dedicated steps

closes #46

…e docs/CI (OrbitChainLabs#46)

- Add command -v pre-checks to audit and deny targets with actionable error messages

- Create audit-ci and deny-ci targets for CI auto-install

- Add security-audit and license-check jobs to CI workflow

- Update README Security Scans section with install prerequisites

- Create CONTRIBUTING.md with security tool install instructions

- Add audit-ci and deny-ci to .PHONY targets
- cargo-deny requires deny.toml to run; without it the CI License check job fails

- Includes common Rust ecosystem licenses (MIT, Apache-2.0, BSD, ISC, MPL-2.0, 0BSD, etc.)
…space crates

- Remove deprecated keys from deny.toml (severity-threshold, unlicensed, allow-osi-fsf-free, default, deny in [licenses])

- Fix [sources] section: use allow-registry instead of allow

- Add dotenv advisory (RUSTSEC-2021-0141) to ignore list

- Add license = MIT and publish = false to all 5 workspace crate Cargo.toml files

- Clean up unused allowed licenses from deny.toml
@GBOYEE

GBOYEE commented Jun 24, 2026

Copy link
Copy Markdown

I'd like to work on this.

Approach:

  • I'll add the CI config and test it locally before pushing
  • Verify with existing tests + add new ones if needed

Estimated effort: ~1-2 hours. PR incoming shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LOW] Makefile audit/deny targets fail opaquely when cargo-audit/cargo-deny are not installed

2 participants