-
Notifications
You must be signed in to change notification settings - Fork 312
fix: extend dangerous URL scheme check to include data: protocol
#22766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -478,9 +478,9 @@ func scanObfuscatedLinks(content string) []SecurityFinding { | |
| }) | ||
| } | ||
|
|
||
| // Check for javascript: or vbscript: protocols | ||
| // Check for javascript:, vbscript:, or data: protocols | ||
| lowerURL := strings.ToLower(strings.TrimSpace(linkURL)) | ||
| if strings.HasPrefix(lowerURL, "javascript:") || strings.HasPrefix(lowerURL, "vbscript:") { | ||
| if strings.HasPrefix(lowerURL, "javascript:") || strings.HasPrefix(lowerURL, "vbscript:") || strings.HasPrefix(lowerURL, "data:") { | ||
|
Comment on lines
+481
to
+483
|
||
| findings = append(findings, SecurityFinding{ | ||
| Category: CategoryObfuscatedLinks, | ||
| Description: "markdown link uses dangerous protocol: " + strings.SplitN(lowerURL, ":", 2)[0], | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change removes the
github/gh-aw-actions/setup@v0pin and only keeps@v0.63.1. In strict compilation mode, steps that reference.../setup@v0can no longer be SHA-pinned becauseGetActionPinWithDatarequires an exact version match whenStrictModeis true (the semver-compatible fallback is non-strict only). Consider keeping an explicit.../setup@v0entry (withversion: "v0") alongside thev0.63.1entry, or update all workflows to reference@v0.63.1so strict pinning continues to work.This issue also appears on line 151 of the same file.