Skip to content

Fuzz ignore list generator harness - #7576

Open
Mzack9999 wants to merge 1 commit into
devfrom
4843-fuzz-ignore-gen
Open

Fuzz ignore list generator harness#7576
Mzack9999 wants to merge 1 commit into
devfrom
4843-fuzz-ignore-gen

Conversation

@Mzack9999

@Mzack9999 Mzack9999 commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Summary by CodeRabbit

  • New Features

    • Improved fuzzing input handling by automatically excluding common headers and cookies from generated cases.
    • Added support for regenerating ignore lists from predefined header and cookie names, with optional additional fingerprint-derived entries.
  • Bug Fixes

    • Header filtering now works consistently regardless of header-name capitalization.
    • Cookie filtering now excludes matching names and prefixes during iteration.
  • Tests

    • Added coverage confirming ignored headers and cookies are skipped correctly.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR adds a generator for embedded fuzzing ignore lists, seed data for headers and cookies, Makefile and go:generate wiring, and filtering logic that skips ignored header and cookie keys during iteration.

Changes

Fuzz Ignore Lists

Layer / File(s) Summary
Ignore-list generator
pkg/fuzz/component/cmd/genignorelists/*
Parses embedded header and cookie seeds, optionally merges Wappalyzer fingerprints, sorts entries, and writes generated Go ignore lists.
Generation wiring
pkg/fuzz/component/generate.go, Makefile
Adds the component generation directive and the fuzz-ignorelists Make target, including optional Wappalyzer input.
Header and cookie filtering
pkg/fuzz/component/headers.go, pkg/fuzz/component/cookie.go, pkg/fuzz/component/*_test.go
Canonicalizes header keys and skips ignored cookie names or prefixes during iteration, with tests covering both components.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Makefile
  participant genignorelists
  participant Wappalyzer
  participant FuzzComponents
  Makefile->>genignorelists: regenerate ignorelists.gen.go
  genignorelists->>Wappalyzer: load fingerprints when enabled
  Wappalyzer-->>genignorelists: provide header and cookie names
  genignorelists-->>FuzzComponents: write default ignore sets
  FuzzComponents->>FuzzComponents: skip ignored headers and cookies during iteration
Loading

Poem

A rabbit taps make with glee,
Seeds bloom into lists on a tree.
Headers hop past, cookies flee,
Wappalyzer adds names for free.
Fuzzing finds a cleaner trail—
Carrot-powered, build-wide rail!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding a harness to generate fuzz ignore lists.
Linked Issues check ✅ Passed The PR automates header/cookie ignore list generation, embeds the defaults, and adds Wappalyzer-driven merging and skip logic.
Out of Scope Changes check ✅ Passed No unrelated changes are evident; the edits stay focused on fuzz ignore-list generation and its use in header/cookie components.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 4843-fuzz-ignore-gen

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/fuzz/component/cmd/genignorelists/seed_cookies.txt`:
- Around line 9-31: Update the cookie seed entries in seed_cookies.txt to retain
the exact _ga and intercom-session entries while adding the prefix patterns
_ga_* and intercom-session-* for suffixed vendor cookies. Add or update coverage
to verify both exact and suffixed forms are generated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b98c12eb-6d8f-4ae6-b04e-e60a2a0394c3

📥 Commits

Reviewing files that changed from the base of the PR and between bcf2089 and 60cbf02.

⛔ Files ignored due to path filters (1)
  • pkg/fuzz/component/ignorelists.gen.go is excluded by !**/*.gen.go
📒 Files selected for processing (9)
  • Makefile
  • pkg/fuzz/component/cmd/genignorelists/main.go
  • pkg/fuzz/component/cmd/genignorelists/seed_cookies.txt
  • pkg/fuzz/component/cmd/genignorelists/seed_headers.txt
  • pkg/fuzz/component/cookie.go
  • pkg/fuzz/component/cookie_test.go
  • pkg/fuzz/component/generate.go
  • pkg/fuzz/component/headers.go
  • pkg/fuzz/component/headers_test.go

Comment on lines +9 to +31
_ga
_gat
_gid
_gcl_au
_fbp
fr
__hstc
hubspotutk
__hssc
__hssrc
mp_mixpanel__c
JSESSIONID
NREUM
_pk_id
_pk_ref
_pk_ses
_pk_cvar
_pk_hsr
_hjIncludedInSample
__cfduid
cf_use_ob
cf_ob_info
intercom-session

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add prefix seed entries for suffixed vendor cookies.

Without a trailing *, these are exact matches, so default generation misses _ga_<container-id> and intercom-session-<app-id>. Keep the exact entries and add _ga_* and intercom-session-*; add coverage for both forms. Google and Intercom document these suffixed cookie names. (developers.google.com)

Proposed seed update
 _ga
+_ga_*
 ...
 intercom-session
+intercom-session-*
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
_ga
_gat
_gid
_gcl_au
_fbp
fr
__hstc
hubspotutk
__hssc
__hssrc
mp_mixpanel__c
JSESSIONID
NREUM
_pk_id
_pk_ref
_pk_ses
_pk_cvar
_pk_hsr
_hjIncludedInSample
__cfduid
cf_use_ob
cf_ob_info
intercom-session
_ga
_ga_*
_gat
_gid
_gcl_au
_fbp
fr
__hstc
hubspotutk
__hssc
__hssrc
mp_mixpanel__c
JSESSIONID
NREUM
_pk_id
_pk_ref
_pk_ses
_pk_cvar
_pk_hsr
_hjIncludedInSample
__cfduid
cf_use_ob
cf_ob_info
intercom-session
intercom-session-*
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/fuzz/component/cmd/genignorelists/seed_cookies.txt` around lines 9 - 31,
Update the cookie seed entries in seed_cookies.txt to retain the exact _ga and
intercom-session entries while adding the prefix patterns _ga_* and
intercom-session-* for suffixed vendor cookies. Add or update coverage to verify
both exact and suffixed forms are generated.

@dwisiswant0 dwisiswant0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do the seed_*.txt files come from? We should document the actual source of truth so updating them later doesn’t become a guessing game.

Nit: [once we know that,] it might be cleaner to keep them outside the bin (so, remote) instead of embedding them - and then download on the fly and drop them into the cache dir instead. Easier to refresh without a rebuild.

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.

Setup Automation to update default ignore list of headers,cookies for fuzzing

2 participants