Skip to content

Potential fix for code scanning alert no. 1186: Incomplete URL substring sanitization#164

Merged
austenstone merged 1 commit intomainfrom
alert-autofix-1186
Mar 7, 2025
Merged

Potential fix for code scanning alert no. 1186: Incomplete URL substring sanitization#164
austenstone merged 1 commit intomainfrom
alert-autofix-1186

Conversation

@austenstone
Copy link
Owner

Potential fix for https://github.com/austenstone/github-value/security/code-scanning/1186

To fix the problem, we need to parse the URL and check the host value explicitly. This ensures that the check handles arbitrary subdomain sequences correctly and prevents bypassing the check by embedding 'smee.io' in unexpected locations.

  • Parse the URL using the URL constructor to extract the host.
  • Check if the host is exactly 'smee.io' or one of its subdomains.
  • Update the condition on line 36 to use this parsed host value.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ing sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@austenstone austenstone marked this pull request as ready for review March 7, 2025 16:02
@github-actions
Copy link

github-actions bot commented Mar 7, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@austenstone austenstone enabled auto-merge March 7, 2025 16:02
@austenstone austenstone self-assigned this Mar 7, 2025
@austenstone austenstone disabled auto-merge March 7, 2025 16:04
@austenstone austenstone merged commit f17fd61 into main Mar 7, 2025
13 checks passed
@austenstone austenstone deleted the alert-autofix-1186 branch March 7, 2025 16:04
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