Aby Sebastian
Aby Sebastian

Reputation: 62

what are the steps to check before uploading a django project to github to secure the project

When I uploaded my project to GitHub it sends me an email saying that my secret key is exposed to the project.
So what are the things to check before uploading a Django project to GitHub

Upvotes: 0

Views: 207

Answers (1)

Slam
Slam

Reputation: 8572

If your code follows best practices for modern web-development, all sensitive information lives in codebase and settings.py. Things to look for – signing secrets and hashing salt/pepper.

I would say, as a rule of thumb – you should never have settings.py that you expect to use in production saved in version control system (at least, unencrypted).

If you're trying to push development state, please explicitly change your secrets in settings.py to something obviously non-secret (like not-a-secret). Django generates quite "strong" secrets by default. I'd guess github analyzer is unhappy with that. Note tho, that changing secrets will affect a lot of ares – i.e. sessions or old pw reset links will be invalid, etc.


As related topic – please take a look at deployment checklist

Upvotes: 1

Related Questions