Skip to content

robustness: audit .unwrap() calls in non-test code #275

@Darkroom4364

Description

@Darkroom4364

143 `.unwrap()` calls in `src/` (non-test). A panic during a scan is a bad look for a security tool.

Approach

  • Triage by blast radius: scan-path code (parsing, rule matching, reporting) is highest priority
  • Replace with `.ok()`, `.unwrap_or_default()`, or propagate with `?` as appropriate
  • Leave `.unwrap()` where the invariant is truly guaranteed and add a comment explaining why
  • Not a blanket replace — each site needs judgment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions