Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


missing security_token.rb inhibits development #885

merged 1 commit into from

3 participants

Adrian Rangel Aldo Román Nureña Carl Suster
Adrian Rangel

It is a security issue BUT it shouldn't be on gitignore. Adding it to the gitignore inhibits development (the app won't boot without it)

Adrian Rangel acrogenesis referenced this pull request

added secret_token.rb #735

Aldo Román Nureña

I came up with this issue when deploying to Heroku. I still think it is valuable to avoid the token in git. If you need to deploy, you can (for example) include it manually in server.

Remember that motivation for this was new developers publishing a security token it without noticing.

Adrian Rangel

If the secret_token is not there you can't deploy and people who fork the project will have an unusable app, everyone has to manually create the secret_token.rb. This is also hard for the newbie deploying for first time, or contributing on other rails projects for the first time.
I'm not saying you are wrong but for github(sharing) I think it's better not to have the secret_token on .gitignore.

More on securing secret_token

Carl Suster

I generally would prefer to avoid ignoring files which are essential for a project to work properly, but I also see the security issue. I think that the best compromise would be to ignore sensitive files by default, but add a comment starting with TODO which says to comment out the rule if you're okay with secret stuff going into the repo.

That way you don't accidentally make things public unless you've explicitly taken the step to comment out the rule and acknowledged what is entailed. Would that work for everyone? If so could we get this PR updated to account for the similar case of secrets.yml which was added in the meantime?

Adrian Rangel

I have merged and updated the PR

Carl Suster

Thanks, but currently there are changes to 3 templates. Can we keep it to Rails here?

Adrian Rangel

@arcresu Must have messed something up in the merge, Fixed :+1:

Carl Suster

Excellent, thanks for persevering after all this time :sparkles:

Carl Suster arcresu merged commit f21b38a into from
Adrian Rangel acrogenesis deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2014
  1. Adrian Rangel
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  Rails.gitignore
2  Rails.gitignore
@@ -10,6 +10,8 @@ capybara-*.html
+# TODO Comment out this rules if you are OK with secrets been uploaded to the repo
Something went wrong with that request. Please try again.