Skip to content

Potential fix for code scanning alert no. 2: Bad HTML filtering regexp#37

Merged
jmaxdev merged 2 commits intomainfrom
alert-autofix-2
Apr 19, 2026
Merged

Potential fix for code scanning alert no. 2: Bad HTML filtering regexp#37
jmaxdev merged 2 commits intomainfrom
alert-autofix-2

Conversation

@jmaxdev
Copy link
Copy Markdown
Collaborator

@jmaxdev jmaxdev commented Apr 19, 2026

Potential fix for https://github.com/TrixtyAI/ide/security/code-scanning/2

General fix: update the HTML comment end-tag regex to recognize both standard --> and permissive --!> endings.

Best single fix (no functional regression): in apps/desktop/src/addons/builtin.language.markdown/index.ts, inside the comment tokenizer state, replace the --> rule with a regex that matches -- followed by an optional ! and then >, i.e. /--!?>/. This preserves existing behavior for --> while adding support for --!>.

No imports, helper methods, or external libraries are needed.

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

jmaxdev and others added 2 commits April 19, 2026 02:29
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@jmaxdev jmaxdev marked this pull request as ready for review April 19, 2026 05:36
@jmaxdev jmaxdev merged commit 5737469 into main Apr 19, 2026
8 checks passed
@jmaxdev jmaxdev deleted the alert-autofix-2 branch April 19, 2026 05:58
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