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

add unsafe URL & make config required for Storage classes #600

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

alexcos20
Copy link
Member

@alexcos20 alexcos20 commented Aug 14, 2024

Closes #106

Changes proposed in this PR:

  • add env UNSAFE_URLS, which is an array of regular expressions. If asset URL is a match, access is denied
  • add config to Storage constructor

Motivation:
Image a hacker publishing an asset with an URL like "http://169.254.169.254/latest/meta-data/". Then by "downloading" his asset, he will get access to your cloud provider provided metadata, which is a huge security risk

@alexcos20 alexcos20 marked this pull request as ready for review August 14, 2024 11:04
@alexcos20 alexcos20 self-assigned this Aug 14, 2024
@jamiehewitt15
Copy link
Member

This is a good idea but there is no documentation and no default values for unsafe URLs, which makes it hard to use. UNSAFE_URLS also needs to be added to env.md

Copy link
Member

@jamiehewitt15 jamiehewitt15 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@alexcos20 alexcos20 merged commit 3889007 into develop Aug 14, 2024
6 of 8 checks passed
@alexcos20 alexcos20 deleted the feature/url_protection branch August 14, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants