diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1613727..9065394 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,3 +1,8 @@ +# SECURITY: Actions are pinned to release tags, not commit SHAs, so whoever controls an +# action could move its tag and run new code in jobs that hold `id-token` or `contents` +# write permissions. This is accepted because each action comes from GitHub, the Rust +# project, or the maintainer of `dtolnay/rust-toolchain`, who already control the runner, +# the toolchain, or the publishing this workflow trusts; pin them to SHAs if that changes. name: Publish to crates.io on: @@ -22,11 +27,12 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 + persist-credentials: false - uses: dtolnay/rust-toolchain@stable with: components: clippy, rustfmt - name: Install Bake launcher - run: cargo install bake --locked + run: cargo install bake --version 0.20.1 --locked - name: Detect an explicit release request id: detect env: @@ -58,9 +64,10 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 + persist-credentials: false - uses: dtolnay/rust-toolchain@stable - name: Install Bake launcher - run: cargo install bake --locked + run: cargo install bake --version 0.20.1 --locked - name: Find workspace packages that need publishing id: packages env: diff --git a/Cargo.lock b/Cargo.lock index d32ea4b..e0836b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,12 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "bake" version = "0.20.1" @@ -23,22 +29,22 @@ dependencies = [ [[package]] name = "bake-agent-context" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c536a159ae7aa41ed8f5f1accda4dbbb8064eefeec9ca629fb02207f9a397" +checksum = "7c8d805e02acc3a3121a702ea9545c1efe23dfcb955fab58dc0117ca4aa2a145" dependencies = [ "bake", "base-markdown", "serde", "serde_json", - "serde_yaml_ng", + "yaml-rust2", ] [[package]] name = "bake-cargo" -version = "0.6.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25d54918a41730e53f75bbf5396aff6bbafbc1bbfd32237a12bff8d19c67b4e6" +checksum = "38417e4c2a0b8d6d4f84e6be83de0e3b848566ab99a04a53775b7c9811565b99" dependencies = [ "bake", "bake-license", @@ -53,13 +59,14 @@ dependencies = [ [[package]] name = "bake-license" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118fc96c91c3f21c94b3e1a5504309afacd110551ff1d5af078acf36fb68a2a5" +checksum = "f70e25afc0b76e54a37fbc873430e0add234b4f73c105b70c24fe4cb6036b4fc" dependencies = [ "bake", "base-markdown", "tempfile", + "toml_edit", ] [[package]] @@ -108,9 +115,9 @@ dependencies = [ [[package]] name = "bake-test" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da16bda018ec7300cc0f7a5a088e93f50a263912f63e0a62420e29de7afee3c" +checksum = "86defb1a5874835378e27f3be338302ef363352b1d3ea9352690a45fdbc27729" dependencies = [ "bake", "serde_json", @@ -134,9 +141,9 @@ dependencies = [ [[package]] name = "base-project" -version = "0.1.3" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6deff31019eb21429038be379396f4b06c780421eaf3012ef7fe2a8c9cc1a0e" +checksum = "17105821bc688644e3193269a7e2c005a53f44b16981094e0771f802f8eb1e1e" dependencies = [ "bake", "bake-agent-context", @@ -147,12 +154,19 @@ dependencies = [ "bake-releases", "bake-test", "base-design", + "base-security 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base-security" version = "0.2.0" +[[package]] +name = "base-security" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cafbfb3e7e5ce421ad36126cde1382cf6e5c994e17ca25701bc8a94fe24650e" + [[package]] name = "base-security-bake" version = "0.0.0" @@ -263,6 +277,12 @@ dependencies = [ "zlib-rs", ] +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -299,6 +319,18 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashlink" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a596f1b20ed2cc5ecac41a164aaebc7258057060f06c0cf7a2ba3991ee7990fb" +dependencies = [ + "hashbrown", +] [[package]] name = "icu_collections" @@ -587,12 +619,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - [[package]] name = "serde" version = "1.0.229" @@ -636,19 +662,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_yaml_ng" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4db627b98b36d4203a7b458cf3573730f2bb591b28871d916dfa9efabfd41f" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - [[package]] name = "shlex" version = "2.0.1" @@ -789,12 +802,6 @@ version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.9.0" @@ -983,6 +990,16 @@ dependencies = [ "rustix", ] +[[package]] +name = "yaml-rust2" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e5b818a27a4cd30884ea380857a5e56f7ec3ba24a3990a3cc0b95af3238e18" +dependencies = [ + "arraydeque", + "hashlink", +] + [[package]] name = "yoke" version = "0.8.4" diff --git a/agents.md b/agents.md index 90f7fb8..9fbab06 100644 --- a/agents.md +++ b/agents.md @@ -2,6 +2,8 @@ Run `cargo bake agent:context:install` to install dependency context and skills, and use `cargo bake agent:context:list` and `cargo bake agent:context:show` to discover guidance. Follow the Base conventions and relevant installed skills under `.agents/`. -Before planning or changing behavior, read applicable `design/*.md`, and assess changes against them before opening or updating a pull request. This crate's own skills are authored in `context/audit.md` and `context/advisory.md`. The installer excludes workspace members, so it does not install them into this checkout; edit the source skill documents, and use their installed names, `base-security-audit` and `base-security-advisory`, in consuming projects. +Before planning or changing behavior, read applicable `design/*.md`, and assess changes against them before opening or updating a pull request. This crate's own skills are authored in `context/audit.md` and `context/advisory.md`. The installed `base-security-audit` and `base-security-advisory` skills come from the published `base-security` release that `base-project` depends on, so they can lag behind `context/`. Edit the source skill documents, and use their installed names in consuming projects. + +Use `base-security-audit` when reviewing code for security issues, and record each review in `security/audit-*.md`. Use `base-security-advisory` for vulnerability reports and for findings that may warrant an advisory. Before reporting a security finding, read the relevant `// SECURITY:` comments and `design/*.md`. The private `bake/` package uses `base-project` for development and release tasks. Run `cargo bake --regenerate` after changing task dependencies. Use `cargo bake test` for the workspace tests and `cargo bake test:coverage --all-targets true` for the standard coverage check. The tests package the crate and verify that a consumer can discover and install both skills from the packaged contents. diff --git a/bake/Cargo.toml b/bake/Cargo.toml index dd3977c..df64f31 100644 --- a/bake/Cargo.toml +++ b/bake/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] bake = ">=0.20, <1" -base-project = ">=0.1.3" +base-project = ">=0.1.7" [dev-dependencies] bake-agent-context = "0.4.0" diff --git a/bake/src/bake_generated_tasks/mod.rs b/bake/src/bake_generated_tasks/mod.rs index d54be9e..429603d 100644 --- a/bake/src/bake_generated_tasks/mod.rs +++ b/bake/src/bake_generated_tasks/mod.rs @@ -1,5 +1,3 @@ -// Released under the MIT License. -// Copyright, 2026, by Samuel Williams. - // Generated by `cargo bake --regenerate`; do not edit. + use base_project as _; diff --git a/readme.md b/readme.md index 4649c22..2b1315d 100644 --- a/readme.md +++ b/readme.md @@ -45,7 +45,7 @@ Add this instruction to the project's agent guidance: ## Releasing -Prepare a release with `cargo bake cargo:version:patch` (or `minor`, `major`, or `bump --version X.Y.Z`), commit it with a `Release: vVERSION` trailer, then run `cargo bake cargo:release` and open a pull request. After review and merge, GitHub Actions publishes the release when the configured `crates-io` environment approves it, then creates or updates the matching GitHub Release from `releases.md`. Follow the shared [Releasing skill](https://github.com/base-rs/base-project/blob/main/context/releasing.md) for the standard process. +Prepare a release with `cargo bake cargo:release:patch` (or `minor`, `major`, or `bump --version X.Y.Z`), which bumps the version, commits it with a `Release: vVERSION` trailer, validates it and opens the release pull request. After review and merge, GitHub Actions publishes the release when the configured `crates-io` environment approves it, then creates or updates the matching GitHub Release from `releases.md`. Follow the shared [Releasing skill](https://github.com/base-rs/base-project/blob/main/context/releasing.md) for the standard process. ## Releases