Skip to content
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

fix: add markdown sanitization for malicious notebooks #1315

Merged
merged 3 commits into from
May 5, 2024

Conversation

dmadisetti
Copy link
Contributor

Was looking over the merge this morning and realized it would be possible to "inject" code blocks.

I don't think this could be used that maliciously since running a notebook is already pretty risky. Maybe injecting a <script> tag that would only appear during conversion.

Either way, it's a bug. If you can think of more unsafe behavior let me know. Might be a cool chance to use one of those LLM fuzzers.

Copy link

vercel bot commented May 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2024 5:56pm
marimo-storybook ❌ Failed (Inspect) May 4, 2024 5:56pm

````

Nested fence
````text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didnt even know 4 ticks was a way to nest 3 ticks

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great test cases

@mscolnick mscolnick merged commit 360de00 into marimo-team:main May 5, 2024
24 of 26 checks passed
Copy link

github-actions bot commented May 5, 2024

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.4.12-dev2

mscolnick pushed a commit that referenced this pull request May 5, 2024
* fix: add markdown sanitization for malicious notebooks

* *sufficient

* fix: check for code block by regex
@dmadisetti dmadisetti deleted the dm/markdown-sanitized branch May 5, 2024 22:08
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.

None yet

2 participants