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

Remove hardcoded secret #70

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

dwelch-r7
Copy link
Contributor

Resolves a snyk issue with a hardcoded secret, not a valid security concern since it's in the test suite but it can be removed anyway, I was able to remove the whole file since secret_token hasn't been in use since migrating to rails 4

https://guides.rubyonrails.org/v4.0.8/upgrading_ruby_on_rails.html#:~:text=%23%20end-,2.6%20Action%20Pack,-Rails%204.0%20introduces

# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Dummy::Application.config.secret_token = 'f04f565f9a4db0f0af88f4bd8b79952d139b02434b889a7c7bb3fe83405e9032409bd16bca7b0d7d68a8b119b6ddfd31b17d19155cd699a27e19a48bd05eb200'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the discussion in the metasploit-concerns, I'd recommend to replace this with an ENV read-out, and update the documentation to use a .env file with a generated value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-referencing response: rapid7/metasploit-credential#181 (comment)

@adfoster-r7 adfoster-r7 merged commit b35377b into rapid7:master Jun 27, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

3 participants