Skip to content

fix(scan): resolve favicon href against origin to stop pathful-target misfetch#350

Open
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:fix/favicon-url-resolve
Open

fix(scan): resolve favicon href against origin to stop pathful-target misfetch#350
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:fix/favicon-url-resolve

Conversation

@TBX3D

@TBX3D TBX3D commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

a root-relative href was being appended to the target url's existing path instead of resolved against the origin, so a target like https://example.com/app would fetch /app/favicon.ico instead of /favicon.ico. resolveFaviconURL now delegates to net/url's ResolveReference, matching how a browser actually resolves root-relative, scheme-relative and absolute icon hrefs.

@TBX3D
TBX3D requested a review from vmfunc as a code owner July 9, 2026 22:12
@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@7ea1cd2). Learn more about missing BASE report.

Files with missing lines Patch % Lines
internal/scan/favicon.go 57.14% 1 Missing and 2 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #350   +/-   ##
=======================================
  Coverage        ?   54.76%           
=======================================
  Files           ?       81           
  Lines           ?     6871           
  Branches        ?        0           
=======================================
  Hits            ?     3763           
  Misses          ?     2839           
  Partials        ?      269           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added scan changes to scan engine tests test changes size/m <200 lines changed labels Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

pr summary

2 files changed (+35 -14)

category files
go source 2
tests 1

@TBX3D
TBX3D force-pushed the fix/favicon-url-resolve branch from 32ffe17 to da12973 Compare July 9, 2026 23:53
@github-actions github-actions Bot added size/s <50 lines changed and removed size/m <200 lines changed labels Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scan changes to scan engine size/s <50 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants