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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile stores S3 bucket name in plaintext! #98

Closed
znmeb opened this issue Feb 11, 2018 · 6 comments
Closed

Makefile stores S3 bucket name in plaintext! #98

znmeb opened this issue Feb 11, 2018 · 6 comments

Comments

@znmeb
Copy link

znmeb commented Feb 11, 2018

How to reproduce:

  1. cookiecutter https://github.com/drivendata/cookiecutter-data-science
  2. Give it your bucket name
  3. Look at line 8 of the Makefile - there's your bucket name in plaintext.

:-( 馃憥

@pjbull
Copy link
Collaborator

pjbull commented Feb 11, 2018

Two follow-ups:

  • Do you have a suggested fix?
  • I'm not under the impression the AWS S3 bucket names are generally treated as secrets. Could you point to a resource that provides that advice?

@znmeb
Copy link
Author

znmeb commented Feb 11, 2018

Simple fix - define environment variables BUCKET and PROFILE
A private bucket is supposed to be private including the name. Sure, there are plenty of other authentication barriers keeping someone from using the name, but it's not something I want public.

@pjbull
Copy link
Collaborator

pjbull commented Feb 11, 2018

Not yet convinced the risk outweighs the benefit.

Creating environment variables means that bucket name is not templatized and needs another channel for communicating it to collaborators. Would reconsider if there are AWS docs suggesting bucket names should be kept private, but my initial search does not turn up anything.

In the meantime, happy to accept a PR that explains in the documentation that the bucket name is stored in plaintext and if you want to avoid that you should skip that field at setup time.

Also happy to accept a PR that probes an AWS_S3_BUCKET_NAME env variable if field is not set as part of the cookiecutter process.

@znmeb
Copy link
Author

znmeb commented Feb 11, 2018

I can probably do that - I'm working on Docker integration at the moment. Once I know how make works on Windows with all the possible command lines there are I can tackle this.

@pjbull
Copy link
Collaborator

pjbull commented Feb 11, 2018

Thanks!

@isms
Copy link
Collaborator

isms commented Feb 13, 2018

Just to weigh in on this - I'm not convinced that bucket names are secrets for most projects, and where they are it should be a quick fix. Happy to be pointed to any discussion of this topic though.

@isms isms closed this as completed Mar 15, 2018
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

No branches or pull requests

3 participants