Skip to content

build: move repository tooling to one Rust crate - #335

Merged
polaz merged 1 commit into
mainfrom
build/#333-rust-tooling
Oct 29, 2026
Merged

polaz merged 1 commit into
mainfrom
build/#333-rust-tooling

Conversation

@polaz

@polaz polaz commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Repository tooling now uses two things: Bash to sequence commands and one Rust
crate, xml-sec-tools, for every piece of logic. Node, Python and Perl are gone
from repository tooling; the only JavaScript left is what the platform needs
(the clean-build-output action's post: step and the dashboard's browser
code).

  • CI planning and gates: ci-blocks, check-features, hardening,
    pkcs11-tests, pedantic-lints, documentation, shared-pkix and
    wasm-smoke (the WebAssembly module's C14N and XMLDSig verification exports
    run in the wasmi interpreter instead of a Node host).
  • Security corpus and fuzzing: security-corpus (its disposition table is now
    data in tests/fixtures/security/dispositions.json) and fuzz-security.
  • Benchmarks: bench-latency, bench-compare, bench-cli, bench-library,
    bench-regression, bench-identity, bench-dashboard, bench-xslt and
    competitor-lock. Reports are read with float_roundtrip, so measurements
    copied from earlier runs keep their exact digits. Child processes are awaited
    with a blocking wait and a deadline, so latency observations include no
    polling delay after the child exits.
  • XSLT: libxslt-fixtures (XSLTMark databases from a port of upstream
    dbgen.pl) and xslt-conformance.
  • XAdES corpus: xades check | corpus | dss | binding | fixtures | package.
    DSS reports and fixtures are read with xml-sec's own DOM; every command runs
    in its own process group with a deadline that stops the group. The archive
    carries the whole runner crate and a root Cargo.toml built from the
    baseline manifest with the runner added to the workspace, so the overlay
    builds over the recorded commit without changing the frozen xml-sec
    package.
  • Donors and oracles: donor-fixtures (including the CLI runner snapshot),
    install-xmlsec1 (any failure between promotion and commit restores the
    previous installation), kernel-examples and fetch-standards.
  • Release: publish-crate.

A step that runs another subcommand goes through cargo run, because an
earlier step may rebuild the tool with other workspace features and replace the
running binary. Script tests and the Rust integration tests that drove Bash
scripts (tests/import_donor_fixtures.rs, tests/install_xmlsec1.rs,
tools/xmlsec1/tests/import_snapshot.rs) become tests of the tool, using a
recorded process runner instead of fake commands on PATH. No CI job sets up
Node anymore.

Replaces #334, closed after its history was squashed into one commit.

Testing

Each replaced script was checked against the original on the same inputs
before removal:

  • ci-blocks, check-features, hardening, pedantic-lints,
    shared-pkix, fuzz-security: identical command plans and outputs with
    recorded tools; security-corpus check reproduces audit.json byte for byte.
  • Benchmarks: on the published Pages data, bench-dashboard output is byte
    identical and bench-regression differs only in its generated time. A full
    local bench-compare validated 336 command-line and 144 library cases, and a
    bench-latency smoke run completed.
  • xades check passed live: 100 independent octet vectors, DSS default and
    strict-policy expectations. xades corpus reports no unexpected outcome.
  • The packaged archive, extracted over a checkout of the recorded baseline,
    builds the runner; cargo nextest run -p xml-sec-tools xades passes there
    and xades corpus runs to completion.
  • libxslt-fixtures --check, donor-fixtures (default, --xmlenc-corpora
    and --cli --check) reproduce the committed fixtures exactly.
  • xades fixtures writes templates identical to the original generator's
    apart from the certificate digests of new random keys.
  • install-xmlsec1 built the oracle from the pinned donor and reuses a valid
    cache; xslt-conformance --cache-managed passed against it.
  • cargo nextest run -p xml-sec-tools (210 tests), cargo clippy -p xml-sec-tools --all-targets -D warnings and cargo fmt --check pass
    locally on macOS; wasm-smoke passes both exports from an unoptimized
    build of the tool. Linux and Windows run in CI.

Not run live: publish-crate (it would publish) and fetch-standards (it
would overwrite the local reference corpus); both are covered by tests with
recorded processes.

Closes #333

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 162 files, which is 62 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9ace0e8 and fe0288d.

Files selected for processing: 162
  • .github/actions/runner-image/action.yml
  • .github/actions/runner-image/identity.mjs
  • .github/actions/xmlsec-oracle-cache/action.yml
  • .github/scripts/publish-crate.sh
  • .github/workflows/benchmark-comparison.yml
  • .github/workflows/ci.yml
  • .github/workflows/fuzz.yml
  • .github/workflows/release.yml
  • .gitignore
  • AGENTS.md
  • Cargo.toml
  • benchmarks/Dockerfile
  • crates/xml-sec-xades/tests/basic.rs
  • crates/xml-sec-xslt/README.md
  • docs/README.md
  • docs/benchmarks.md
  • docs/ci-hardening.md
  • docs/cli.md
  • docs/crypto-providers.md
  • docs/cve-audit.md
  • docs/cve-inventory.md
  • docs/features.md
  • docs/migration-libxmlsec1.md
  • docs/standards-audit.md
  • docs/xslt-conformance.md
  • docs/xslt-performance.md
  • fuzz/README.md
  • interop/xades/PROVENANCE.md
  • interop/xades/README.md
  • interop/xades/SHA256SUMS
  • interop/xades/dss-investigation/README.md
  • scripts/benchmark-compare.sh
  • scripts/benchmark-security.sh
  • scripts/benchmark-xslt.mjs
  • scripts/benchmark-xslt.test.mjs
  • scripts/build-benchmark-dashboard.mjs
  • scripts/build-identity.mjs
  • scripts/build-identity.test.mjs
  • scripts/check-coverage-report.mjs
  • scripts/check-documentation.sh
  • scripts/check-documentation.test.mjs
  • scripts/check-features.sh
  • scripts/check-features.test.mjs
  • scripts/check-hardening.sh
  • scripts/check-hardening.test.mjs
  • scripts/check-pedantic-lints.mjs
  • scripts/check-pedantic-lints.test.mjs
  • scripts/check-shared-pkix.sh
  • scripts/check-shared-pkix.test.mjs
  • scripts/check-xades-interop.py
  • scripts/check-xslt-conformance.sh
  • scripts/check-xslt-conformance.test.mjs
  • scripts/ci-cache.test.mjs
  • scripts/ci-test-blocks.mjs
  • scripts/ci-test-blocks.test.mjs
  • scripts/compare-library.mjs
  • scripts/compare-library.test.mjs
  • scripts/compare-regression.mjs
  • scripts/compare-regression.test.mjs
  • scripts/compare-security.mjs
  • scripts/compare-security.test.mjs
  • scripts/fetch-standards.sh
  • scripts/fuzz-security.sh
  • scripts/fuzz-security.test.mjs
  • scripts/generate-xades-fixtures.sh
  • scripts/import-donor-fixtures.sh
  • scripts/import-libxslt-oracle-fixtures.sh
  • scripts/import-merlin-original-keys.sh
  • scripts/import-sha3-bit-vectors.sh
  • scripts/import-xmlsec1-cli-fixtures.sh
  • scripts/install-xmlsec1.sh
  • scripts/investigate-xades-dss.py
  • scripts/package-xades-interop.py
  • scripts/refresh-competitor-lock.sh
  • scripts/security-corpus.mjs
  • scripts/security-corpus.test.mjs
  • scripts/security-dispositions.mjs
  • scripts/test-pkcs11.sh
  • scripts/test-wasm.sh
  • scripts/test-xades-interop.py
  • scripts/xades-dss.py
  • scripts/xades-interop.py
  • tests/benchmark_contract.rs
  • tests/fixtures/security/dispositions.json
  • tests/fixtures/xmldsig/README.md
  • tests/fixtures/xmlenc/README.md
  • tests/import_donor_fixtures.rs
  • tests/install_xmlsec1.rs
  • tests/pkcs11.rs
  • tools/xml-sec-tools/Cargo.toml
  • tools/xml-sec-tools/src/bench/cli.rs
  • tools/xml-sec-tools/src/bench/compare.rs
  • tools/xml-sec-tools/src/bench/compare/tests.rs
  • tools/xml-sec-tools/src/bench/dashboard.rs
  • tools/xml-sec-tools/src/bench/identity.rs
  • tools/xml-sec-tools/src/bench/identity/tests.rs
  • tools/xml-sec-tools/src/bench/latency.rs
  • tools/xml-sec-tools/src/bench/latency/tests.rs
  • tools/xml-sec-tools/src/bench/library.rs
  • tools/xml-sec-tools/src/bench/library/tests.rs
  • tools/xml-sec-tools/src/bench/mod.rs
  • tools/xml-sec-tools/src/bench/regression.rs
  • tools/xml-sec-tools/src/bench/regression/tests.rs
  • tools/xml-sec-tools/src/bench/tests.rs
  • tools/xml-sec-tools/src/bench/xslt.rs
  • tools/xml-sec-tools/src/bench/xslt/tests.rs
  • tools/xml-sec-tools/src/check_features.rs
  • tools/xml-sec-tools/src/check_features/tests.rs
  • tools/xml-sec-tools/src/ci_blocks.rs
  • tools/xml-sec-tools/src/ci_blocks/tests.rs
  • tools/xml-sec-tools/src/coverage.rs
  • tools/xml-sec-tools/src/coverage/tests.rs
  • tools/xml-sec-tools/src/documentation.rs
  • tools/xml-sec-tools/src/documentation/tests.rs
  • tools/xml-sec-tools/src/donor_fixtures.rs
  • tools/xml-sec-tools/src/donor_fixtures/cli.rs
  • tools/xml-sec-tools/src/donor_fixtures/cli/tests.rs
  • tools/xml-sec-tools/src/donor_fixtures/tests.rs
  • tools/xml-sec-tools/src/fetch_standards.rs
  • tools/xml-sec-tools/src/fetch_standards/tests.rs
  • tools/xml-sec-tools/src/fuzz_security.rs
  • tools/xml-sec-tools/src/fuzz_security/tests.rs
  • tools/xml-sec-tools/src/hardening.rs
  • tools/xml-sec-tools/src/hardening/tests.rs
  • tools/xml-sec-tools/src/install_xmlsec1.rs
  • tools/xml-sec-tools/src/install_xmlsec1/tests.rs
  • tools/xml-sec-tools/src/libxslt_fixtures.rs
  • tools/xml-sec-tools/src/libxslt_fixtures/tests.rs
  • tools/xml-sec-tools/src/main.rs
  • tools/xml-sec-tools/src/pedantic_lints.rs
  • tools/xml-sec-tools/src/pedantic_lints/tests.rs
  • tools/xml-sec-tools/src/pkcs11.rs
  • tools/xml-sec-tools/src/pkcs11/tests.rs
  • tools/xml-sec-tools/src/publish_crate.rs
  • tools/xml-sec-tools/src/publish_crate/tests.rs
  • tools/xml-sec-tools/src/repo.rs
  • tools/xml-sec-tools/src/repo/tests.rs
  • tools/xml-sec-tools/src/security_corpus.rs
  • tools/xml-sec-tools/src/security_corpus/tests.rs
  • tools/xml-sec-tools/src/shared_pkix.rs
  • tools/xml-sec-tools/src/shared_pkix/tests.rs
  • tools/xml-sec-tools/src/test_support.rs
  • tools/xml-sec-tools/src/wasm_smoke.rs
  • tools/xml-sec-tools/src/wasm_smoke/tests.rs
  • tools/xml-sec-tools/src/workflow_contracts.rs
  • tools/xml-sec-tools/src/xades/binding.rs
  • tools/xml-sec-tools/src/xades/check.rs
  • tools/xml-sec-tools/src/xades/corpus.rs
  • tools/xml-sec-tools/src/xades/dss.rs
  • tools/xml-sec-tools/src/xades/fixtures.rs
  • tools/xml-sec-tools/src/xades/fixtures/tests.rs
  • tools/xml-sec-tools/src/xades/mod.rs
  • tools/xml-sec-tools/src/xades/package.rs
  • tools/xml-sec-tools/src/xades/process.rs
  • tools/xml-sec-tools/src/xades/process/tests.rs
  • tools/xml-sec-tools/src/xades/tests.rs
  • tools/xml-sec-tools/src/xades/xml.rs
  • tools/xml-sec-tools/src/xslt_conformance.rs
  • tools/xml-sec-tools/src/xslt_conformance/tests.rs
  • tools/xmlsec1/Cargo.toml
  • tools/xmlsec1/tests/import_snapshot.rs
  • tools/xmlsec1/tests/xmlenc_encrypt_xmlsec1.rs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T17:43:25.542134Z fe0288d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Repository tooling uses Bash to sequence commands and one Rust crate,
xml-sec-tools, for every piece of logic. Node, Python and Perl are gone
from repository tooling; the only JavaScript left is what the platform
needs (the clean-build-output action's post step and the dashboard's
browser code).

- CI planning and gates: ci-blocks, check-features, hardening,
  pkcs11-tests, pedantic-lints, documentation, shared-pkix and wasm-smoke
  (the WebAssembly module's C14N and signature verification exports run
  in the wasmi interpreter).
- Security corpus and fuzzing: security-corpus (its disposition table is
  data in tests/fixtures/security/dispositions.json) and fuzz-security.
- Benchmarks: bench-latency, bench-compare, bench-cli, bench-library,
  bench-regression, bench-identity, bench-dashboard, bench-xslt and
  competitor-lock. Child waits block until exit with a deadline, so
  latency observations carry no polling delay.
- XSLT: libxslt-fixtures and xslt-conformance.
- XAdES corpus: xades check, corpus, dss, binding, fixtures and package.
  Every command runs in its own process group with a deadline. The
  archive carries the whole runner crate and a root manifest derived
  from the baseline one, so the overlay builds over the recorded commit.
- Donors and oracles: donor-fixtures, install-xmlsec1 (which restores
  the previous installation on any failure before commit),
  kernel-examples and fetch-standards.
- Release: publish-crate.

A step that runs another subcommand goes through cargo run, since an
earlier step may rebuild the tool with other workspace features.
Script tests and the Rust tests that drove Bash scripts become tests of
the tool, using a recorded process runner.

Closes #333
@polaz
polaz force-pushed the build/#333-rust-tooling branch from 2a3201d to fe0288d Compare October 29, 2026 17:40
@polaz
polaz enabled auto-merge (squash) October 29, 2026 18:07
@polaz
polaz merged commit 0416516 into main Oct 29, 2026
29 checks passed
@polaz
polaz deleted the build/#333-rust-tooling branch October 29, 2026 18:13
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.

Move repository tooling to Bash and one Rust crate

1 participant