-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add propagation to String strip methods (reverted) #7651
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 14 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.077 s) : 0, 1077288
Total [baseline] (8.571 s) : 0, 8570502
Agent [candidate] (1.065 s) : 0, 1064674
Total [candidate] (8.568 s) : 0, 8568229
section iast
Agent [baseline] (1.19 s) : 0, 1190113
Total [baseline] (8.997 s) : 0, 8996819
Agent [candidate] (1.202 s) : 0, 1202065
Total [candidate] (9.052 s) : 0, 9052060
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.195 s) : 0, 1195090
Total [baseline] (8.973 s) : 0, 8973065
Agent [candidate] (1.192 s) : 0, 1191650
Total [candidate] (9.01 s) : 0, 9009890
section iast_TELEMETRY_OFF
Agent [baseline] (1.187 s) : 0, 1187313
Total [baseline] (9.01 s) : 0, 9009542
Agent [candidate] (1.189 s) : 0, 1188831
Total [candidate] (9.018 s) : 0, 9018004
gantt
title insecure-bank - break down per module: candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (689.112 ms) : 0, 689112
BytebuddyAgent [candidate] (679.405 ms) : 0, 679405
GlobalTracer [baseline] (311.965 ms) : 0, 311965
GlobalTracer [candidate] (309.399 ms) : 0, 309399
AppSec [baseline] (54.078 ms) : 0, 54078
AppSec [candidate] (53.924 ms) : 0, 53924
Remote Config [baseline] (662.491 µs) : 0, 662
Remote Config [candidate] (662.652 µs) : 0, 663
Telemetry [baseline] (7.616 ms) : 0, 7616
Telemetry [candidate] (7.624 ms) : 0, 7624
section iast
BytebuddyAgent [baseline] (791.934 ms) : 0, 791934
BytebuddyAgent [candidate] (799.887 ms) : 0, 799887
GlobalTracer [baseline] (298.43 ms) : 0, 298430
GlobalTracer [candidate] (301.107 ms) : 0, 301107
AppSec [baseline] (55.658 ms) : 0, 55658
AppSec [candidate] (57.034 ms) : 0, 57034
IAST [baseline] (22.7 ms) : 0, 22700
IAST [candidate] (22.431 ms) : 0, 22431
Remote Config [baseline] (637.735 µs) : 0, 638
Remote Config [candidate] (627.265 µs) : 0, 627
Telemetry [baseline] (7.036 ms) : 0, 7036
Telemetry [candidate] (7.139 ms) : 0, 7139
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (794.852 ms) : 0, 794852
BytebuddyAgent [candidate] (792.604 ms) : 0, 792604
GlobalTracer [baseline] (299.695 ms) : 0, 299695
GlobalTracer [candidate] (298.909 ms) : 0, 298909
AppSec [baseline] (53.509 ms) : 0, 53509
AppSec [candidate] (55.69 ms) : 0, 55690
IAST [baseline] (25.466 ms) : 0, 25466
IAST [candidate] (22.893 ms) : 0, 22893
Remote Config [baseline] (662.615 µs) : 0, 663
Remote Config [candidate] (678.438 µs) : 0, 678
Telemetry [baseline] (7.138 ms) : 0, 7138
Telemetry [candidate] (7.15 ms) : 0, 7150
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (788.47 ms) : 0, 788470
BytebuddyAgent [candidate] (790.31 ms) : 0, 790310
GlobalTracer [baseline] (299.058 ms) : 0, 299058
GlobalTracer [candidate] (299.146 ms) : 0, 299146
AppSec [baseline] (55.208 ms) : 0, 55208
AppSec [candidate] (57.459 ms) : 0, 57459
IAST [baseline] (22.489 ms) : 0, 22489
IAST [candidate] (20.661 ms) : 0, 20661
Remote Config [baseline] (1.404 ms) : 0, 1404
Remote Config [candidate] (597.616 µs) : 0, 598
Telemetry [baseline] (6.985 ms) : 0, 6985
Telemetry [candidate] (6.918 ms) : 0, 6918
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.074 s) : 0, 1074265
Total [baseline] (10.437 s) : 0, 10437005
Agent [candidate] (1.075 s) : 0, 1074764
Total [candidate] (10.426 s) : 0, 10425847
section appsec
Agent [baseline] (1.201 s) : 0, 1200604
Total [baseline] (10.621 s) : 0, 10621224
Agent [candidate] (1.204 s) : 0, 1203642
Total [candidate] (10.648 s) : 0, 10648003
section iast
Agent [baseline] (1.193 s) : 0, 1193079
Total [baseline] (10.889 s) : 0, 10888694
Agent [candidate] (1.193 s) : 0, 1193298
Total [candidate] (10.802 s) : 0, 10802191
section profiling
Agent [baseline] (1.268 s) : 0, 1268053
Total [baseline] (10.723 s) : 0, 10722534
Agent [candidate] (1.269 s) : 0, 1268695
Total [candidate] (10.534 s) : 0, 10534288
gantt
title petclinic - break down per module: candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.265 ms) : 0, 686265
BytebuddyAgent [candidate] (686.069 ms) : 0, 686069
GlobalTracer [baseline] (311.933 ms) : 0, 311933
GlobalTracer [candidate] (312.052 ms) : 0, 312052
AppSec [baseline] (53.856 ms) : 0, 53856
AppSec [candidate] (54.536 ms) : 0, 54536
Remote Config [baseline] (668.307 µs) : 0, 668
Remote Config [candidate] (663.012 µs) : 0, 663
Telemetry [baseline] (7.723 ms) : 0, 7723
Telemetry [candidate] (7.673 ms) : 0, 7673
section appsec
BytebuddyAgent [baseline] (701.294 ms) : 0, 701294
BytebuddyAgent [candidate] (703.796 ms) : 0, 703796
GlobalTracer [baseline] (302.811 ms) : 0, 302811
GlobalTracer [candidate] (304.288 ms) : 0, 304288
AppSec [baseline] (162.97 ms) : 0, 162970
AppSec [candidate] (163.132 ms) : 0, 163132
IAST [baseline] (22.882 ms) : 0, 22882
IAST [candidate] (19.85 ms) : 0, 19850
Remote Config [baseline] (643.143 µs) : 0, 643
Remote Config [candidate] (633.864 µs) : 0, 634
Telemetry [baseline] (7.794 ms) : 0, 7794
Telemetry [candidate] (8.137 ms) : 0, 8137
section iast
BytebuddyAgent [baseline] (793.222 ms) : 0, 793222
BytebuddyAgent [candidate] (794.157 ms) : 0, 794157
GlobalTracer [baseline] (299.279 ms) : 0, 299279
GlobalTracer [candidate] (299.349 ms) : 0, 299349
AppSec [baseline] (53.582 ms) : 0, 53582
AppSec [candidate] (55.333 ms) : 0, 55333
IAST [baseline] (25.52 ms) : 0, 25520
IAST [candidate] (22.971 ms) : 0, 22971
Remote Config [baseline] (630.36 µs) : 0, 630
Remote Config [candidate] (631.463 µs) : 0, 631
Telemetry [baseline] (7.107 ms) : 0, 7107
Telemetry [candidate] (7.136 ms) : 0, 7136
section profiling
BytebuddyAgent [baseline] (675.021 ms) : 0, 675021
BytebuddyAgent [candidate] (674.645 ms) : 0, 674645
GlobalTracer [baseline] (394.817 ms) : 0, 394817
GlobalTracer [candidate] (395.393 ms) : 0, 395393
AppSec [baseline] (54.546 ms) : 0, 54546
AppSec [candidate] (54.977 ms) : 0, 54977
Remote Config [baseline] (643.218 µs) : 0, 643
Remote Config [candidate] (651.63 µs) : 0, 652
Telemetry [baseline] (7.439 ms) : 0, 7439
Telemetry [candidate] (7.488 ms) : 0, 7488
ProfilingAgent [baseline] (96.976 ms) : 0, 96976
ProfilingAgent [candidate] (96.964 ms) : 0, 96964
Profiling [baseline] (96.999 ms) : 0, 96999
Profiling [candidate] (96.987 ms) : 0, 96987
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 18 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section baseline
no_agent (376.777 µs) : 357, 396
. : milestone, 377,
iast (490.009 µs) : 468, 512
. : milestone, 490,
iast_FULL (552.525 µs) : 531, 574
. : milestone, 553,
iast_GLOBAL (501.207 µs) : 480, 522
. : milestone, 501,
iast_HARDCODED_SECRET_DISABLED (479.162 µs) : 458, 500
. : milestone, 479,
iast_INACTIVE (450.218 µs) : 429, 471
. : milestone, 450,
iast_TELEMETRY_OFF (476.318 µs) : 454, 499
. : milestone, 476,
tracing (442.851 µs) : 422, 464
. : milestone, 443,
section candidate
no_agent (371.306 µs) : 351, 391
. : milestone, 371,
iast (481.409 µs) : 460, 503
. : milestone, 481,
iast_FULL (557.475 µs) : 536, 579
. : milestone, 557,
iast_GLOBAL (513.457 µs) : 491, 535
. : milestone, 513,
iast_HARDCODED_SECRET_DISABLED (483.909 µs) : 462, 506
. : milestone, 484,
iast_INACTIVE (453.715 µs) : 432, 475
. : milestone, 454,
iast_TELEMETRY_OFF (474.811 µs) : 452, 497
. : milestone, 475,
tracing (446.741 µs) : 426, 468
. : milestone, 447,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section baseline
no_agent (1.338 ms) : 1319, 1357
. : milestone, 1338,
appsec (1.725 ms) : 1702, 1748
. : milestone, 1725,
appsec_no_iast (1.715 ms) : 1690, 1740
. : milestone, 1715,
iast (1.462 ms) : 1440, 1484
. : milestone, 1462,
profiling (1.477 ms) : 1452, 1502
. : milestone, 1477,
tracing (1.455 ms) : 1431, 1479
. : milestone, 1455,
section candidate
no_agent (1.346 ms) : 1327, 1365
. : milestone, 1346,
appsec (1.717 ms) : 1693, 1740
. : milestone, 1717,
appsec_no_iast (1.721 ms) : 1696, 1745
. : milestone, 1721,
iast (1.478 ms) : 1455, 1501
. : milestone, 1478,
profiling (1.481 ms) : 1456, 1505
. : milestone, 1481,
tracing (1.483 ms) : 1459, 1507
. : milestone, 1483,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section baseline
no_agent (14.885 s) : 14885000, 14885000
. : milestone, 14885000,
appsec (15.052 s) : 15052000, 15052000
. : milestone, 15052000,
iast (18.788 s) : 18788000, 18788000
. : milestone, 18788000,
iast_GLOBAL (18.215 s) : 18215000, 18215000
. : milestone, 18215000,
profiling (15.525 s) : 15525000, 15525000
. : milestone, 15525000,
tracing (15.307 s) : 15307000, 15307000
. : milestone, 15307000,
section candidate
no_agent (15.36 s) : 15360000, 15360000
. : milestone, 15360000,
appsec (15.328 s) : 15328000, 15328000
. : milestone, 15328000,
iast (18.647 s) : 18647000, 18647000
. : milestone, 18647000,
iast_GLOBAL (18.143 s) : 18143000, 18143000
. : milestone, 18143000,
profiling (15.164 s) : 15164000, 15164000
. : milestone, 15164000,
tracing (14.902 s) : 14902000, 14902000
. : milestone, 14902000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~d1f0038212, baseline=1.40.0-SNAPSHOT~5ca0c5bab6
dateFormat X
axisFormat %s
section baseline
no_agent (1.463 ms) : 1452, 1475
. : milestone, 1463,
appsec (2.312 ms) : 2272, 2353
. : milestone, 2312,
iast (2.06 ms) : 2010, 2110
. : milestone, 2060,
iast_GLOBAL (2.088 ms) : 2037, 2138
. : milestone, 2088,
profiling (1.915 ms) : 1876, 1954
. : milestone, 1915,
tracing (1.893 ms) : 1855, 1931
. : milestone, 1893,
section candidate
no_agent (1.463 ms) : 1451, 1474
. : milestone, 1463,
appsec (2.309 ms) : 2269, 2350
. : milestone, 2309,
iast (2.064 ms) : 2014, 2115
. : milestone, 2064,
iast_GLOBAL (2.101 ms) : 2050, 2153
. : milestone, 2101,
profiling (2.419 ms) : 2229, 2608
. : milestone, 2419,
tracing (1.893 ms) : 1855, 1931
. : milestone, 1893,
|
dd-java-agent/agent-iast/src/test/groovy/com/datadog/iast/propagation/StringModuleTest.groovy
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-iast/src/test/groovy/com/datadog/iast/propagation/StringModuleTest.groovy
Outdated
Show resolved
Hide resolved
...g-11/src/test/groovy/datadog/trace/instrumentation/java/lang/jdk11/StringCallSiteTest.groovy
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A couple of minor issues and we're good to go.
dd-java-agent/agent-iast/src/main/java/com/datadog/iast/propagation/StringModuleImpl.java
Outdated
Show resolved
Hide resolved
dd-java-agent/agent-iast/src/main/java/com/datadog/iast/propagation/StringModuleImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice one!
What Does This Do
This adds the instrumentation to propagate the taint values through the methods of
String
calledstrip
,stripLeading
andstripTrailing
. This method are only available from version 11 of Java.Motivation
Increase propagation of String methods
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: APPSEC-5757