Feature/support markdown - #1688
Draft
dabbinavo wants to merge 8 commits into
Draft
Conversation
dabbinavo
force-pushed
the
feature/support-markdown
branch
from
June 3, 2026 11:07
1d5182a to
17b089d
Compare
lreading
reviewed
Jun 14, 2026
Collaborator
|
I know this is still a WIP - but I wanted to bring up a potential security concern with using Vue's <img src=x onerror=alert(1)>
[click me](javascript:alert(1))
<svg onload=alert(1)>
<a href="javascript:alert(1)">x</a>OWASP's XSS CheatSheet recommends using DOMPurify for HTML sanitzation. Instead of sanitizing at every element where we render markdown, we could use a shared helper instead: import { marked } from 'marked';
import DOMPurify from 'dompurify';
export function renderMarkdown(input = '') {
const html = marked.parse(input, {
gfm: true,
breaks: true
});
// allow all safe HTML elements but neither SVG nor MathML
// https://github.com/cure53/DOMPurify#control-our-allow-lists-and-block-lists
return DOMPurify.sanitize(html, { USE_PROFILES: { html: true } })
}Then every place Markdown is rendered, we can call the shared function for consistent rendering and sanitization: <div v-html="renderMarkdown(threat.description)"></div>Again, if there's anything I can help with, please let me know! Really appreciate all the work you're putting into this! |
Collaborator
Author
|
Thanks for this awesome thoughts and input. This is really a big thing regarding security and also simplifies the code/logic 👍 |
dabbinavo
force-pushed
the
feature/support-markdown
branch
from
June 17, 2026 10:58
a24d704 to
9274da4
Compare
dabbinavo
force-pushed
the
feature/support-markdown
branch
from
July 7, 2026 10:54
34eee6e to
9b24ae3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Closes #1326
Description for the changelog:
Add markdown support.
Declaration:
Thanks for submitting a pull request, please make sure:
GitHub Copilot Inline SuggestionsOther info:
Work in Progress. Already added markdown support to