Skip to content

fix: v1.144.0 — FuSaOps self-audit against spec v1.15.0 (10 bugs) - #90

Merged
SoundMatt merged 1 commit into
mainfrom
fix/self-audit-v1.15.0-conformance
Jul 28, 2026
Merged

SoundMatt merged 1 commit into
mainfrom
fix/self-audit-v1.15.0-conformance

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

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:

  • hara: ASIL never cross-checked against derived S×E×C; fssrRefs never cross-checked against .fusa-reqs.json
  • hara CLI: hara show --format json exited 0 on an absent .fusa-hara.json instead of reporting the gap
  • tara: JSON emitted attackPath/riskLevel instead of spec's attackVector/risk
  • safetycase/sci: absolute filesystem paths leaked into evidence[].path/items[].path instead of project-relative
  • standard field canonicalized to §2.4.1 lowercase ids (hara/tara/safetycase)
  • fmea: added the spec-mandated file field, absent entirely
  • fmea/tara/safetycase/sas/sci: added the §3.1 common header (schemaVersion/kind/language); spec's kind enum extended to list these
  • coveragePct defensively clamped to 100 with a regression test

Full per-package breakdown in CHANGELOG.md.

Test plan

  • go build ./..., go vet ./... clean
  • go test ./... — all packages pass
  • Coverage on touched packages: hara 92.0%, tara 95.2%, fmea 94.0%, safetycase 95.1%, sci 95.6%, sas 95.4%, cmd/fusaops 92.7% — all ≥80% gate
  • Regenerated fmea.json/tara.json/safety-case.json/.fusa-hara.json against the fixed code and manually inspected

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")
Comment thread cmd/fusaops/cmd_hara.go
}

if *format == "json" {
if _, statErr := os.Stat(filepath.Join(projectRoot, hara.HARAFile)); os.IsNotExist(statErr) {
Comment thread cmd/fusaops/cmd_hara.go
}

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 {
Comment thread fusaops.go
// 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{
@SoundMatt
SoundMatt merged commit 94bc3cb into main Jul 28, 2026
13 checks passed
@SoundMatt
SoundMatt deleted the fix/self-audit-v1.15.0-conformance branch July 28, 2026 21:21
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.

2 participants