Proof Portal

Projects

jsonparser

ProbeLabs23 findings · 123 requirements

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

All requirements
RequirementSTK-REQ-006StakeholderReview

Library users shall retrieve addressed JSON values as zero-allocation raw strings without JSON unescaping when they intentionally choose the unsafe helper.

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

Specification

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

Description

Library users shall retrieve addressed JSON values as zero-allocation raw strings without JSON unescaping when they intentionally choose the unsafe helper.

Rationale & tags

Why this requirement exists, and how it is categorised.

GetUnsafeString is a distinct public contract from GetString because it trades escaping semantics for speed and zero-allocation string mapping.

parseraccepts_user_data

Verification & provenance

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

Assurance levelE
Formalizationnone
Vacuitychecked_ok
Strategyinformal

Review

Status
approved
Reviewer
Leonidbugaev
Reviewed
Apr 23, 2026, 00:00 UTC

History

Created
Apr 13, 2026, 17:21 UTC · Created via CLI
Modified
Jul 26, 2026, 12:54 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.

7 obligations · 6 discharged · 1 not yet witnessed

Browse the catalogue

Evidence tagged via <REQ> is witnessed by a requirement that satisfies this one — normal for stakeholder / aggregate requirements, which are proven through the requirements that refine them.

Discharged

Output identical regardless of collection ordering or runtime conditions.

If it were violatedMedium

Two GetUnsafeString calls on identical input must return byte-identical Go strings via bytesToString; a regression in slice aliasing produces non-deterministic content if the input buffer is concurrently mutated.

Discharging evidence0/0 required witnessed
  • nominalrecommendedpresent
    Covered by 1 test
    via SYS-REQ-011
Discharged

Behavior for unusual but valid input combinations.

If it were violatedMedium

GetUnsafeString on a payload with value empty-string must return the empty Go string; a regression in the String-strip path returns the surrounding quotes as part of the value.

Discharging evidence0/0 required witnessed
  • nominalrecommendedpresent
    Covered by 1 test
    via SYS-REQ-082
Discharged

Behavior when inputs are absent, nil, zero-length, or blank.

If it were violatedHigh

GetUnsafeString on a zero-length []byte flows through Get to internalGet to nextToken=-1; the follow-on data[offset] dereference in getType panics on the empty slice.

Discharging evidence0/0 required witnessed
  • nominalrecommendedpresent
    Covered by 1 test
    via SYS-REQ-081
Discharged

Behavior when inputs are syntactically or structurally invalid.

If it were violatedHigh

GetUnsafeString on adversarial JSON like {"k":} drives Get to searchKeys returning a stale offset; the follow-on data[offset] dereference panics (the OSS-Fuzz bug class on the unsafe path).

Discharging evidence1/1 required witnessed
  • negativerequiredpresent
    Covered by 2 tests
    via SYS-REQ-080
  • nominalrecommendedpresent
    Covered by 1 test
    via SYS-REQ-080
Discharged

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

If it were violatedHigh

GetUnsafeString(nil,...) flows through Get to searchKeys nil-slice loop; getType(nil,0) data[offset] dereference panics with nil-slice index-out-of-range.

Discharging evidence1/1 required witnessed
  • negativerequiredpresent
    Covered by 2 tests
    via SYS-REQ-081
  • nominalrecommendedpresent
    Covered by 1 test
    via SYS-REQ-081
Not yet witnessed

Happy-path behavior with valid inputs.

Discharging evidence0/0 required witnessed
    Discharged
    If it were violatedHigh

    Payload like {"k":"abc with no closing quote drives stringEnd to -1; if the guard regresses getType data[offset] dereference panics past the buffer end on the unsafe string path.

    Discharging evidence0/0 required witnessed
    • nominalrecommendedpresent
      Covered by 1 test
      via SYS-REQ-082

    Acceptance criteria

    Stakeholder conditions for satisfaction, traced to the derived requirements and evidence that discharge them.

    Stakeholder-authored conditions defining when the requirement is satisfied, traced to derived requirements / evidence.

    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.

    No implementation linked

    No source files are traced to this requirement yet.

    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
    7
    Files
    2
    Tests
    7
    At-risk contracts
    0

    Files to re-check (2)

    • fuzz.gofuzz.go
    • parser.goparser.go

    Tests to re-run (7)

    • obligation_evidence_test.goobligation_evidence_test.go
    • parser_test.goparser_test.go
    • fuzz_native_test.gofuzz_native_test.go
    • mcdc_spec_witnesses_test.gomcdc_spec_witnesses_test.go
    • mcdc_supplement_test.gomcdc_supplement_test.go
    • deep_spec_test.godeep_spec_test.go
    • obligation_property_test.goobligation_property_test.go

    What this rests on

    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