Add freemarker.template.utility.StringUtil tainting support#5645
Merged
jandro996 merged 4 commits intoAug 18, 2023
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 2 performance improvements and 0 performance regressions! Performance is the same for 60 cases.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.20.0-SNAPSHOT~90a8300a38, baseline=1.20.0-SNAPSHOT~aed58b8056
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (993.006 ms) : 0, 993006
Total [baseline] (9.248 s) : 0, 9247747
Agent [candidate] (992.925 ms) : 0, 992925
Total [candidate] (9.201 s) : 0, 9201007
section appsec
Agent [baseline] (1.069 s) : 0, 1069408
Total [baseline] (9.307 s) : 0, 9307316
Agent [candidate] (1.07 s) : 0, 1070468
Total [candidate] (9.228 s) : 0, 9227917
section iast
Agent [baseline] (1.086 s) : 0, 1086133
Total [baseline] (9.385 s) : 0, 9385033
Agent [candidate] (1.093 s) : 0, 1092617
Total [candidate] (9.41 s) : 0, 9410221
section profiling
Agent [baseline] (1.16 s) : 0, 1160448
Total [baseline] (9.52 s) : 0, 9519753
Agent [candidate] (1.156 s) : 0, 1156206
Total [candidate] (9.42 s) : 0, 9419779
gantt
title petclinic - break down per module: candidate=1.20.0-SNAPSHOT~90a8300a38, baseline=1.20.0-SNAPSHOT~aed58b8056
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (615.657 ms) : 0, 615657
BytebuddyAgent [candidate] (614.491 ms) : 0, 614491
GlobalTracer [baseline] (285.828 ms) : 0, 285828
GlobalTracer [candidate] (286.995 ms) : 0, 286995
AppSec [baseline] (50.267 ms) : 0, 50267
AppSec [candidate] (50.419 ms) : 0, 50419
Remote Config [baseline] (666.565 µs) : 0, 667
Remote Config [candidate] (662.455 µs) : 0, 662
Telemetry [baseline] (6.024 ms) : 0, 6024
Telemetry [candidate] (5.998 ms) : 0, 5998
section appsec
BytebuddyAgent [baseline] (610.362 ms) : 0, 610362
BytebuddyAgent [candidate] (610.442 ms) : 0, 610442
GlobalTracer [baseline] (283.004 ms) : 0, 283004
GlobalTracer [candidate] (283.967 ms) : 0, 283967
AppSec [baseline] (135.31 ms) : 0, 135310
AppSec [candidate] (135.361 ms) : 0, 135361
Remote Config [baseline] (750.578 µs) : 0, 751
Remote Config [candidate] (737.129 µs) : 0, 737
Telemetry [baseline] (5.726 ms) : 0, 5726
Telemetry [candidate] (5.718 ms) : 0, 5718
section iast
BytebuddyAgent [baseline] (713.877 ms) : 0, 713877
BytebuddyAgent [candidate] (718.715 ms) : 0, 718715
GlobalTracer [baseline] (270.734 ms) : 0, 270734
GlobalTracer [candidate] (272.116 ms) : 0, 272116
AppSec [baseline] (46.51 ms) : 0, 46510
AppSec [candidate] (46.886 ms) : 0, 46886
Remote Config [baseline] (624.575 µs) : 0, 625
Remote Config [candidate] (567.178 µs) : 0, 567
Telemetry [baseline] (5.817 ms) : 0, 5817
Telemetry [candidate] (5.774 ms) : 0, 5774
IAST [baseline] (14.341 ms) : 0, 14341
IAST [candidate] (14.107 ms) : 0, 14107
section profiling
BytebuddyAgent [baseline] (623.795 ms) : 0, 623795
BytebuddyAgent [candidate] (621.753 ms) : 0, 621753
GlobalTracer [baseline] (349.044 ms) : 0, 349044
GlobalTracer [candidate] (348.904 ms) : 0, 348904
AppSec [baseline] (49.485 ms) : 0, 49485
AppSec [candidate] (49.195 ms) : 0, 49195
Remote Config [baseline] (660.008 µs) : 0, 660
Remote Config [candidate] (664.188 µs) : 0, 664
Telemetry [baseline] (5.913 ms) : 0, 5913
Telemetry [candidate] (5.93 ms) : 0, 5930
ProfilingAgent [baseline] (78.519 ms) : 0, 78519
ProfilingAgent [candidate] (76.957 ms) : 0, 76957
Profiling [baseline] (78.544 ms) : 0, 78544
Profiling [candidate] (76.981 ms) : 0, 76981
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.20.0-SNAPSHOT~90a8300a38, baseline=1.20.0-SNAPSHOT~aed58b8056
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (990.458 ms) : 0, 990458
Total [baseline] (8.638 s) : 0, 8637963
Agent [candidate] (984.598 ms) : 0, 984598
Total [candidate] (8.647 s) : 0, 8647368
section appsec
Agent [baseline] (1.07 s) : 0, 1070109
Total [baseline] (8.695 s) : 0, 8695097
Agent [candidate] (1.07 s) : 0, 1069652
Total [candidate] (8.727 s) : 0, 8726541
section iast
Agent [baseline] (1.084 s) : 0, 1083528
Total [baseline] (9.142 s) : 0, 9141823
Agent [candidate] (1.087 s) : 0, 1087436
Total [candidate] (9.137 s) : 0, 9137221
section profiling
Agent [baseline] (1.153 s) : 0, 1153400
Total [baseline] (8.861 s) : 0, 8861406
Agent [candidate] (1.162 s) : 0, 1162216
Total [candidate] (8.856 s) : 0, 8855561
gantt
title insecure-bank - break down per module: candidate=1.20.0-SNAPSHOT~90a8300a38, baseline=1.20.0-SNAPSHOT~aed58b8056
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (614.588 ms) : 0, 614588
BytebuddyAgent [candidate] (610.212 ms) : 0, 610212
GlobalTracer [baseline] (284.855 ms) : 0, 284855
GlobalTracer [candidate] (283.439 ms) : 0, 283439
AppSec [baseline] (49.793 ms) : 0, 49793
AppSec [candidate] (50.056 ms) : 0, 50056
Remote Config [baseline] (664.93 µs) : 0, 665
Remote Config [candidate] (658.725 µs) : 0, 659
Telemetry [baseline] (6.03 ms) : 0, 6030
Telemetry [candidate] (5.936 ms) : 0, 5936
section appsec
BytebuddyAgent [baseline] (610.548 ms) : 0, 610548
BytebuddyAgent [candidate] (609.77 ms) : 0, 609770
GlobalTracer [baseline] (283.859 ms) : 0, 283859
GlobalTracer [candidate] (283.82 ms) : 0, 283820
AppSec [baseline] (134.883 ms) : 0, 134883
AppSec [candidate] (135.356 ms) : 0, 135356
Remote Config [baseline] (729.059 µs) : 0, 729
Remote Config [candidate] (718.912 µs) : 0, 719
Telemetry [baseline] (5.725 ms) : 0, 5725
Telemetry [candidate] (5.726 ms) : 0, 5726
section iast
BytebuddyAgent [baseline] (712.305 ms) : 0, 712305
BytebuddyAgent [candidate] (714.733 ms) : 0, 714733
GlobalTracer [baseline] (269.844 ms) : 0, 269844
GlobalTracer [candidate] (271.379 ms) : 0, 271379
AppSec [baseline] (46.379 ms) : 0, 46379
AppSec [candidate] (46.604 ms) : 0, 46604
Remote Config [baseline] (625.604 µs) : 0, 626
Remote Config [candidate] (558.142 µs) : 0, 558
Telemetry [baseline] (5.844 ms) : 0, 5844
Telemetry [candidate] (5.752 ms) : 0, 5752
IAST [baseline] (14.234 ms) : 0, 14234
IAST [candidate] (14.059 ms) : 0, 14059
section profiling
BytebuddyAgent [baseline] (621.967 ms) : 0, 621967
BytebuddyAgent [candidate] (627.29 ms) : 0, 627290
GlobalTracer [baseline] (347.917 ms) : 0, 347917
GlobalTracer [candidate] (350.723 ms) : 0, 350723
AppSec [baseline] (49.156 ms) : 0, 49156
AppSec [candidate] (49.271 ms) : 0, 49271
Remote Config [baseline] (655.881 µs) : 0, 656
Remote Config [candidate] (668.972 µs) : 0, 669
Telemetry [baseline] (5.879 ms) : 0, 5879
Telemetry [candidate] (5.974 ms) : 0, 5974
ProfilingAgent [baseline] (74.953 ms) : 0, 74953
ProfilingAgent [candidate] (75.104 ms) : 0, 75104
Profiling [baseline] (74.978 ms) : 0, 74978
Profiling [candidate] (75.128 ms) : 0, 75128
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 24 cases. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~90a8300a38, baseline=1.20.0-SNAPSHOT~aed58b8056
dateFormat X
axisFormat %s
section baseline
no_agent (1.304 ms) : 1285, 1323
. : milestone, 1304,
appsec (1.675 ms) : 1650, 1699
. : milestone, 1675,
iast (1.435 ms) : 1411, 1460
. : milestone, 1435,
profiling (1.466 ms) : 1442, 1490
. : milestone, 1466,
tracing (1.44 ms) : 1416, 1463
. : milestone, 1440,
section candidate
no_agent (1.306 ms) : 1287, 1325
. : milestone, 1306,
appsec (1.678 ms) : 1654, 1703
. : milestone, 1678,
iast (1.44 ms) : 1416, 1464
. : milestone, 1440,
profiling (1.473 ms) : 1445, 1500
. : milestone, 1473,
tracing (1.453 ms) : 1429, 1477
. : milestone, 1453,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~90a8300a38, baseline=1.20.0-SNAPSHOT~aed58b8056
dateFormat X
axisFormat %s
section baseline
no_agent (356.193 µs) : 337, 376
. : milestone, 356,
appsec (653.687 µs) : 633, 674
. : milestone, 654,
iast (456.512 µs) : 435, 478
. : milestone, 457,
iast_FULL (513.248 µs) : 493, 534
. : milestone, 513,
iast_INACTIVE (430.229 µs) : 409, 451
. : milestone, 430,
profiling (430.896 µs) : 410, 451
. : milestone, 431,
tracing (429.489 µs) : 409, 450
. : milestone, 429,
section candidate
no_agent (359.863 µs) : 340, 379
. : milestone, 360,
appsec (661.122 µs) : 640, 682
. : milestone, 661,
iast (448.816 µs) : 428, 469
. : milestone, 449,
iast_FULL (516.329 µs) : 496, 537
. : milestone, 516,
iast_INACTIVE (433.948 µs) : 413, 455
. : milestone, 434,
profiling (438.708 µs) : 418, 460
. : milestone, 439,
tracing (422.533 µs) : 402, 443
. : milestone, 423,
|
jandro996
marked this pull request as ready for review
August 16, 2023 06:42
jandro996
force-pushed
the
alejandro.gonzalez/freemarker_escape_taint_traking
branch
from
August 17, 2023 07:01
509843c to
fb16140
Compare
smola
requested changes
Aug 17, 2023
smola
approved these changes
Aug 17, 2023
jandro996
force-pushed
the
alejandro.gonzalez/freemarker_escape_taint_traking
branch
from
August 18, 2023 07:49
1252fd2 to
421b5be
Compare
jandro996
deleted the
alejandro.gonzalez/freemarker_escape_taint_traking
branch
August 18, 2023 10:49
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.
What Does This Do
Add tainting support to:
freemarker.template.utility.StringUtil#HTMLEnc
freemarker.template.utility.StringUtil#XMLEnc
freemarker.template.utility.StringUtil#XHTMLEnc
freemarker.template.utility.StringUtil#javaStringEnc
freemarker.template.utility.StringUtil#javaScriptStringEnc
freemarker.template.utility.StringUtil#jsonStringEnc
Motivation
Additional Notes