feat: SSRF env var to allow all connections before it's configured#1018
Merged
feat: SSRF env var to allow all connections before it's configured#1018
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new environment variable JAZZER_SSRF_PERMISSIVE_UNTIL_CONFIGURED to address false positives in multithreaded applications where network requests may occur after fuzzing starts but before the SSRF sanitizer is configured via BugDetectors.allowNetworkConnections(). When set, this variable allows all network connections until explicit SSRF configuration is provided.
Key Changes
- Added environment variable check in
ServerSideRequestForgerystatic initializer to conditionally disable the default "deny all connections" behavior - Updated SSRF error message to inform users about the new environment variable option for multithreaded scenarios
- Added test case demonstrating the permissive mode with a background thread making network requests before SSRF configuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java |
Modified static initializer to check for JAZZER_SSRF_PERMISSIVE_UNTIL_CONFIGURED environment variable and conditionally skip setting the restrictive connection policy; updated error message to document the new option |
sanitizers/src/test/java/com/example/SsrfAllowUntilConfigured.java |
New test case that simulates multithreaded fuzzing scenario with background thread making network requests before SSRF configuration |
sanitizers/src/test/java/com/example/BUILD.bazel |
Added test configuration for SsrfAllowUntilConfigured with the permissive environment variable enabled |
docs/arguments-and-configuration-options.md |
Documented the new JAZZER_SSRF_PERMISSIVE_UNTIL_CONFIGURED environment variable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java
Outdated
Show resolved
Hide resolved
sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java
Outdated
Show resolved
Hide resolved
e0748b4 to
e21401a
Compare
e21401a to
6fc9f87
Compare
simonresch
reviewed
Dec 18, 2025
In some projects, network requests can happen after the fuzz test has started, but before the user had a chance to configure allowed/denied connections. Now the user can start Jazzer with the environmental variable JAZZER_SSRF_PERMISSIVE_UNTIL_CONFIGURED set to a truthy value and all network requests will be allowed, until the user specifies otherwise in the fuzz test using BugDetectors.allowNetworkConnections(...)
6fc9f87 to
9a94659
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some projects, network requests can happen after the fuzz test has started, but before the user had a chance to configure allowed/denied connections.
Now the user can start Jazzer with the environmental variable JAZZER_SSRF_PERMISSIVE_UNTIL_CONFIGURED set to a truthy value and all network requests will be allowed, until the user specifies otherwise in the fuzz test using BugDetectors.allowNetworkConnections(...)