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

YAML.load marked as file access #142

Closed
pupeno opened this issue Sep 6, 2012 · 1 comment · Fixed by #178
Closed

YAML.load marked as file access #142

pupeno opened this issue Sep 6, 2012 · 1 comment · Fixed by #178

Comments

@pupeno
Copy link

pupeno commented Sep 6, 2012

Hello,

I have the following line in a controller:

doc = YAML::load(params[:doc]) if params[:doc].present?

which brakeman is marking as a file access using a parameter:

File Access Parameter value used in file name near line 13: YAML.load(params[:doc])

but YAML::load seems to only load from a string, not a path like YAML::load_file. Thus, this is a false positive warning. Am I wrong or missing something?

@presidentbeef
Copy link
Owner

I think you are right.

This is due to the way the file access check is written (lazily).

Repository owner locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants