8000 ci: enforce core-path panic/unsafe/dead-code audit checks · Issue #218 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

ci: enforce core-path panic/unsafe/dead-code audit checks #218

Closed

Description

@adityamukho

Source

Extracted from the reliability audit snippet: unchecked unwraps/expects/panics in core database paths, dead code, catch-alls, unsafe Rust/FFI audits.

Programmatic test scope

Add CI checks or scripts that fail on unaudited high-risk constructs in core paths.

Checks to consider

  • unwrap, expect, panic!, todo!, unimplemented! in WAL/storage/transaction/query execution modules unless allowlisted with justification.
  • unsafe usage outside explicit FFI or audited boundaries.
  • Dead code warnings where feasible.
  • Catch-all error swallowing patterns in parser/executor/storage paths.

Acceptance criteria

  • Add an allowlist file or inline convention for justified cases.
  • CI fails when new unaudited occurrences appear.
  • Document how to update the allowlist during reviewed changes.

Activity

  1. adityamukho commented on May 2, 2026

    @adityamukho
    CollaboratorAuthor

    Audit finding: Confirmed high-risk unwrap() calls in core paths:

    • src/query/datalog/parser.rs:151,153,172,174 — .parse::<i64>().unwrap() / .parse::<f64>().unwrap() on user input (panics on overflow)
    • src/query/datalog/executor.rs:318 — panic!() on unsubstituted :valid-at bind slot
    • src/graph/storage.rs:445 — panic!() on unsubstituted :as-of bind slot

    The first is reachable from any user-provided Datalog input. The latter two are reachable if PreparedQuery internals are misused (lower risk but still library panics in non-test code).

    An allowlist-based CI check as described in this issue would catch regressions once fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrustPull requests that update rust codestabilityStability/panic issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0