Skip to content

Potential fix for code scanning alert no. 1: Bad HTML filtering regexp#7

Merged
squid-protocol merged 1 commit intomainfrom
alert-autofix-1
Apr 25, 2026
Merged

Potential fix for code scanning alert no. 1: Bad HTML filtering regexp#7
squid-protocol merged 1 commit intomainfrom
alert-autofix-1

Conversation

@squid-protocol
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/squid-protocol/gitgalaxy/security/code-scanning/1

General fix: update the HTML comment-end regex so it recognizes both standard --> and the permissive --!> form accepted by HTML parsers.

Best single fix here: in gitgalaxy/standards/language_standards.py, replace the _block_end pattern from re.compile(r"-->") to a regex that matches both forms, e.g. re.compile(r"--!?>"). This keeps existing behavior for --> while adding support for --!> with minimal functional change and no new dependencies/imports.

Scope of change:

  • File: gitgalaxy/standards/language_standards.py
  • Region: HTML rules block around lines 4322–4324
  • No new imports, methods, or definitions required.

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@squid-protocol squid-protocol marked this pull request as ready for review April 25, 2026 14:32
@squid-protocol squid-protocol merged commit 4e5bc1d into main Apr 25, 2026
14 checks passed
@squid-protocol squid-protocol deleted the alert-autofix-1 branch April 25, 2026 14:32
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