Conversation
Addresses 3 open code-scanning alerts: - CodeQL go/incomplete-url-scheme-check (high): crawler's denylist only covered mailto:/javascript: — data:, vbscript:, tel:, file:, blob: could slip through. Replaced with an http(s)-only allow-list on the parsed URL scheme (case-insensitive). Added table-driven tests. - SonarCloud go:S2612 (x2): hookinstaller wrote config with 0o644 and hook scripts with 0o755 — both world-readable. Tightened to 0o600 / 0o700 since these files live in the user's own ~/.claude dir and only the owner needs access. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- FuzzResolveURL — found and fixed a second edge case in resolveURL: non-http(s) base URLs could escape the scheme allow-list via ResolveReference. Added belt-and-braces scheme check on the resolved URL. 1.76M executions clean at 30s/target. - FuzzChunker — exercises text splitter on UTF-8 edges, zero bytes, CRLF, large inputs, and random (size, overlap) pairs. - .github/workflows/fuzz.yml — runs each target for 30s on every PR + main push. Scorecard's Fuzzing check detects Go native fuzz targets. Not a replacement for continuous fuzzing; see OSS-Fuzz tier-2 for that. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds native Go fuzzing at the `FuzzXxx` level — Tier 1 of the OSS-Fuzz roadmap. Scorecard's Fuzzing check detects these targets.
Depends on #19 for the initial `resolveURL` scheme allow-list. Once #19 merges this PR collapses to just the fuzz additions + belt-and-braces delta.
Follow-up (tier 2)
Register with google/oss-fuzz for continuous fuzzing — separate PR, ~1 week review turnaround.
Test plan