fix: bump rsfusa to v0.3.14 and make the safety-analysis pipeline real - #23
Open
SoundMatt wants to merge 1 commit into
Open
fix: bump rsfusa to v0.3.14 and make the safety-analysis pipeline real#23SoundMatt wants to merge 1 commit into
SoundMatt wants to merge 1 commit into
Conversation
The rust-FuSa CLI (rsfusa) was pinned to a stale v0.3.10 while the config schema, HARA schema, and stub-detection rules it enforces had moved on several releases (v0.3.11-v0.3.14). Every core safety command in CI was failing on a config parse error and being masked green by `|| true` on every step, so the "ASIL-B safety (rust-FuSa)" job had been running none of its actual workload for some time. - Bump the rsfusa pin to v0.3.14 (current latest release) in both ci.yml and the new release.yml. - Fix .fusa.json to the current config schema (configVersion/project object/standard) so rsfusa can parse it at all (#13, #19). - Rewrite .fusa-hara.json to the current operationalSituations/hazards/ safetyGoals schema, with ASIL letting the tool derive it from S/E/C against the literal ISO 26262-3 Table 4 rather than a hand-typed value (several hazards' previously-claimed ASIL-B did not actually match their own S/E/C under the real table) (#14). - Add the 15 REQ-VIRT-013..019 / REQ-MASTER-006..013 requirement IDs that were tagged in code/tests but missing from .fusa-reqs.json and requirements.json (#18). - Remove `|| true` from every safety-job step now that its root cause (the config parse failure) is fixed, so a real regression fails CI instead of being silently swallowed (#13). - Fix real `check --strict` findings the newer rsfusa content-quality rules surface instead of suppressing them: replace production-code .unwrap() with .expect("..."), replace test-code .unwrap() with .expect() carrying a rationale (rule LINT002's own remediation), reduce several genuine nesting-depth hot spots (rule ANA002) by extracting helper functions, add `#![forbid(unsafe_code)]` (LINT006), and annotate/fix the truncating-cast sites the tool flags (ANA005) — including making an LDF frame-ID parse fail cleanly instead of silently truncating out-of-range IDs. - Add the missing `rsfusa coupling` step (ISO 26262-6 §6.4.4 evidence the gap report requires but CI never generated). - Gate CI on `rsfusa safety-case`'s missing-required-evidence warning and on `rsfusa qualify`'s qualification badge, and reorder the safety job so qualify/release run before safety-case/iso26262 (both check for qualify-report.json/sbom.json's presence) (#15). - Supply `rsfusa qualify` real qualification metadata (--qualification-method self --qualifier ... --record-uri ...) so the badge reflects the project's actual self-qualification process instead of always reading "unqualified" regardless of pass rate (#15). - Fix the coverage step's broken percentage extraction and turn the claimed "must be >= 90%" comment into a real gate at the current ~85% baseline, to be ratcheted up over time (#16). - Keep `rsfusa verify` non-blocking (a real upstream rust-FuSa bug: it invokes `cargo test -- --test-output=immediate`, a libtest flag that does not exist) but make the skip loud via a `::warning::` annotation instead of a silent `|| true` (#13). - Fix a doc comment in integration_test.rs whose literal `//fusa:test` substring was being parsed by `rsfusa trace` as a malformed annotation. - Add release.yml: attach sbom.json/provenance.json/artifact-manifest.json to the GitHub Release on publish, so supply-chain evidence is discoverable per-release instead of only inside an ephemeral CI workflow-run artifact bundle (#17). - Update tool-qualification/rsfusa-tql2.md's version/qualification-method claims to match reality. Closes #13, #14, #15, #16, #17, #18, #19, #21. Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The rust-FuSa CLI (
rsfusa) was pinned to stale v0.3.10 while the config schema, HARA schema, and content-quality rules it enforces moved on several releases. Every core safety command in CI was failing on a config parse error and being masked green by|| trueon every step. This PR bumps the pin to the current latest release (v0.3.14), fixes the repo's config/HARA/requirements content to satisfy the current schema, removes the masking now that the root cause is fixed, and adds real gating where the pipeline previously just logged warnings and exited 0.rsfusapin to v0.3.14 inci.ymland newrelease.yml(single, explicit, identical pin — no floating)..fusa.jsonto the current config schema (configVersion/projectobject/standard) — this was the actual root cause of every downstream parse failure..fusa-hara.jsonto the currentoperationalSituations/hazards/safetyGoalsschema. ASIL is now derived by the tool from S/E/C against the literal ISO 26262-3 Table 4 rather than hand-typed — several hazards' previously-claimed ASIL-B didn't actually match their own S/E/C under the real table (now correctly ASIL-A/QM as applicable; the ASIL-B hazards remain ASIL-B).REQ-VIRT-013..019/REQ-MASTER-006..013IDs that were tagged in code/tests but missing from.fusa-reqs.jsonandrequirements.json.|| truefrom every safety-job step now that the config parse failure is fixed — a real regression now fails CI instead of being silently swallowed.check --strictfindings the newer content-quality rules surface (rather than suppressing them): production-code.unwrap()→.expect("..."); test-code.unwrap()→.expect()with a rationale (rule LINT002's own remediation); reduce genuine nesting-depth hot spots (ANA002) by extracting helper functions; add#; annotate/fix truncating-cast sites (ANA005), including making LDF frame-ID parsing fail cleanly instead of silently truncating out-of-range IDs.rsfusa couplingstep — required ISO 26262-6 §6.4.4 evidence the gap report expects but CI never generated.rsfusa safety-case's missing-required-evidence warning and onrsfusa qualify's qualification badge; reorder the job soqualify/releaserun beforesafety-case/iso26262(both check forqualify-report.json/sbom.json's presence).rsfusa qualifyreal qualification metadata (--qualification-method self --qualifier ... --record-uri ...) so the badge reflects the project's actual process instead of always readingunqualifiedregardless of pass rate.rsfusa verifynon-blocking — it's a real upstream rust-FuSa bug (cargo test -- --test-output=immediate, a libtest flag that doesn't exist) — but make the skip loud via a::warning::annotation instead of a silent|| true.integration_test.rswhose literal//fusa:testsubstring was being parsed byrsfusa traceas a malformed annotation.release.yml: attachsbom.json/provenance.json/artifact-manifest.jsonto the GitHub Release on publish.tool-qualification/rsfusa-tql2.md's version/qualification-method claims to match reality.Closes #13, #14, #15, #16, #17, #18, #19, #21.
Test plan
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo test --locked(46 unit/integration + 2 doc tests)cargo build --release --bin rust-lin --lockedrsfusacommand in CI order, from a clean checkout:lint,analyze,check --strict(exit 0, 0 errors/0 warnings),check --format sarif,comp,trace,fmea,tara,cyber,coupling,boundary,hara show(0 findings),qualify(badge:self-qualified),release,safety-case(0 missing required evidence),iso26262(13/13 objectives satisfied, 0 gaps),audit-pack— all genuinely pass, not masked.