Repository navigation
Conversation
- Repository tooling logic moves into one workspace crate, xml-sec-tools, run with cargo; shell scripts only sequence commands. - Its first subcommand, kernel-examples, replaces the Perl generator of the embedded parsers' documentation tests with the same output, including the documented item's cfg, and its checks are unit tests.
- ci-blocks replaces scripts/ci-test-blocks.mjs with the same profiles, command lines, group markers and failure messages. - Its tests, including the workflow wiring checks, run with nextest in the hardening job.
- check-features, hardening and pkcs11-tests replace their shell scripts; profile tables, the verification-only graph gate, coverage flag remapping and the token store setup are Rust with unit tests. - The coverage report check runs inside hardening, and the coverage environment listing is parsed instead of evaluated by a shell. - The runner-image action is a composite action; the workflow and action contracts are Rust tests.
- pedantic-lints, documentation and shared-pkix replace their Node and shell scripts with the same checks; the metadata selection, example tampering and suppression scanner are Rust with the original tests. - Process execution is one trait shared by the subcommands.
- security-corpus replaces the Node corpus checker; the reviewed dispositions become a data file beside the audit, and the generated audit and inventory stay byte-identical. - fuzz-security replaces the shell runner with the same seed selection, smoke budget, evidence files and cleanup rules; its runner tests run on Linux and macOS.
The competitor harness lockfile still pinned xml-sec 0.2.0 while the workspace is at 0.3.0. Refreshing only that entry leaves every competitor dependency as locked. Part of #333
Every benchmark runner and report is now a subcommand of xml-sec-tools: - bench-latency replaces benchmark-security.sh - bench-compare and competitor-lock replace benchmark-compare.sh and refresh-competitor-lock.sh - bench-cli and bench-library replace compare-security.mjs and compare-library.mjs - bench-regression, bench-identity and bench-dashboard replace compare-regression.mjs, build-identity.mjs and build-benchmark-dashboard.mjs - bench-xslt replaces benchmark-xslt.mjs The Node tests move to nextest. CI, the benchmark container and the runbooks call the subcommands, and the benchmark jobs no longer set up Node. Reports read with serde_json's float_roundtrip, so measurements copied from an earlier run keep their exact digits. Part of #333
The six Python scripts of the XAdES interoperability corpus become the xades subcommand of xml-sec-tools: - xades check runs the live gate: inventory, harness tests, libxmlsec1 and probe verification, golden octets, DSS default and strict-policy expectations - xades corpus, dss, binding and package replace xades-interop.py, xades-dss.py, investigate-xades-dss.py and package-xades-interop.py - the harness tests move from test-xades-interop.py to nextest DSS reports and signed fixtures are read with xml-sec's own DOM. Every command runs in its own process group with a deadline; a timeout stops the group and keeps the streams read so far. The corpus archive stays reproducible: fixed owner, group and times. CI calls the subcommand, the corpus documentation names the new commands and the corpus inventory covers the updated documents. Part of #333
- libxslt-fixtures replaces import-libxslt-oracle-fixtures.sh. The XSLTMark databases come from a port of upstream dbgen.pl, so the import no longer needs Perl; tests pin the port and the case manifest to the committed corpus byte for byte. The pinned commit is read from its compatibility file. - xslt-conformance replaces check-xslt-conformance.sh; its admission and failure-propagation tests move from Node to nextest. - wasm-c14n replaces test-wasm-c14n.sh. The smoke module runs in the wasmi interpreter instead of a Node host. Process steps can now remove inherited variables, which the conformance gate uses to refuse a sliced corpus. No CI job sets up Node anymore. Part of #333
publish-crate replaces .github/scripts/publish-crate.sh, which read the package version with jq. The release still uploads a version only when crates.io does not show it, and still treats an upload that becomes visible after a failed publish command as success. Tests cover both and a version that never appears. Part of #333
donor-fixtures replaces import-donor-fixtures.sh, which corrected the Phaos README with sed. Each target is still staged completely beside itself and swapped in, so a failed import keeps the last known-good snapshot; path validation, the Merlin and Phaos corrections and the corpora.sha256 inventory are unchanged. The importer's integration tests move from tests/import_donor_fixtures.rs into the tool's tests. Importing from the pinned donor reproduces the committed fixtures, including the corpus inventory, byte for byte. Part of #333
donor-fixtures --cli [--check] replaces import-xmlsec1-cli-fixtures.sh. The snapshot still copies only assets tracked and unchanged at the pinned donor commit, records that commit, keeps runner scripts executable, and --check reports drift without touching the snapshot. Its tests move from tools/xmlsec1/tests/import_snapshot.rs into the tool and no longer need the donors checkout: each builds a throwaway donor repository. The Bash version's guard against a signal between its two mv calls has no counterpart: promotion is now two renames in one process, and a failed rename restores the previous snapshot. Part of #333
xades fixtures replaces generate-xades-fixtures.sh, whose templates were heredocs. OpenSSL still issues the test chain and xmlsec1 still signs every template; the templates themselves are now built by the tool. Run side by side, both generators write byte-identical templates apart from the certificate digests of their random keys. xades corpus --generate calls the generator directly, the corpus archive carries its source instead of the script, and the corpus documents and inventory name the new command. Part of #333
install-xmlsec1 replaces scripts/install-xmlsec1.sh. Behavior is kept: a cached prefix is reused only after its version and transforms pass again, the source must resolve to the pinned commit (exported from a local checkout or fetched), the modern profile builds a private, digest-checked OpenSSL, and a new build replaces the previous one only after validation, which otherwise restores it. The build directory now lives beside the prefix, so promotion is a rename on one file system. Process steps can run in a given directory, which OpenSSL's Configure needs. The installer's integration tests move from tests/install_xmlsec1.rs into the tool, driving it through a recorded toolchain instead of fake commands on PATH. CI, the fuzz workflows, the benchmark comparison and the oracle cache key use the subcommand. Part of #333
- fetch-standards replaces scripts/fetch-standards.sh, which parsed docs/standards-sources.tsv in a shell read loop. Downloads, the PDF payload check, RFC status records, SHA256SUMS and the retrieval time are unchanged; the inventory is now sorted. - The SHA-3 vector and Merlin key importers check their archive digest with shasum --check instead of cutting the hash out of its output, so they stay plain command sequences. Part of #333
The process-group test moves a background job out of the command's group with job control. Not every sh offers job control to scripts, so the case runs under bash explicitly. Part of #333
|
Important Review skippedToo many files! This PR contains 168 files, which is 68 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.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57ad95e525
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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 gonefrom repository tooling; the only JavaScript left is what the platform needs
(the
clean-build-outputaction'spost:step and the dashboard's browsercode).
ci-blocks,check-features,hardening,pkcs11-tests,pedantic-lints,documentation,shared-pkixandwasm-c14n(the WebAssembly smoke module runs in thewasmiinterpreterinstead of a Node host).
security-corpus(its disposition table is nowdata in
tests/fixtures/security/dispositions.json) andfuzz-security.bench-latency,bench-compare,bench-cli,bench-library,bench-regression,bench-identity,bench-dashboard,bench-xsltandcompetitor-lock. Reports are read withfloat_roundtrip, so measurementscopied from earlier runs keep their exact digits.
libxslt-fixtures(XSLTMark databases from a port of upstreamdbgen.pl) andxslt-conformance.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.
donor-fixtures(including the CLI runner snapshot),install-xmlsec1,kernel-examplesandfetch-standards.publish-crate.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 arecorded process runner instead of fake commands on
PATH. No CI job sets upNode anymore.
The first commit carries the Rust kernel-example generator that PR #331 also
contains; whichever lands second drops it.
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 withrecorded tools;
security-corpus checkreproducesaudit.jsonbyte for byte.bench-dashboardoutput is byteidentical and
bench-regressiondiffers only in itsgeneratedtime. A fulllocal
bench-comparevalidated 336 command-line and 144 library cases, and abench-latencysmoke run completed.xades checkpassed live: 100 independent octet vectors, DSS default andstrict-policy expectations. The corpus inventory is unchanged except for the
edited documents.
libxslt-fixtures --check,donor-fixtures(default,--xmlenc-corporaand
--cli --check) reproduce the committed fixtures exactly.xades fixtureswrites templates identical to the original generator'sapart from the certificate digests of new random keys.
install-xmlsec1built the oracle from the pinned donor and reuses a validcache;
xslt-conformance --cache-managedpassed against it.cargo nextest run -p xml-sec-tools(202 tests),cargo clippy -p xml-sec-tools --all-targets -D warnings,cargo fmt --all --checkanddocumentation docspass locally on macOS. Linux and Windows run in CI.Not run live:
publish-crate(it would publish) andfetch-standards(itwould overwrite the local reference corpus); both are covered by tests with
recorded processes.
Closes #333