Static read-through audit of plugins/sector-steel. Same pattern as sector-aluminium (both plugins share this gap independently). One verified finding.
1. Fail-open on the plugin's core compliance gate
Location: src/lib.rs:68-73
Issue: validate_input (line 58) uses require_str("productionRoute") instead of an enum/allow-list check, so any string ("Electric-Arc", "electric_arc", "unknown") passes. The wildcard threshold (2.5 tCO2e/tonne) is higher than all three real thresholds (2.1/1.0/0.4) — the most lenient, not the "conservative default" the inline comment claims.
Failure scenario: A blast-furnace facility emitting 2.3 tCO2e/tonne (non-compliant under the real 2.1 threshold) submitted with a wrong-case or unrecognized route string is scored Compliant against the 2.5 wildcard threshold — a fail-open compliance-determination bug in a CBAM/ESPR calculator.
Static read-through audit of
plugins/sector-steel. Same pattern as sector-aluminium (both plugins share this gap independently). One verified finding.1. Fail-open on the plugin's core compliance gate
Location:
src/lib.rs:68-73Issue:
validate_input(line 58) usesrequire_str("productionRoute")instead of an enum/allow-list check, so any string ("Electric-Arc", "electric_arc", "unknown") passes. The wildcard threshold (2.5 tCO2e/tonne) is higher than all three real thresholds (2.1/1.0/0.4) — the most lenient, not the "conservative default" the inline comment claims.Failure scenario: A blast-furnace facility emitting 2.3 tCO2e/tonne (non-compliant under the real 2.1 threshold) submitted with a wrong-case or unrecognized route string is scored
Compliantagainst the 2.5 wildcard threshold — a fail-open compliance-determination bug in a CBAM/ESPR calculator.