Repository navigation
fix: v1.144.0 — FuSaOps self-audit against spec v1.15.0 (10 bugs) - #90
Merged
Merged
Conversation
A fresh, deliberately skeptical audit of FuSaOps' own hara/tara/ safetycase/sci/fmea artifacts against spec v1.15.0 found 10 real defects the earlier PR1/PR2 conformance work had missed: ASIL never cross-checked against derived S×E×C, hara show --format json exiting 0 on an absent file, wrong TARA JSON field names, absolute paths leaking into safety- case.json/sci.json, non-canonical standard values, a missing FMEA file field, dangling fssrRefs never checked against the requirement registry, missing common header fields, and no coveragePct safety clamp. See CHANGELOG.md for the full breakdown per package. Signed-off-by: SoundMatt <SoundMatt@users.noreply.github.com>
| //fusa:test REQ-FO-CLI073 | ||
| func TestHaraShowOutputFlag(t *testing.T) { | ||
| dir := t.TempDir() | ||
| if code, _, errb := runArgs(t, "hara", "--dir", dir, "init"); code != 0 { |
| //fusa:test REQ-FO-CLI073 | ||
| func TestHaraShowJSONAbsentFileExitsNonZero(t *testing.T) { | ||
| dir := t.TempDir() | ||
| code, _, errb := runArgs(t, "hara", "--dir", dir, "show", "--format", "json") |
| //fusa:test REQ-FO-CLI073 | ||
| func TestHaraShowTextAbsentFileStillExitsZero(t *testing.T) { | ||
| dir := t.TempDir() | ||
| code, _, errb := runArgs(t, "hara", "--dir", dir, "show") |
| } | ||
|
|
||
| if *format == "json" { | ||
| if _, statErr := os.Stat(filepath.Join(projectRoot, hara.HARAFile)); os.IsNotExist(statErr) { |
| } | ||
|
|
||
| if *format == "json" { | ||
| if _, statErr := os.Stat(filepath.Join(projectRoot, hara.HARAFile)); os.IsNotExist(statErr) { |
| //fusa:test REQ-FO-CLI073 | ||
| func TestHaraShowJSON(t *testing.T) { | ||
| dir := t.TempDir() | ||
| if code, _, errb := runArgs(t, "hara", "--dir", dir, "init"); code != 0 { |
| // canonical lowercase id per x-FuSa spec §2.4.1. Only standards FuSaOps | ||
| // itself emits are covered; an unmapped input is returned unchanged by | ||
| // CanonicalStandardID rather than guessed at. | ||
| var canonicalStandardIDs = map[string]string{ |
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
A follow-up self-audit of FuSaOps' own hara/tara/safetycase/sci/fmea artifact packages against spec v1.15.0 — deliberately skeptical, same method used against the sibling x-FuSa tools this session — found 10 real defects that the earlier PR1/PR2 conformance work had missed:
.fusa-reqs.jsonhara show --format jsonexited 0 on an absent.fusa-hara.jsoninstead of reporting the gapattackPath/riskLevelinstead of spec'sattackVector/riskevidence[].path/items[].pathinstead of project-relativefilefield, absent entirelyschemaVersion/kind/language); spec'skindenum extended to list theseFull per-package breakdown in CHANGELOG.md.
Test plan
go build ./...,go vet ./...cleango test ./...— all packages pass