Spec reference
x-FuSa spec §9.2 (v1.14.1 addition), Closed enums (MUST):
impact.{safety,financial,operational,privacy}: critical | major | moderate | negligible... A tool MUST NOT substitute a different vocabulary (e.g. high|medium|low) for these four fields, even though that vocabulary is used for attackFeasibility.
risk: critical | high | medium | low
and the Risk combination table (SHOULD), a specific lookup of highest-SFOP-impact × attackFeasibility → risk.
What actually happens
This repo's own committed tara.json (dogfooded by PR #72) uses high/medium/low for every SFOP impact axis — never critical/major/moderate/negligible:
{
"id": "TARA-001",
"impact": {"safety": "high", "financial": "low", "operational": "medium", "privacy": "low"},
"risk": "high",
"attackFeasibility": "medium"
}
Traced to cmd/cfusa/cmd_tara.c's four hardcoded category profiles (e.g. PROFILE_MEMORY = { "memory", "local", "medium", "high", "low", "medium", "low", ... } — the SFOP fields are literally the strings "high"/"low"/"medium"), and to impact_rank()/feasibility_rank()/derive_risk():
static int impact_rank(const char *v)
{
if (!strcmp(v, "high")) return 3;
if (!strcmp(v, "medium")) return 2;
return 1; /* low */
}
static const char *derive_risk(const category_profile_t *p)
{
int score = feasibility_rank(p->feasibility) * impact_rank(max_sfop(p));
if (score <= 2) return "low";
if (score <= 6) return "medium";
if (score <= 9) return "high";
return "critical";
}
derive_risk is an independently-invented feasibility_rank × impact_rank numeric score with its own thresholds — it doesn't implement the spec's stated combination table at all (e.g. per the spec table, critical impact + medium feasibility → critical risk; this code's equivalent path can only ever produce low/medium/high/critical via arbitrary score cutoffs that don't correspond to the table's cells).
Why this matters
This is precisely the ambiguity §9.2's v1.14.1 "Closed enums" clarification was written to close — cross-tool tara.json documents from different x-FuSa tools are only comparable if they share one vocabulary and one derivation method. As written, this tool's impact values are not valid per the closed enum at all (an emitted "high" for impact.safety is not one of critical|major|moderate|negligible), and a consumer following the spec's risk combination table to sanity-check risk against impact/attackFeasibility will not be able to, since neither the vocabulary nor the derivation matches.
Suggested fix
Rename the four category_profile_t SFOP fields to values from the closed enum (critical|major|moderate|negligible), and replace derive_risk() with a literal lookup against the spec's table (highest-ranked SFOP axis × attackFeasibility → risk), keeping attackFeasibility on its own high|medium|low|very-low scale as-is (that one's correct).
Spec reference
x-FuSa spec §9.2 (v1.14.1 addition), Closed enums (MUST):
and the Risk combination table (SHOULD), a specific lookup of highest-SFOP-impact ×
attackFeasibility→risk.What actually happens
This repo's own committed
tara.json(dogfooded by PR #72) useshigh/medium/lowfor every SFOP impact axis — nevercritical/major/moderate/negligible:{ "id": "TARA-001", "impact": {"safety": "high", "financial": "low", "operational": "medium", "privacy": "low"}, "risk": "high", "attackFeasibility": "medium" }Traced to
cmd/cfusa/cmd_tara.c's four hardcoded category profiles (e.g.PROFILE_MEMORY = { "memory", "local", "medium", "high", "low", "medium", "low", ... }— the SFOP fields are literally the strings"high"/"low"/"medium"), and toimpact_rank()/feasibility_rank()/derive_risk():derive_riskis an independently-inventedfeasibility_rank × impact_ranknumeric score with its own thresholds — it doesn't implement the spec's stated combination table at all (e.g. per the spec table,criticalimpact +mediumfeasibility →criticalrisk; this code's equivalent path can only ever producelow/medium/high/criticalvia arbitrary score cutoffs that don't correspond to the table's cells).Why this matters
This is precisely the ambiguity §9.2's v1.14.1 "Closed enums" clarification was written to close — cross-tool
tara.jsondocuments from different x-FuSa tools are only comparable if they share one vocabulary and one derivation method. As written, this tool'simpactvalues are not valid per the closed enum at all (an emitted"high"forimpact.safetyis not one ofcritical|major|moderate|negligible), and a consumer following the spec'sriskcombination table to sanity-checkriskagainstimpact/attackFeasibilitywill not be able to, since neither the vocabulary nor the derivation matches.Suggested fix
Rename the four
category_profile_tSFOP fields to values from the closed enum (critical|major|moderate|negligible), and replacederive_risk()with a literal lookup against the spec's table (highest-ranked SFOP axis ×attackFeasibility→risk), keepingattackFeasibilityon its ownhigh|medium|low|very-lowscale as-is (that one's correct).