Skip to content

Re-add CSP, use flask-talisman#234

Open
epicfaace wants to merge 17 commits intoambuda-org:mainfrom
epicfaace:csp
Open

Re-add CSP, use flask-talisman#234
epicfaace wants to merge 17 commits intoambuda-org:mainfrom
epicfaace:csp

Conversation

@epicfaace
Copy link
Copy Markdown
Contributor

  • Re-add CSP, set unsafe-inline for CSS and unsafe-eval for JS to ensure the proofer functionality still works
  • Use flask-talisman to set CSP. This also sets a bunch of other best-practice security defaults like HSTS, etc. -- see https://github.com/GoogleCloudPlatform/flask-talisman

Comment thread ambuda/templates/proofing/pages/edit.html
@epicfaace epicfaace requested a review from akprasad August 27, 2022 21:14
@akprasad
Copy link
Copy Markdown
Contributor

Just to check, have you already looked through the docs here?

https://alpinejs.dev/advanced/csp

@epicfaace
Copy link
Copy Markdown
Contributor Author

Just to check, have you already looked through the docs here?

https://alpinejs.dev/advanced/csp

Yes, I tried this, though 1) alpinejs-csp is not available through the cdn and you need to bundle it locally, and 2) when I did that, and did what the docs suggested around x-data, I still faced some other issues -- which I haven't resolved yet. Happy to push that branch up though.

@akprasad
Copy link
Copy Markdown
Contributor

akprasad commented Aug 30, 2022

Cool, overall SGTM.

Before merge, let's resolve the outstanding conflicts. I also removed the Server API so let's just use ordinary fetches instead.

Comment thread ambuda/static/js/main.js
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move to line 9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh, maybe my diff was out of date? lgtm

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.

2 participants