Skip to content

fix(analyzers): apply review findings across E128014, E128220, E128223, E128224, E128227 - #165

Merged
e128 merged 1 commit into
mainfrom
fix/review-2026-11-14-general
Nov 14, 2026
Merged

e128 merged 1 commit into
mainfrom
fix/review-2026-11-14-general

Conversation

@e128

@e128 e128 commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Executive Summary

The 2026-11-14 union review returned 8 confirmed High findings across 5 rules. This PR fixes all of them and updates the tests, the package README, and the release files to match.

  • E128014: the nested-quantifier code fix no longer drops the outer * for (a+)*; it rewrites to (?:a+)* and keeps the pattern language. The atom comparison expands character classes, so (?:/[^\s:"']+)+ now fires while (?:/[^/]+)+ stays silent.
  • E128220: a when-guarded discard or var arm no longer closes a union switch. The rule reports it, and the code fix stays absent because null when cond => is not exhaustive.
  • E128223: a statement-form flag set on a start-info local now binds when the local later reaches a process, through FlagBinds routing the receiver into LocalLinksToProcess.
  • E128224: a compression wrapper counts as a read-only consumer only when constructed with CompressionMode.Decompress.
  • E128227: bound detection is symbol-resolved. Only the LoadIntoBufferAsync(long) overload caps the read. A ContentLength check must be null-safe, precede, and dominate the read, so a chunked response fails closed. The README remediation replaced the failing-open ContentLength > N guard. The gate also fixed HttpContentHeadersTypeName to resolve System.Net.Http.Headers.HttpContentHeaders.
  • lode release-tracking gained the 3.1.0 row with E128227.

Code Changes

5 analyzers, 2 code fixers, 7 test classes, src/E128.Analyzers/README.md, AnalyzerReleases.Unshipped.md (E128220 Changed Rules row), and 5 lode rule-detail files. 21 files, +1276/−72.

Tests and Tooling

scripts/check.sh --all green: shell, format, build, 2992 tests (2987 passed, 2 skipped). scripts/internal/analyzer-release-check.sh clean, scripts/readme-table-diff.sh --analyzer no drift. The 6 Medium findings from the review stay unapplied as advisory.

Review Guide

Rule behavior changes sit in HandRolledProcessCaptureAnalyzer.cs (FlagBinds), ReadOnlyMemoryStreamAnalyzer.cs (IsDecompressMode), HttpBodyReadWithoutSizeBoundAnalyzer.cs (IsNullSafeBound, Dominates), UnionSwitchDiscardArmAnalyzer.cs (TryFindCatchAll), and GeneratedRegexHelpers.cs (ClassAtomOverlaps). The E128227 polarity logic is the largest rewrite; its tests pin both the fires and silent shapes.

Rollback

Single commit, revert it to restore the prior detection shapes.

Links

Review plan: plans/review-2026-11-14-general/

🤖 Generated with Claude Code

@e128
e128 merged commit f151f0b into main Nov 14, 2026
2 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.

1 participant