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

Use a hashed buildpack id/version for dir/file names #113

Closed
jkutner opened this issue Mar 21, 2019 · 1 comment
Closed

Use a hashed buildpack id/version for dir/file names #113

jkutner opened this issue Mar 21, 2019 · 1 comment

Comments

@jkutner
Copy link
Member

jkutner commented Mar 21, 2019

When creating a temp file or directory that is unique to a given buildpack id/version, we should not name it with the raw strings (since they could be invalid file/dir names, or even open us to a directory traversal attack). Instead we should always hash them with something like:

h := sha1.New()
io.WriteString(h, buildpackId)
sha := h.Sum(nil)

See #112

@ekcasey
Copy link
Member

ekcasey commented Nov 8, 2019

I think is resolved. Let me know if you find any that slipped through the cracks.

@ekcasey ekcasey closed this as completed Nov 8, 2019
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

2 participants