Skip to content

Harden text parsers against malformed fuzz inputs - #1416

Merged
SkBlaz merged 2 commits into
masterfrom
copilot/bug-bounty
Jul 12, 2026
Merged

Harden text parsers against malformed fuzz inputs#1416
SkBlaz merged 2 commits into
masterfrom
copilot/bug-bounty

Conversation

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Several whitespace-delimited loaders were still crashing on malformed freeform input instead of failing soft. In practice, blank lines, comment lines, and underspecified rows could trigger raw indexing/unpacking errors across multiple parser entry points.

  • Parser hardening

    • Skip blank and comment lines consistently in text-based parsers.
    • Treat underspecified rows as non-records instead of raising IndexError/ValueError.
    • Add default-weight handling where short-but-valid rows are accepted.
  • Formats covered

    • multiedgelist
    • simple edgelist
    • edgelist_with_edge_types
    • spin_edgelist
    • multiplex_edges
    • multiplex folder readers for edge/activity/layer files
  • Behavioral correction

    • parse_edgelist_multi_types() now accepts 3-column rows (node1 node2 weight) without assuming a fourth edge_type field.
  • Regression coverage

    • Added focused tests for malformed-but-common fuzz inputs:
      • leading blank lines
      • comment-prefixed lines
      • short rows with omitted optional fields

Example of the now-supported soft-fail/default behavior:

# accepted: optional weight only
p q 3.0

# skipped safely
# comment
     

Copilot AI linked an issue Jul 12, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Scan and evaluate to find unexpected behavior and patch Harden text parsers against malformed fuzz inputs Jul 12, 2026
Copilot AI requested a review from SkBlaz July 12, 2026 17:54
@SkBlaz
SkBlaz marked this pull request as ready for review July 12, 2026 18:19
@SkBlaz
SkBlaz merged commit b141885 into master Jul 12, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug bounty

2 participants