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

fix: LEAP-396: More exhaustative IP validation for SSRF defenses, plus user configurability #5316

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

jombooth
Copy link
Contributor

@jombooth jombooth commented Jan 19, 2024

Ban all IPs within reserved blocks, for both IPv4 and IPv6, by default: https://en.wikipedia.org/wiki/Reserved_IP_addresses

Additionally, allow users the ability to ban additional blocks (with USER_ADDITIONAL_BANNED_SUBNETS), or to specify their full list of banned IP blocks themselves (see USE_DEFAULT_BANNED_SUBNETS, default True), as their network setup may require.

Also, make the error message more helpful when SSRF protection blocks an upload:
image

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 2ca2391
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/65aed92182085f0008b6d9e5

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 2ca2391
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/65aed921b3458b0008873055

@github-actions github-actions bot added the fix label Jan 19, 2024
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (382cec0) 75.88% compared to head (2ca2391) 75.70%.
Report is 8 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5316      +/-   ##
===========================================
- Coverage    75.88%   75.70%   -0.19%     
===========================================
  Files          154      154              
  Lines        12925    12926       +1     
===========================================
- Hits          9808     9785      -23     
- Misses        3117     3141      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jombooth jombooth merged commit 55dd6af into develop Jan 22, 2024
35 of 37 checks passed
@jombooth jombooth deleted the fb-LEAP-396/more-ips-and-allow-user-config branch January 22, 2024 21:44
juliosgarbi pushed a commit that referenced this pull request Jan 22, 2024
…s user configurability (#5316)

* fix: LEAP-396: More exhaustative IP validation for SSRF, plus user configurability

* unbotch

* fix test

* more testing

* fix false positive finding from Bandit
juliosgarbi added a commit that referenced this pull request Jan 22, 2024
* chore: Cherry picked DIA-820 into release 1.11.0

* fix: LEAP-396: More exhaustative IP validation for SSRF defenses, plus user configurability (#5316)

* fix: LEAP-396: More exhaustative IP validation for SSRF, plus user configurability

* unbotch

* fix test

* more testing

* fix false positive finding from Bandit

* ci: Build frontend

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/7618278765

* [submodules] Copy src HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/7618518612

* [submodules] Copy src HumanSignal/dm2

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/7618540291

* ci: Build frontend

Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/7618557170

* fix submodules

* fix submodules

---------

Co-authored-by: robot-ci-heartex <87703623+robot-ci-heartex@users.noreply.github.com>
Co-authored-by: Jo Booth <jo.m.booth@gmail.com>
Co-authored-by: robot-ci-heartex <robot-ci-heartex@users.noreply.github.com>
Co-authored-by: yyassi-heartex <104568407+yyassi-heartex@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants