Skip to content

Commit 26db206

Browse files
Make RASP addresses ephemeral (#7529)
1 parent a5af871 commit 26db206

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dd-java-agent/appsec/src/main/java/com/datadog/appsec/gateway/GatewayBridge.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private Flow<Void> onNetworkConnection(RequestContext ctx_, String url) {
150150
DataBundle bundle =
151151
new MapDataBundle.Builder(CAPACITY_0_2).add(KnownAddresses.IO_NET_URL, url).build();
152152
try {
153-
GatewayContext gwCtx = new GatewayContext(false, RuleType.SSRF);
153+
GatewayContext gwCtx = new GatewayContext(true, RuleType.SSRF);
154154
return producerService.publishDataEvent(subInfo, ctx, bundle, gwCtx);
155155
} catch (ExpiredSubscriberInfoException e) {
156156
ioNetUrlSubInfo = null;
@@ -179,7 +179,7 @@ private Flow<Void> onDatabaseSqlQuery(RequestContext ctx_, String sql) {
179179
.add(KnownAddresses.DB_SQL_QUERY, sql)
180180
.build();
181181
try {
182-
GatewayContext gwCtx = new GatewayContext(false, RuleType.SQL_INJECTION);
182+
GatewayContext gwCtx = new GatewayContext(true, RuleType.SQL_INJECTION);
183183
return producerService.publishDataEvent(subInfo, ctx, bundle, gwCtx);
184184
} catch (ExpiredSubscriberInfoException e) {
185185
dbSqlQuerySubInfo = null;

dd-java-agent/appsec/src/test/groovy/com/datadog/appsec/gateway/GatewayBridgeSpecification.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ class GatewayBridgeSpecification extends DDSpecification {
773773
bundle.get(KnownAddresses.DB_SQL_QUERY) == 'SELECT * FROM foo'
774774
flow.result == null
775775
flow.action == Flow.Action.Noop.INSTANCE
776-
gatewayContext.isTransient == false
776+
gatewayContext.isTransient == true
777777
gatewayContext.isRasp == true
778778
}
779779

@@ -793,7 +793,7 @@ class GatewayBridgeSpecification extends DDSpecification {
793793
bundle.get(KnownAddresses.IO_NET_URL) == url
794794
flow.result == null
795795
flow.action == Flow.Action.Noop.INSTANCE
796-
gatewayContext.isTransient == false
796+
gatewayContext.isTransient == true
797797
gatewayContext.isRasp == true
798798
}
799799

0 commit comments

Comments
 (0)