Proof Portal
jsonparser
ProbeLabs36 findings · 123 requirementsWhen any key path component is the empty string, the parser shall treat the path as unresolvable and return KeyPathNotFoundError (Get family / Delete) or a defined error (Set), and shall never panic.
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
When any key path component is the empty string, the parser shall treat the path as unresolvable and return KeyPathNotFoundError (Get family / Delete) or a defined error (Set), and shall never panic. An empty-string component is neither a valid object key nor the [ array-index marker.
the parser shall always satisfy !path_component_is_empty_string | (returns_not_found_for_empty_key_component & completes_without_panic_on_empty_key_component)
Rationale & tags
Why this requirement exists, and how it is categorised.
Rationale & tags
Why this requirement exists, and how it is categorised.
Empty-string key components previously reached unguarded keys[i][0] / p[level][0] dereferences and panicked (OSS-Fuzz 4649128545288192 / hazard-sweep class, DEFECT-260726-QS2V, KI-1). The contract that an empty-string component is an invalid path returning KeyPathNotFoundError must be explicit so no future code reintroduces a panic site.
Verification & provenance
How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).
Review
- Status
- approved
- Reviewer
- human:leonidbugaev · lead_engineer
- Reviewed
- Jul 26, 2026, 17:48 UTC
History
- Created
- Jul 26, 2026, 17:13 UTC · human:cli
- Modified
- Jul 26, 2026, 18:11 UTC · human:cli
Obligations
What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.
3 obligations · 2 discharged · 1 delegated
Browse the catalogueAn empty-string key component reaches an unguarded keys[i][0] / p[level][0] dereference and panics with runtime error: index out of range [0] with length 0 (the OSS-Fuzz 4649128545288192 / hazard-sweep class, DEFECT-260726-QS2V, KI-1), crashing the goroutine on caller-controlled input.
- nominalrequiredpresentCovered by 1 test
Behavior specified when inputs are nil, null, or zero-value.
An empty-string key component flowing into searchKeys/EachKey/createInsertComponent on nil-or-zero-length internal slices triggers an unguarded index dereference, crashing the goroutine (the OSS-Fuzz 4649128545288192 panic class).
SYS-REQ-111 is a leaf contract partition; the nil_safety implementation lives in parser.go:Get / searchKeys which SYS-REQ-016 carries implemented_by traces for. Delegating preserves SYS-REQ-111's obligation ownership without weakening.
- negativerequiredpresentCovered by 1 test
- nominalrequiredpresentCovered by 1 test
An empty-string key component is structurally a no-effective-path case; if the early guard regresses the keys[i][0] dereference panics with index-out-of-range on the empty component slice.
- nominalrequiredpresentCovered by 1 test
Formula evidence
The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).
Formula evidence
The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).
FRETish formula
the parser shall always satisfy !path_component_is_empty_string | (returns_not_found_for_empty_key_component & completes_without_panic_on_empty_key_component)
Variables
| Name | Type | Direction | Description |
|---|---|---|---|
| path_component_is_empty_string | — | True when any caller-supplied key path component is the empty string (the empty partition of path_component_length, length == 0). An empty-string component is neither a valid object key nor the [ array-index marker. | |
| returns_not_found_for_empty_key_component | — | True when the parser treats an empty-string key path component as an unresolvable path, returning KeyPathNotFoundError for the Get family and Delete (and EachKey omitting the callback) or a defined error/document for Set. | |
| completes_without_panic_on_empty_key_component | — | True when the parser completes the call without panicking for an empty-string key path component, never reaching an unguarded keys[i][0] / p[level][0] dereference (the OSS-Fuzz 4649128545288192 / hazard-sweep class). |
Witnesses· 5 scenarios total
- TestMCDC_SYS_REQ_111_Row1_NonEmptyKeyNoActionsys_req_110_111_witness_test.go:118exercises 1 condition scenario
- TestMCDC_SYS_REQ_111_Row2_InvariantViolationsys_req_110_111_witness_test.go:148exercises 1 condition scenario
- TestMCDC_SYS_REQ_111_Row3_InvariantViolationsys_req_110_111_witness_test.go:171exercises 1 condition scenario
- TestMCDC_SYS_REQ_111_Row4_InvariantViolationsys_req_110_111_witness_test.go:188exercises 1 condition scenario
- TestMCDC_SYS_REQ_111_Row5_EmptyKeyReturnsNotFoundNoPanicsys_req_110_111_witness_test.go:212exercises 1 condition scenario
- TestObligation_SYS_REQ_111_NilSafety_Negativesys_req_110_111_witness_test.go:320
- TestObligation_SYS_REQ_111_NoPathProvided_Nominalsys_req_110_111_witness_test.go:363
Its place
This requirement shown inside its trace neighbourhood — the parents it satisfies, the code and tests attached to it, and its findings.
Loading graph…
Trace evidence
The concrete artifacts linked to this requirement — implementing code, verifying tests, documents, and the findings raised against it.
Impact
Blast radius — if you change this requirement, what else may need re-checking, and what it in turn depends on.
Impact
Blast radius — if you change this requirement, what else may need re-checking, and what it in turn depends on.
If you change this
Files to re-check (1)
- parser.goparser.go
Tests to re-run (4)
- empty_key_path_test.goempty_key_path_test.go
- fuzz_native_test.gofuzz_native_test.go
- parser_test.goparser_test.go
- sys_req_110_111_witness_test.gosys_req_110_111_witness_test.go
What this rests on
Parent requirements (1)
Discussions
Discuss this with the proof team. Nothing changes in your audit automatically — you open a request and a staff member records any outcome inside the thread.