I will dive into this thread around the Televex project as a start: https://git.vvvvvvaria.org/varia/televex/issues/1
And next to that check Crunk's work on distribusi-verse to see how sanitizing has been done in Flask: https://git.vvvvvvaria.org/crunk/distribusi-verse
Ik zat te kijken naar tinycss of bleach
Ja, maar volgens mij kan je bleach dus ook voor css gebruiken
Je wil vooral niet de browser van iemand anders, css als het of Javascript laten werken
On top of sanitizing the Markdown and CSS, would it be needed to add something like Talisman to configure Content Security Policy settings and things like that?
Small research: XSS attacks is something to be careful with https://en.wikipedia.org/wiki/Cross-site_scripting.
About sanitizing Markdown in combination with Mozilla's HTML Bleach python library: https://github.com/Python-Markdown/markdown/issues/392
Bleach, by Mozilla: https://github.com/mozilla/bleach
What is a good CSS sanitizer? Crunk:
> Ik zat te kijken naar tinycss of bleach
> Ja, maar volgens mij kan je bleach dus ook voor css gebruiken
> Je wil vooral niet de browser van iemand anders, css als het of Javascript laten werken
On top of sanitizing the Markdown and CSS, would it be needed to add something like [Talisman](https://github.com/GoogleCloudPlatform/flask-talisman#content-security-policy) to configure Content Security Policy settings and things like that?
This is mostly when working with flask-wtf and wtforms.
Both the https://git.vvvvvvaria.org/crunk/distribusi-verse and https://git.vvvvvvaria.org/varia/varia-library-website also have CSRF protection.
More on that here: https://owasp.org/www-community/attacks/csrf
This is mostly when working with flask-wtf and wtforms.
I wouldn't worry about someone writing to the pads, since this anyway can always happen if someone knows the pad name
What I am more worried about if a tool can be used to read and write to the server and for example execute arbitrary files
If you for example make a system user with who can not launch a shell who executes this software, things are already much safer
One of the things you can and should do with flask is use their inbuilt methods to serialize and deserialize things like html so that nothing funny can happen there
Logging the following from the infra chat:
> I wouldn't worry about someone writing to the pads, since this anyway can always happen if someone knows the pad name
> What I am more worried about if a tool can be used to read and write to the server and for example execute arbitrary files
> If you for example make a system user with who can not launch a shell who executes this software, things are already much safer
> One of the things you can and should do with flask is use their inbuilt methods to serialize and deserialize things like html so that nothing funny can happen there
> Here is a thing I bookmarked yesterday with a nice exploit of the kind of stuff I would worry about; https://kaizoku.dev/htb-devoops#heading-gaining-foothold-user-shell
Would you do that with a chroot? I got confused reading that this involves ssh, and a system user does not use ssh to interact with the server, right?
Would you do that with a `chroot`? I got confused reading that this involves `ssh`, and a system user does not use `ssh` to interact with the server, right?
Using a chroot is complicated unfortunately... I like the suggestion in varia/octomode#2
If you for example make a system user with who can not launch a shell who executes this software, things are already much safer
So you just do a nologin system user which has no root permissions.
> Would you do that with a chroot?
Using a `chroot` is complicated unfortunately... I like the suggestion in https://git.vvvvvvaria.org/varia/octomode/issues/2#issuecomment-725
> If you for example make a system user with who can not launch a shell who executes this software, things are already much safer
So you just do a `nologin` system user which has no root permissions.
I will dive into this thread around the Televex project as a start: varia/televex#1
And next to that check Crunk's work on distribusi-verse to see how sanitizing has been done in Flask: https://git.vvvvvvaria.org/crunk/distribusi-verse
Small research: XSS attacks is something to be careful with https://en.wikipedia.org/wiki/Cross-site_scripting.
About sanitizing Markdown in combination with Mozilla's HTML Bleach python library: https://github.com/Python-Markdown/markdown/issues/392
Bleach, by Mozilla: https://github.com/mozilla/bleach
What is a good CSS sanitizer? Crunk:
On top of sanitizing the Markdown and CSS, would it be needed to add something like Talisman to configure Content Security Policy settings and things like that?
Both the https://git.vvvvvvaria.org/crunk/distribusi-verse and https://git.vvvvvvaria.org/varia/varia-library-website also have CSRF protection.
More on that here: https://owasp.org/www-community/attacks/csrf
This is mostly when working with flask-wtf and wtforms.
Logging the following from the infra chat:
It should probably also be run as a limited permissions user with a strictly defined set of folders etc that it can read/write to.
Would you do that with a
chroot
? I got confused reading that this involvesssh
, and a system user does not usessh
to interact with the server, right?d5369bc142
, I succesfully used bleach in distribusi-verseUsing a
chroot
is complicated unfortunately... I like the suggestion in varia/octomode#2So you just do a
nologin
system user which has no root permissions.