-
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
Increase IAST propagation to StringBuilder append #8010
base: master
Are you sure you want to change the base?
Increase IAST propagation to StringBuilder append #8010
Conversation
…rinbBuilder.append with buffer
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 55 metrics, 7 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.087 s) : 0, 1087139
Total [baseline] (10.488 s) : 0, 10487877
Agent [candidate] (1.098 s) : 0, 1098109
Total [candidate] (10.42 s) : 0, 10419603
section appsec
Agent [baseline] (1.228 s) : 0, 1227579
Total [baseline] (10.727 s) : 0, 10727131
Agent [candidate] (1.223 s) : 0, 1223337
Total [candidate] (10.773 s) : 0, 10773428
section iast
Agent [baseline] (1.228 s) : 0, 1228327
Total [baseline] (10.952 s) : 0, 10952095
Agent [candidate] (1.218 s) : 0, 1218374
Total [candidate] (10.964 s) : 0, 10963750
section profiling
Agent [baseline] (1.314 s) : 0, 1313934
Total [baseline] (10.759 s) : 0, 10758628
Agent [candidate] (1.321 s) : 0, 1321117
Total [candidate] (10.811 s) : 0, 10810644
gantt
title petclinic - break down per module: candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (692.886 ms) : 0, 692886
BytebuddyAgent [candidate] (698.764 ms) : 0, 698764
GlobalTracer [baseline] (316.688 ms) : 0, 316688
GlobalTracer [candidate] (319.545 ms) : 0, 319545
AppSec [baseline] (54.648 ms) : 0, 54648
AppSec [candidate] (55.329 ms) : 0, 55329
Remote Config [baseline] (681.838 µs) : 0, 682
Remote Config [candidate] (685.227 µs) : 0, 685
Telemetry [baseline] (8.549 ms) : 0, 8549
Telemetry [candidate] (9.953 ms) : 0, 9953
section appsec
BytebuddyAgent [baseline] (711.409 ms) : 0, 711409
BytebuddyAgent [candidate] (710.371 ms) : 0, 710371
GlobalTracer [baseline] (316.085 ms) : 0, 316085
GlobalTracer [candidate] (313.873 ms) : 0, 313873
AppSec [baseline] (167.086 ms) : 0, 167086
AppSec [candidate] (165.228 ms) : 0, 165228
IAST [baseline] (20.815 ms) : 0, 20815
IAST [candidate] (19.772 ms) : 0, 19772
Remote Config [baseline] (650.28 µs) : 0, 650
Remote Config [candidate] (652.169 µs) : 0, 652
Telemetry [baseline] (8.234 ms) : 0, 8234
Telemetry [candidate] (9.623 ms) : 0, 9623
section iast
BytebuddyAgent [baseline] (818.8 ms) : 0, 818800
BytebuddyAgent [candidate] (810.906 ms) : 0, 810906
GlobalTracer [baseline] (308.371 ms) : 0, 308371
GlobalTracer [candidate] (305.989 ms) : 0, 305989
AppSec [baseline] (58.019 ms) : 0, 58019
AppSec [candidate] (58.329 ms) : 0, 58329
IAST [baseline] (20.982 ms) : 0, 20982
IAST [candidate] (21.219 ms) : 0, 21219
Remote Config [baseline] (651.434 µs) : 0, 651
Remote Config [candidate] (646.688 µs) : 0, 647
Telemetry [baseline] (7.552 ms) : 0, 7552
Telemetry [candidate] (7.559 ms) : 0, 7559
section profiling
BytebuddyAgent [baseline] (686.586 ms) : 0, 686586
BytebuddyAgent [candidate] (691.075 ms) : 0, 691075
GlobalTracer [baseline] (432.87 ms) : 0, 432870
GlobalTracer [candidate] (434.344 ms) : 0, 434344
AppSec [baseline] (53.693 ms) : 0, 53693
AppSec [candidate] (54.155 ms) : 0, 54155
Remote Config [baseline] (658.753 µs) : 0, 659
Remote Config [candidate] (669.558 µs) : 0, 670
Telemetry [baseline] (7.673 ms) : 0, 7673
Telemetry [candidate] (7.828 ms) : 0, 7828
ProfilingAgent [baseline] (93.538 ms) : 0, 93538
ProfilingAgent [candidate] (93.848 ms) : 0, 93848
Profiling [baseline] (93.561 ms) : 0, 93561
Profiling [candidate] (93.871 ms) : 0, 93871
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.095 s) : 0, 1094919
Total [baseline] (8.649 s) : 0, 8649500
Agent [candidate] (1.099 s) : 0, 1099019
Total [candidate] (8.687 s) : 0, 8687277
section iast
Agent [baseline] (1.215 s) : 0, 1215338
Total [baseline] (9.2 s) : 0, 9199607
Agent [candidate] (1.216 s) : 0, 1216049
Total [candidate] (9.242 s) : 0, 9241640
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.224 s) : 0, 1223899
Total [baseline] (9.177 s) : 0, 9177125
Agent [candidate] (1.228 s) : 0, 1228235
Total [candidate] (9.215 s) : 0, 9215369
section iast_TELEMETRY_OFF
Agent [baseline] (1.213 s) : 0, 1213182
Total [baseline] (9.186 s) : 0, 9186425
Agent [candidate] (1.219 s) : 0, 1219415
Total [candidate] (9.201 s) : 0, 9201081
gantt
title insecure-bank - break down per module: candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (697.977 ms) : 0, 697977
BytebuddyAgent [candidate] (699.241 ms) : 0, 699241
GlobalTracer [baseline] (318.732 ms) : 0, 318732
GlobalTracer [candidate] (320.464 ms) : 0, 320464
AppSec [baseline] (55.084 ms) : 0, 55084
AppSec [candidate] (55.549 ms) : 0, 55549
Remote Config [baseline] (688.624 µs) : 0, 689
Remote Config [candidate] (688.775 µs) : 0, 689
Telemetry [baseline] (8.61 ms) : 0, 8610
Telemetry [candidate] (9.259 ms) : 0, 9259
section iast
BytebuddyAgent [baseline] (810.249 ms) : 0, 810249
BytebuddyAgent [candidate] (809.832 ms) : 0, 809832
GlobalTracer [baseline] (304.885 ms) : 0, 304885
GlobalTracer [candidate] (305.605 ms) : 0, 305605
AppSec [baseline] (57.726 ms) : 0, 57726
AppSec [candidate] (58.015 ms) : 0, 58015
IAST [baseline] (20.653 ms) : 0, 20653
IAST [candidate] (20.759 ms) : 0, 20759
Remote Config [baseline] (623.388 µs) : 0, 623
Remote Config [candidate] (633.515 µs) : 0, 634
Telemetry [baseline] (7.501 ms) : 0, 7501
Telemetry [candidate] (7.478 ms) : 0, 7478
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (817.117 ms) : 0, 817117
BytebuddyAgent [candidate] (818.764 ms) : 0, 818764
GlobalTracer [baseline] (305.901 ms) : 0, 305901
GlobalTracer [candidate] (307.666 ms) : 0, 307666
AppSec [baseline] (57.228 ms) : 0, 57228
AppSec [candidate] (57.251 ms) : 0, 57251
IAST [baseline] (21.651 ms) : 0, 21651
IAST [candidate] (22.583 ms) : 0, 22583
Remote Config [baseline] (627.333 µs) : 0, 627
Remote Config [candidate] (616.623 µs) : 0, 617
Telemetry [baseline] (7.521 ms) : 0, 7521
Telemetry [candidate] (7.494 ms) : 0, 7494
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (807.889 ms) : 0, 807889
BytebuddyAgent [candidate] (809.512 ms) : 0, 809512
GlobalTracer [baseline] (305.352 ms) : 0, 305352
GlobalTracer [candidate] (308.638 ms) : 0, 308638
AppSec [baseline] (57.636 ms) : 0, 57636
AppSec [candidate] (56.293 ms) : 0, 56293
IAST [baseline] (20.566 ms) : 0, 20566
IAST [candidate] (23.222 ms) : 0, 23222
Remote Config [baseline] (609.85 µs) : 0, 610
Remote Config [candidate] (647.915 µs) : 0, 648
Telemetry [baseline] (7.411 ms) : 0, 7411
Telemetry [candidate] (7.391 ms) : 0, 7391
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 13 metrics, 15 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section baseline
no_agent (1.368 ms) : 1349, 1388
. : milestone, 1368,
appsec (1.764 ms) : 1740, 1788
. : milestone, 1764,
appsec_no_iast (1.741 ms) : 1716, 1767
. : milestone, 1741,
iast (1.508 ms) : 1485, 1531
. : milestone, 1508,
profiling (1.529 ms) : 1505, 1554
. : milestone, 1529,
tracing (1.511 ms) : 1487, 1535
. : milestone, 1511,
section candidate
no_agent (1.38 ms) : 1360, 1399
. : milestone, 1380,
appsec (1.759 ms) : 1734, 1783
. : milestone, 1759,
appsec_no_iast (1.746 ms) : 1720, 1772
. : milestone, 1746,
iast (1.497 ms) : 1474, 1520
. : milestone, 1497,
profiling (1.519 ms) : 1496, 1542
. : milestone, 1519,
tracing (1.497 ms) : 1473, 1522
. : milestone, 1497,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section baseline
no_agent (380.833 µs) : 361, 401
. : milestone, 381,
iast (497.714 µs) : 476, 520
. : milestone, 498,
iast_FULL (654.225 µs) : 633, 676
. : milestone, 654,
iast_GLOBAL (529.28 µs) : 506, 552
. : milestone, 529,
iast_HARDCODED_SECRET_DISABLED (504.167 µs) : 482, 526
. : milestone, 504,
iast_INACTIVE (457.365 µs) : 436, 479
. : milestone, 457,
iast_TELEMETRY_OFF (494.127 µs) : 472, 516
. : milestone, 494,
tracing (459.68 µs) : 438, 481
. : milestone, 460,
section candidate
no_agent (381.396 µs) : 362, 401
. : milestone, 381,
iast (501.83 µs) : 480, 524
. : milestone, 502,
iast_FULL (652.871 µs) : 631, 674
. : milestone, 653,
iast_GLOBAL (526.561 µs) : 505, 548
. : milestone, 527,
iast_HARDCODED_SECRET_DISABLED (494.837 µs) : 474, 516
. : milestone, 495,
iast_INACTIVE (455.873 µs) : 435, 477
. : milestone, 456,
iast_TELEMETRY_OFF (482.225 µs) : 461, 504
. : milestone, 482,
tracing (451.889 µs) : 431, 473
. : milestone, 452,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (2.346 ms) : 2304, 2388
. : milestone, 2346,
iast (2.092 ms) : 2040, 2144
. : milestone, 2092,
iast_GLOBAL (2.128 ms) : 2075, 2181
. : milestone, 2128,
profiling (1.952 ms) : 1910, 1994
. : milestone, 1952,
tracing (1.93 ms) : 1890, 1971
. : milestone, 1930,
section candidate
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (2.343 ms) : 2302, 2384
. : milestone, 2343,
iast (2.094 ms) : 2042, 2146
. : milestone, 2094,
iast_GLOBAL (2.132 ms) : 2079, 2184
. : milestone, 2132,
profiling (1.961 ms) : 1919, 2003
. : milestone, 1961,
tracing (1.927 ms) : 1887, 1967
. : milestone, 1927,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.44.0-SNAPSHOT~e45b946d65, baseline=1.44.0-SNAPSHOT~7f91a3ecc2
dateFormat X
axisFormat %s
section baseline
no_agent (14.836 s) : 14836000, 14836000
. : milestone, 14836000,
appsec (14.965 s) : 14965000, 14965000
. : milestone, 14965000,
iast (18.607 s) : 18607000, 18607000
. : milestone, 18607000,
iast_GLOBAL (18.073 s) : 18073000, 18073000
. : milestone, 18073000,
profiling (15.654 s) : 15654000, 15654000
. : milestone, 15654000,
tracing (14.814 s) : 14814000, 14814000
. : milestone, 14814000,
section candidate
no_agent (14.645 s) : 14645000, 14645000
. : milestone, 14645000,
appsec (14.904 s) : 14904000, 14904000
. : milestone, 14904000,
iast (18.949 s) : 18949000, 18949000
. : milestone, 18949000,
iast_GLOBAL (17.698 s) : 17698000, 17698000
. : milestone, 17698000,
profiling (15.235 s) : 15235000, 15235000
. : milestone, 15235000,
tracing (14.914 s) : 14914000, 14914000
. : milestone, 14914000,
|
sb('123') | '==>456<==' | 0 | 3 | '123==>456<==' | ||
sb('==>123<==') | '==>456<==' | 0 | 3 | '==>123<====>456<==' | ||
sb('1==>234<==5==>678<==9') | 'a==>bcd<==e' | 0 | 5 | '1==>234<==5==>678<==9a==>bcd<==e' | ||
sb('1==>234<==5==>678<==9') | 'a==>bcd<==e==>fgh<==i' | 0 | 9 | '1==>234<==5==>678<==9a==>bcd<==e==>fgh<==i' |
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.
Add examples where start > 0
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.
I added more test cases where start > 0
and end < s.length
What Does This Do
This adds the instrumentation to propagate the taint values through the following methods of
StringBuilder
:append(CharSequence, int, int)
append(StringBuffer)
Motivation
Increase propagation of
StringBuilder
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-55358