Proof Portal

Projects

jsonparser

ProbeLabs23 findings · 123 requirements

The fastest JSON parser for Go — formally verified with ReqProof (real library, master).

All requirements
RequirementSYS-REQ-111SystemApproved

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.

This requirement changed after its last recorded review, so approval is stale. Automated checks pass and 4/4 obligations are satisfied.
PriorityshallTypeguaranteeCategoryfunctionalComponentparserAssuranceBFindingsnone open

Specification

The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.

Description

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.

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)
View full formal model

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.

pathempty_keymissing_pathnil_safety

Verification & provenance

How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).

Assurance levelB
Formalizationvalid
Realizabilityrealizable
Vacuitychecked_ok
Strategyfretish

Review

Status
approved
Reviewer
Leonidbugaev · lead_engineer
Reviewed
Jul 26, 2026, 17:48 UTC
Added hazard gradings for no_path_provided + nil_safety obligation classes.

History

Created
Jul 26, 2026, 17:13 UTC · Created via CLI
Modified
Jul 26, 2026, 18:11 UTC · Created via CLI

Change history

Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.

Every recorded revision of this object's source — newest first, each with the commit message and its file-level diff.

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 catalogue
Discharged
If it were violatedHigh

An 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.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 1 test
Delegated

Behavior specified when inputs are nil, null, or zero-value.

If it were violatedHigh

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).

Carried bySYS-REQ-016

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.

Byhuman:bugerAt2026-07-26T18:11:33Z
Discharging evidence2/2 required witnessed
  • negativerequiredpresent
    Covered by 1 test
  • nominalrequiredpresent
    Covered by 1 test
Discharged
If it were violatedHigh

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.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered 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).

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

NameTypeDirectionDescription
path_component_is_empty_stringTrue 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_componentTrue 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_componentTrue 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_NonEmptyKeyNoAction
    exercises 1 condition scenario
  • TestMCDC_SYS_REQ_111_Row2_InvariantViolation
    exercises 1 condition scenario
  • TestMCDC_SYS_REQ_111_Row3_InvariantViolation
    exercises 1 condition scenario
  • TestMCDC_SYS_REQ_111_Row4_InvariantViolation
    exercises 1 condition scenario
  • TestMCDC_SYS_REQ_111_Row5_EmptyKeyReturnsNotFoundNoPanic
    exercises 1 condition scenario

MC/DC truth table· 5 rows

Each row assigns the formula's conditions (T/F) and shows the Result— the formula's value for that input row, not a test pass/fail. A row proves a condition when flipping only that condition flips the outcome. The test that covers each row is linked.

Covereda test exercises this rowExempteda reviewed mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test
#completes_without_panic_on_empty_key_componentpath_component_is_empty_stringreturns_not_found_for_empty_key_componentResultProvesCovering test
1FFFTpath_component_is_empty_string
2FTFFpath_component_is_empty_string
3FTTFcompletes_without_panic_on_empty_key_component
4TTFFreturns_not_found_for_empty_key_component
5TTTTcompletes_without_panic_on_empty_key_component

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.

If you change this

Requirements
0
Files
1
Tests
4
At-risk contracts
0

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

Changes

Semantic changes that move or scope this requirement — the intended work touching it. Each links to the full change.

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.

Sign in to discuss this with the proof team.Sign in