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

Security best practices #18

Open
eranshmil opened this issue Mar 11, 2019 · 2 comments
Open

Security best practices #18

eranshmil opened this issue Mar 11, 2019 · 2 comments
Labels
ASAP! question Further information is requested

Comments

@eranshmil
Copy link
Member

eranshmil commented Mar 11, 2019

@yuvadm @noam-r

Which best practices should we use in order to make the server more secure?

We should also monitor our repositories using https://snyk.io

@eranshmil eranshmil added the question Further information is requested label Mar 11, 2019
@mderazon
Copy link
Collaborator

Security looks good to me. just a few commets:
cors - https://github.com/botim/backend/blob/master/src/app.ts#L77 should we limit the origin to be twitter.com only ? The extension manifest already have cors settings so it's fine.

https://github.com/botim/backend/blob/master/src/app.ts#L82 - I think helmet takes care of this by default so it's redundant. Otherwise Helmet is used which is great

https://github.com/botim/backend/blob/master/src/security/authentication.ts#L23 - usually api keys are sent via headers, not request body. Can use the Authorization header or X-API header

XSS - Looks like input is being sanitized
SQL injection - queries are parametrized correctly

All looks 💯 to me

@eranshmil
Copy link
Member Author

cors - /src/app.ts@master#L77 should we limit the origin to be twitter.com only ? The extension manifest already have cors settings so it's fine.

The origin is chrome-extension://extension_id and the equivalent of Firefox.
I'll check if that's working, but I'm not quite sure if the current id of the dev version will be the same in the store.

/src/security/authentication.ts@master#L23 - usually api keys are sent via headers, not request body. Can use the Authorization header or X-API header

Agree. Will be changed.

SQL injection - queries are parametrized correctly

Is that enough?

All looks 💯 to me

Thanks for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP! question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants