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

Misc fixes for deploying vulnerablecode on a container platform #413

Merged
merged 2 commits into from
Mar 31, 2021

Conversation

tardyp
Copy link
Contributor

@tardyp tardyp commented Mar 29, 2021

This is my last few fixes for today.

We can now call vulnerable code enterprise ready ;)

tardyp added 2 commits March 29, 2021 20:56
This allows to print stack traces on the stdout

Best practice would be to integrate with sentry, but at least print the stack trace is helpful when trying to deploy this

Signed-off-by: Pierre Tardy <[email protected]>
@@ -26,6 +26,7 @@

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG_PROPAGATE_EXCEPTIONS = True
Copy link
Collaborator

Choose a reason for hiding this comment

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

Enabling this when the DJANGO_DEV=1 env variable is also set is probably better idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, the whole point is to stil enable this when not using DJANGO_DEV.

If we don't have this in prod, we have absolutely no visibility in case of error 500.

This setting allows to propagate the exception to the base logger, and thus to display them in runserver's stdout.
I dont think there are security implication to this.

If we are in DJANGO_DEV, then DEBUG is true, and exception is printed in the browser along with debug UI which is really insecure.

@sbs2001 sbs2001 merged commit 0af5389 into aboutcode-org:main Mar 31, 2021
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