Skip to content

Fix redirect 404 false positive - #10

Merged
gewarren merged 5 commits into
dotnet:mainfrom
gewarren:fix-404-bug
Sep 21, 2026
Merged

gewarren merged 5 commits into
dotnet:mainfrom
gewarren:fix-404-bug

Conversation

@gewarren

Copy link
Copy Markdown
Collaborator

Fixes #9

@gewarren
gewarren requested a lite review from Copilot and removed request for BillWagner September 19, 2026 03:51

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Moderate correctness issues remain in target eligibility and path containment.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Fixes false-positive 404s when redirect targets exist in the repository.

Changes:

  • Adds repository target detection for /dotnet/ redirects.
  • Suppresses 404s for detected targets.
  • Adds unit coverage for the suppression path.
File Summary
docs-verifier/​src/​RedirectionVerifier/​RedirectTargetVerifier.cs Adds local target resolution and 404 suppression; moderate issues remain around limiting exemptions to newly added files and preventing path escapes.
docs-verifier/​tests/​GitHub.UnitTests/​RedirectTargetVerifierTests.cs Adds suppression coverage; nit remains for testing the default repository lookup predicate.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs-verifier/src/RedirectionVerifier/RedirectTargetVerifier.cs Outdated
Comment thread docs-verifier/src/RedirectionVerifier/RedirectTargetVerifier.cs Outdated
Comment thread docs-verifier/tests/GitHub.UnitTests/RedirectTargetVerifierTests.cs Outdated
gewarren and others added 3 commits September 18, 2026 20:55
Refactor redirect path handling to include validation for relative paths and ensure safety against directory traversal attacks.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Absolute candidate paths do not match the repository-relative tracked paths, so the 404 exemption is not applied.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (3)

Comment thread docs-verifier/src/RedirectionVerifier/RedirectTargetVerifier.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@meaghanlewis meaghanlewis left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These changes LGTM

@gewarren
gewarren merged commit 2b8a86a into dotnet:main Sep 21, 2026
1 check passed
@gewarren
gewarren deleted the fix-404-bug branch September 21, 2026 16:41
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.

[DocsVerifier] Ignore redirect 404s if new file introduced in this PR

3 participants