Skip to content

sector-electronics: unbounded repairabilityScore gates the compliance verdict #31

Description

@LKSNDRTMLKV

Static read-through audit of plugins/sector-electronics — otherwise the most defensively validated of the sector plugins. One verified finding.

1. Decision-critical field has no bounds check

Location: src/lib.rs:55-66, 71, 77-78
Issue: repairabilityScore is read cold via num() and used to gate compliance (pass threshold >= 6.0), but validate_input never range-checks it (unlike gtin, productCategory, energyEfficiencyClass, co2ePerUnitKg, recycledContentPct, all of which are validated). The field is documented as a 0-10 scale.
Failure scenario: A submission with energyEfficiencyClass: "A" and repairabilityScore: 999999 (or any garbage value ≥ 6) passes repair_pass and yields Compliant — a fail-open result on a field with zero format/bounds checking, and the nonsensical value is recorded verbatim as the published metric. (Compare sector-furniture, where the same field is metric-only and never gates a verdict — there the missing bound doesn't matter; here it does.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomplianceRegulatory/compliance correctness issue

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions