Skip to content

Potential fix for code scanning alert no. 8: Incomplete HTML attribute sanitization - #3

Merged
Rootless-Ghost merged 1 commit into
masterfrom
alert-autofix-8
Apr 13, 2026
Merged

Potential fix for code scanning alert no. 8: Incomplete HTML attribute sanitization#3
Rootless-Ghost merged 1 commit into
masterfrom
alert-autofix-8

Conversation

@Rootless-Ghost

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/Rootless-Ghost/AtomicLoop/security/code-scanning/8

The safest fix without changing behavior is to make escaping context-appropriate for attribute usage by escaping both quote types in esc, since esc(r.id) is used in attribute constructions (including inline onclick and href).
In templates/library.html, update the esc function (lines 186–188 region) to additionally escape " and ' (for example to " and '). This preserves current rendering logic and keeps all existing call sites working while removing the quote-breakout vector.

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

…e sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Rootless-Ghost Rootless-Ghost self-assigned this Apr 13, 2026
@Rootless-Ghost
Rootless-Ghost marked this pull request as ready for review April 13, 2026 14:45
@Rootless-Ghost
Rootless-Ghost merged commit f20e914 into master Apr 13, 2026
5 of 6 checks passed
@Rootless-Ghost
Rootless-Ghost deleted the alert-autofix-8 branch April 13, 2026 14:45
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