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

Outsource SSRF mitigation implementation in dashboard to community #1759

Closed
2 tasks
mogul opened this issue Jun 16, 2020 · 1 comment
Closed
2 tasks

Outsource SSRF mitigation implementation in dashboard to community #1759

mogul opened this issue Jun 16, 2020 · 1 comment

Comments

@mogul
Copy link
Contributor

mogul commented Jun 16, 2020

User Story

In order to maximize our chances of blocking SSRF attempts with minimal ongoing maintenance, the data.gov team wants to use a community-maintained PHP SSRF blocking solution in place of our own code.

Acceptance Criteria

  • WHEN I grep for curl_exec() in a checkout of dashboard-app
    THEN I see no results outside the vendor directory other than safecurl_exec().
  • WHEN I look at the source for filter_remote_url()
    THEN I see no bespoke code, only calls to safecurl.

Background

We have written our own SSRF mitigation code for the dashboard but we have found again and again that there are cases we haven't thought of. We should be teaming up with a community effort to reduce our risk and maintenance friction for the dashboard. The j0k3r PHP package looks the most maintained and used, but we know that it doesn't handle IPv6 addresses (whereas our existing implementation does).

Security Considerations (required)

This change will maintain the existing security profile due to existing tests that capture our expectations, and potentially improve our security due to more cases being blocked.

Sketch

  • Bring in the j0k3r/safecurl library and use it in filter_remote_url() and the curl_*() api helper functions.
  • Make a PR to the j0k3r/safecurl fork to implement the missing IPv6 filtering.
@nickumia-reisys
Copy link
Contributor

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

3 participants