vinitshahdeo / jobtweets

:mag: This project is about searching the twitter for job opportunities using popular hashtags and applying sentiment analysis on this. :hash: :bird:
https://vinitshahdeo.github.io/jobtweets/
MIT License
115 stars 82 forks source link

Security: Vulnerable Twitter API keys #40

Closed Saransh-cpp closed 2 years ago

Saransh-cpp commented 2 years ago

Description

The Twitter API keys should never be added to a code file because of security reasons. Exchanging the files with someone or uploading them somewhere can result in a potential security threat (An example commit from your repository (I hope they have been regenerated now) - here).

Possible fix

Using environment variables one can store these keys somewhere else (not in the file) but can still access them using the os library. This is the standard way of using sensitive API keys in a python project.

Edit: Just saw #35 oops, my bad.