Add server.request.body.filenames support for Jetty#10988
Draft
Add server.request.body.filenames support for Jetty#10988
Conversation
Add GetFilenamesAdvice to all three Jetty AppSec modules to collect uploaded file names from multipart requests and fire the requestFilesFilenames() IG callback: - jetty-appsec-8.1.3: intercepts getParts() return value; includes Content-Disposition header fallback for Servlet 3.0 (Jetty 9.0) where getSubmittedFileName() is not available - jetty-appsec-9.2: intercepts no-arg getParts() for Servlet 3.1+ - jetty-appsec-9.3: same, applies to Jetty 9.3, 10, 11 Enable testBodyFilenames() in Jetty 9.x, 10 and 11 server tests.
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 11 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1069792
Total [baseline] (11.047 s) : 0, 11047472
Agent [candidate] (1.061 s) : 0, 1060773
Total [candidate] (11.105 s) : 0, 11105105
section appsec
Agent [baseline] (1.265 s) : 0, 1264850
Total [baseline] (11.226 s) : 0, 11225630
Agent [candidate] (1.249 s) : 0, 1248690
Total [candidate] (11.238 s) : 0, 11237886
section iast
Agent [baseline] (1.238 s) : 0, 1238199
Total [baseline] (11.427 s) : 0, 11426865
Agent [candidate] (1.23 s) : 0, 1230492
Total [candidate] (11.441 s) : 0, 11440769
section profiling
Agent [baseline] (1.184 s) : 0, 1183848
Total [baseline] (11.08 s) : 0, 11079657
Agent [candidate] (1.191 s) : 0, 1191183
Total [candidate] (11.121 s) : 0, 11121008
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.25 ms) : 0, 1250
crashtracking [candidate] (1.2 ms) : 0, 1200
BytebuddyAgent [baseline] (637.849 ms) : 0, 637849
BytebuddyAgent [candidate] (631.168 ms) : 0, 631168
AgentMeter [baseline] (29.762 ms) : 0, 29762
AgentMeter [candidate] (29.351 ms) : 0, 29351
GlobalTracer [baseline] (259.378 ms) : 0, 259378
GlobalTracer [candidate] (257.274 ms) : 0, 257274
AppSec [baseline] (32.034 ms) : 0, 32034
AppSec [candidate] (31.758 ms) : 0, 31758
Debugger [baseline] (60.935 ms) : 0, 60935
Debugger [candidate] (60.426 ms) : 0, 60426
Remote Config [baseline] (595.088 µs) : 0, 595
Remote Config [candidate] (590.441 µs) : 0, 590
Telemetry [baseline] (8.079 ms) : 0, 8079
Telemetry [candidate] (7.958 ms) : 0, 7958
Flare Poller [baseline] (3.587 ms) : 0, 3587
Flare Poller [candidate] (4.934 ms) : 0, 4934
section appsec
crashtracking [baseline] (1.212 ms) : 0, 1212
crashtracking [candidate] (1.198 ms) : 0, 1198
BytebuddyAgent [baseline] (669.639 ms) : 0, 669639
BytebuddyAgent [candidate] (660.061 ms) : 0, 660061
AgentMeter [baseline] (12.264 ms) : 0, 12264
AgentMeter [candidate] (12.152 ms) : 0, 12152
GlobalTracer [baseline] (261.354 ms) : 0, 261354
GlobalTracer [candidate] (258.347 ms) : 0, 258347
IAST [baseline] (24.602 ms) : 0, 24602
IAST [candidate] (24.148 ms) : 0, 24148
AppSec [baseline] (179.346 ms) : 0, 179346
AppSec [candidate] (177.879 ms) : 0, 177879
Debugger [baseline] (67.059 ms) : 0, 67059
Debugger [candidate] (66.11 ms) : 0, 66110
Remote Config [baseline] (650.654 µs) : 0, 651
Remote Config [candidate] (633.695 µs) : 0, 634
Telemetry [baseline] (8.471 ms) : 0, 8471
Telemetry [candidate] (8.312 ms) : 0, 8312
Flare Poller [baseline] (3.659 ms) : 0, 3659
Flare Poller [candidate] (3.552 ms) : 0, 3552
section iast
crashtracking [baseline] (1.221 ms) : 0, 1221
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (803.491 ms) : 0, 803491
BytebuddyAgent [candidate] (797.621 ms) : 0, 797621
AgentMeter [baseline] (11.55 ms) : 0, 11550
AgentMeter [candidate] (11.463 ms) : 0, 11463
GlobalTracer [baseline] (249.057 ms) : 0, 249057
GlobalTracer [candidate] (248.096 ms) : 0, 248096
IAST [baseline] (25.518 ms) : 0, 25518
IAST [candidate] (25.382 ms) : 0, 25382
AppSec [baseline] (26.766 ms) : 0, 26766
AppSec [candidate] (26.551 ms) : 0, 26551
Debugger [baseline] (70.359 ms) : 0, 70359
Debugger [candidate] (70.925 ms) : 0, 70925
Remote Config [baseline] (538.388 µs) : 0, 538
Remote Config [candidate] (528.546 µs) : 0, 529
Telemetry [baseline] (9.793 ms) : 0, 9793
Telemetry [candidate] (9.15 ms) : 0, 9150
Flare Poller [baseline] (3.593 ms) : 0, 3593
Flare Poller [candidate] (3.375 ms) : 0, 3375
section profiling
crashtracking [baseline] (1.175 ms) : 0, 1175
crashtracking [candidate] (1.175 ms) : 0, 1175
BytebuddyAgent [baseline] (683.522 ms) : 0, 683522
BytebuddyAgent [candidate] (688.61 ms) : 0, 688610
AgentMeter [baseline] (8.949 ms) : 0, 8949
AgentMeter [candidate] (9.042 ms) : 0, 9042
GlobalTracer [baseline] (215.157 ms) : 0, 215157
GlobalTracer [candidate] (216.587 ms) : 0, 216587
AppSec [baseline] (32.236 ms) : 0, 32236
AppSec [candidate] (32.584 ms) : 0, 32584
Debugger [baseline] (65.899 ms) : 0, 65899
Debugger [candidate] (65.161 ms) : 0, 65161
Remote Config [baseline] (576.161 µs) : 0, 576
Remote Config [candidate] (569.598 µs) : 0, 570
Telemetry [baseline] (7.78 ms) : 0, 7780
Telemetry [candidate] (8.499 ms) : 0, 8499
Flare Poller [baseline] (3.503 ms) : 0, 3503
Flare Poller [candidate] (3.539 ms) : 0, 3539
ProfilingAgent [baseline] (94.078 ms) : 0, 94078
ProfilingAgent [candidate] (94.182 ms) : 0, 94182
Profiling [baseline] (94.64 ms) : 0, 94640
Profiling [candidate] (94.736 ms) : 0, 94736
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.068 s) : 0, 1068003
Total [baseline] (8.867 s) : 0, 8867340
Agent [candidate] (1.066 s) : 0, 1066363
Total [candidate] (8.917 s) : 0, 8916675
section iast
Agent [baseline] (1.247 s) : 0, 1246842
Total [baseline] (9.612 s) : 0, 9612373
Agent [candidate] (1.24 s) : 0, 1239579
Total [candidate] (9.583 s) : 0, 9582937
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.231 ms) : 0, 1231
crashtracking [candidate] (1.205 ms) : 0, 1205
BytebuddyAgent [baseline] (636.376 ms) : 0, 636376
BytebuddyAgent [candidate] (634.345 ms) : 0, 634345
AgentMeter [baseline] (29.573 ms) : 0, 29573
AgentMeter [candidate] (29.459 ms) : 0, 29459
GlobalTracer [baseline] (258.658 ms) : 0, 258658
GlobalTracer [candidate] (259.151 ms) : 0, 259151
AppSec [baseline] (31.99 ms) : 0, 31990
AppSec [candidate] (32.047 ms) : 0, 32047
Debugger [baseline] (59.993 ms) : 0, 59993
Debugger [candidate] (60.096 ms) : 0, 60096
Remote Config [baseline] (589.632 µs) : 0, 590
Remote Config [candidate] (608.451 µs) : 0, 608
Telemetry [baseline] (8.13 ms) : 0, 8130
Telemetry [candidate] (8.105 ms) : 0, 8105
Flare Poller [baseline] (5.01 ms) : 0, 5010
Flare Poller [candidate] (5.07 ms) : 0, 5070
section iast
crashtracking [baseline] (1.238 ms) : 0, 1238
crashtracking [candidate] (1.215 ms) : 0, 1215
BytebuddyAgent [baseline] (810.46 ms) : 0, 810460
BytebuddyAgent [candidate] (804.83 ms) : 0, 804830
AgentMeter [baseline] (12.013 ms) : 0, 12013
AgentMeter [candidate] (11.683 ms) : 0, 11683
GlobalTracer [baseline] (250.357 ms) : 0, 250357
GlobalTracer [candidate] (249.803 ms) : 0, 249803
IAST [baseline] (25.811 ms) : 0, 25811
IAST [candidate] (25.626 ms) : 0, 25626
AppSec [baseline] (27.959 ms) : 0, 27959
AppSec [candidate] (26.802 ms) : 0, 26802
Debugger [baseline] (68.008 ms) : 0, 68008
Debugger [candidate] (68.83 ms) : 0, 68830
Remote Config [baseline] (532.667 µs) : 0, 533
Remote Config [candidate] (521.366 µs) : 0, 521
Telemetry [baseline] (10.311 ms) : 0, 10311
Telemetry [candidate] (10.389 ms) : 0, 10389
Flare Poller [baseline] (3.745 ms) : 0, 3745
Flare Poller [candidate] (3.572 ms) : 0, 3572
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 4 performance regressions! Performance is the same for 15 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section baseline
no_agent (19.699 ms) : 19497, 19901
. : milestone, 19699,
appsec (18.845 ms) : 18651, 19039
. : milestone, 18845,
code_origins (17.593 ms) : 17419, 17767
. : milestone, 17593,
iast (17.845 ms) : 17666, 18024
. : milestone, 17845,
profiling (18.765 ms) : 18573, 18957
. : milestone, 18765,
tracing (18.9 ms) : 18708, 19091
. : milestone, 18900,
section candidate
no_agent (19.036 ms) : 18842, 19230
. : milestone, 19036,
appsec (18.554 ms) : 18369, 18739
. : milestone, 18554,
code_origins (19.81 ms) : 19611, 20008
. : milestone, 19810,
iast (17.646 ms) : 17468, 17824
. : milestone, 17646,
profiling (19.764 ms) : 19559, 19969
. : milestone, 19764,
tracing (18.189 ms) : 18007, 18371
. : milestone, 18189,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section baseline
no_agent (1.21 ms) : 1198, 1222
. : milestone, 1210,
iast (3.257 ms) : 3212, 3303
. : milestone, 3257,
iast_FULL (6.048 ms) : 5987, 6110
. : milestone, 6048,
iast_GLOBAL (3.504 ms) : 3443, 3565
. : milestone, 3504,
profiling (2.208 ms) : 2186, 2231
. : milestone, 2208,
tracing (1.824 ms) : 1808, 1840
. : milestone, 1824,
section candidate
no_agent (1.213 ms) : 1201, 1226
. : milestone, 1213,
iast (3.167 ms) : 3122, 3211
. : milestone, 3167,
iast_FULL (5.856 ms) : 5796, 5915
. : milestone, 5856,
iast_GLOBAL (3.691 ms) : 3628, 3755
. : milestone, 3691,
profiling (2.334 ms) : 2312, 2356
. : milestone, 2334,
tracing (1.775 ms) : 1761, 1789
. : milestone, 1775,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section baseline
no_agent (1.479 ms) : 1468, 1491
. : milestone, 1479,
appsec (3.836 ms) : 3614, 4059
. : milestone, 3836,
iast (2.276 ms) : 2207, 2346
. : milestone, 2276,
iast_GLOBAL (2.324 ms) : 2253, 2395
. : milestone, 2324,
profiling (2.106 ms) : 2049, 2162
. : milestone, 2106,
tracing (2.074 ms) : 2020, 2128
. : milestone, 2074,
section candidate
no_agent (1.479 ms) : 1467, 1491
. : milestone, 1479,
appsec (3.799 ms) : 3578, 4020
. : milestone, 3799,
iast (2.271 ms) : 2201, 2340
. : milestone, 2271,
iast_GLOBAL (2.31 ms) : 2240, 2380
. : milestone, 2310,
profiling (2.091 ms) : 2036, 2146
. : milestone, 2091,
tracing (2.068 ms) : 2014, 2121
. : milestone, 2068,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~e3d40737a9, baseline=1.61.0-SNAPSHOT~1abe140bde
dateFormat X
axisFormat %s
section baseline
no_agent (15.542 s) : 15542000, 15542000
. : milestone, 15542000,
appsec (15.32 s) : 15320000, 15320000
. : milestone, 15320000,
iast (18.356 s) : 18356000, 18356000
. : milestone, 18356000,
iast_GLOBAL (17.934 s) : 17934000, 17934000
. : milestone, 17934000,
profiling (15.57 s) : 15570000, 15570000
. : milestone, 15570000,
tracing (14.748 s) : 14748000, 14748000
. : milestone, 14748000,
section candidate
no_agent (15.458 s) : 15458000, 15458000
. : milestone, 15458000,
appsec (14.72 s) : 14720000, 14720000
. : milestone, 14720000,
iast (18.297 s) : 18297000, 18297000
. : milestone, 18297000,
iast_GLOBAL (18.026 s) : 18026000, 18026000
. : milestone, 18026000,
profiling (14.671 s) : 14671000, 14671000
. : milestone, 14671000,
tracing (14.898 s) : 14898000, 14898000
. : milestone, 14898000,
|
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.
Summary
GetFilenamesAdviceto all three Jetty AppSec instrumentation modules to collect uploaded file names from multipart requests and fire therequestFilesFilenames()IG callback:jetty-appsec-8.1.3: interceptsgetParts()return value; includes Content-Disposition header fallback for Servlet 3.0 (Jetty 9.0) wheregetSubmittedFileName()is not availablejetty-appsec-9.2: intercepts no-arggetParts()for Servlet 3.1+jetty-appsec-9.3: same pattern, applies to Jetty 9.3, 10, 11testBodyFilenames()in Jetty 9.x, 10, and 11 server teststestBodyFilenames() = falseinJettyAsyncHandlerTest— async re-dispatch changes how Jetty processes multipart parts, the tag is not set in that variantTest plan
jetty-server-9.0tests passjetty-server-9.0.4tests passjetty-server-9.3tests passjetty-server-9.4.21tests passjetty-server-10.0tests passjetty-server-11.0tests pass (includingJettyAsyncHandlerTestwhich skipstestBodyFilenames)Related
Depends on #10973 (merged).
Part of APPSEC-61873 —
server.request.body.filenamesimplementation across server frameworks.tag: no release note
tag: ai generated