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
Optimizations to check if string arrays can be tainted #6690
Merged
manuel-alvarez-alvarez
merged 3 commits into
master
from
malvarez/iast-can-be-tainted-optimization
Feb 16, 2024
Merged
Optimizations to check if string arrays can be tainted #6690
manuel-alvarez-alvarez
merged 3 commits into
master
from
malvarez/iast-can-be-tainted-optimization
Feb 16, 2024
Conversation
This file contains 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
manuel-alvarez-alvarez
added
tag: performance
Performance related changes
comp: asm iast
Application Security Management (IAST)
labels
Feb 16, 2024
smola
approved these changes
Feb 16, 2024
anderruiz
reviewed
Feb 16, 2024
dd-java-agent/agent-iast/src/main/java/com/datadog/iast/taint/Tainteds.java
Outdated
Show resolved
Hide resolved
anderruiz
reviewed
Feb 16, 2024
dd-java-agent/agent-iast/src/main/java/com/datadog/iast/taint/Tainteds.java
Outdated
Show resolved
Hide resolved
anderruiz
reviewed
Feb 16, 2024
dd-java-agent/agent-iast/src/main/java/com/datadog/iast/taint/Tainteds.java
Outdated
Show resolved
Hide resolved
anderruiz
approved these changes
Feb 16, 2024
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 5 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.31.0-SNAPSHOT~1da6317692, baseline=1.31.0-SNAPSHOT~167e8f7645
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1057311
Total [baseline] (9.152 s) : 0, 9152255
Agent [candidate] (1.056 s) : 0, 1056146
Total [candidate] (9.201 s) : 0, 9200636
section appsec
Agent [baseline] (1.151 s) : 0, 1150819
Total [baseline] (9.265 s) : 0, 9265414
Agent [candidate] (1.158 s) : 0, 1157955
Total [candidate] (9.337 s) : 0, 9336636
section iast
Agent [baseline] (1.183 s) : 0, 1183101
Total [baseline] (9.505 s) : 0, 9505388
Agent [candidate] (1.181 s) : 0, 1181031
Total [candidate] (9.432 s) : 0, 9432197
section profiling
Agent [baseline] (1.268 s) : 0, 1268264
Total [baseline] (9.365 s) : 0, 9365254
Agent [candidate] (1.271 s) : 0, 1271160
Total [candidate] (9.396 s) : 0, 9396270
gantt
title petclinic - break down per module: candidate=1.31.0-SNAPSHOT~1da6317692, baseline=1.31.0-SNAPSHOT~167e8f7645
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (668.193 ms) : 0, 668193
BytebuddyAgent [candidate] (666.284 ms) : 0, 666284
GlobalTracer [baseline] (294.823 ms) : 0, 294823
GlobalTracer [candidate] (295.548 ms) : 0, 295548
AppSec [baseline] (51.372 ms) : 0, 51372
AppSec [candidate] (51.748 ms) : 0, 51748
Remote Config [baseline] (709.541 µs) : 0, 710
Remote Config [candidate] (714.237 µs) : 0, 714
Telemetry [baseline] (7.676 ms) : 0, 7676
Telemetry [candidate] (7.616 ms) : 0, 7616
section appsec
BytebuddyAgent [baseline] (664.056 ms) : 0, 664056
BytebuddyAgent [candidate] (667.974 ms) : 0, 667974
GlobalTracer [baseline] (294.245 ms) : 0, 294245
GlobalTracer [candidate] (296.881 ms) : 0, 296881
AppSec [baseline] (150.831 ms) : 0, 150831
AppSec [candidate] (151.142 ms) : 0, 151142
Remote Config [baseline] (635.028 µs) : 0, 635
Remote Config [candidate] (641.492 µs) : 0, 641
Telemetry [baseline] (6.84 ms) : 0, 6840
Telemetry [candidate] (6.868 ms) : 0, 6868
section iast
BytebuddyAgent [baseline] (780.729 ms) : 0, 780729
BytebuddyAgent [candidate] (776.683 ms) : 0, 776683
GlobalTracer [baseline] (287.955 ms) : 0, 287955
GlobalTracer [candidate] (287.033 ms) : 0, 287033
AppSec [baseline] (50.098 ms) : 0, 50098
AppSec [candidate] (50.137 ms) : 0, 50137
Remote Config [baseline] (602.808 µs) : 0, 603
Remote Config [candidate] (615.912 µs) : 0, 616
Telemetry [baseline] (6.769 ms) : 0, 6769
Telemetry [candidate] (6.585 ms) : 0, 6585
IAST [baseline] (22.412 ms) : 0, 22412
IAST [candidate] (25.634 ms) : 0, 25634
section profiling
BytebuddyAgent [baseline] (659.296 ms) : 0, 659296
BytebuddyAgent [candidate] (661.3 ms) : 0, 661300
GlobalTracer [baseline] (378.42 ms) : 0, 378420
GlobalTracer [candidate] (379.223 ms) : 0, 379223
AppSec [baseline] (51.699 ms) : 0, 51699
AppSec [candidate] (51.863 ms) : 0, 51863
Remote Config [baseline] (659.331 µs) : 0, 659
Remote Config [candidate] (659.795 µs) : 0, 660
Telemetry [baseline] (7.529 ms) : 0, 7529
Telemetry [candidate] (7.565 ms) : 0, 7565
ProfilingAgent [baseline] (116.03 ms) : 0, 116030
ProfilingAgent [candidate] (115.904 ms) : 0, 115904
Profiling [baseline] (116.055 ms) : 0, 116055
Profiling [candidate] (115.93 ms) : 0, 115930
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 14 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~1da6317692, baseline=1.31.0-SNAPSHOT~167e8f7645
dateFormat X
axisFormat %s
section baseline
no_agent (1.343 ms) : 1324, 1362
. : milestone, 1343,
appsec (1.8 ms) : 1775, 1824
. : milestone, 1800,
iast (1.511 ms) : 1487, 1534
. : milestone, 1511,
profiling (1.55 ms) : 1526, 1574
. : milestone, 1550,
tracing (1.528 ms) : 1504, 1551
. : milestone, 1528,
section candidate
no_agent (1.341 ms) : 1322, 1360
. : milestone, 1341,
appsec (1.81 ms) : 1786, 1834
. : milestone, 1810,
iast (1.536 ms) : 1511, 1560
. : milestone, 1536,
profiling (1.548 ms) : 1524, 1571
. : milestone, 1548,
tracing (1.508 ms) : 1484, 1531
. : milestone, 1508,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~1da6317692, baseline=1.31.0-SNAPSHOT~167e8f7645
dateFormat X
axisFormat %s
section baseline
no_agent (367.208 µs) : 346, 389
. : milestone, 367,
iast (475.781 µs) : 455, 497
. : milestone, 476,
iast_FULL (534.986 µs) : 515, 555
. : milestone, 535,
iast_GLOBAL (494.725 µs) : 474, 515
. : milestone, 495,
iast_HARDCODED_SECRET_DISABLED (482.103 µs) : 461, 503
. : milestone, 482,
iast_INACTIVE (445.868 µs) : 426, 466
. : milestone, 446,
iast_TELEMETRY_OFF (472.432 µs) : 452, 493
. : milestone, 472,
tracing (448.164 µs) : 427, 469
. : milestone, 448,
section candidate
no_agent (364.836 µs) : 345, 384
. : milestone, 365,
iast (471.343 µs) : 451, 492
. : milestone, 471,
iast_FULL (534.642 µs) : 514, 555
. : milestone, 535,
iast_GLOBAL (495.317 µs) : 475, 516
. : milestone, 495,
iast_HARDCODED_SECRET_DISABLED (476.379 µs) : 455, 497
. : milestone, 476,
iast_INACTIVE (452.163 µs) : 431, 473
. : milestone, 452,
iast_TELEMETRY_OFF (470.08 µs) : 449, 491
. : milestone, 470,
tracing (446.17 µs) : 426, 466
. : milestone, 446,
|
manuel-alvarez-alvarez
deleted the
malvarez/iast-can-be-tainted-optimization
branch
February 16, 2024 13:13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Creates an specialized version of the
canBeTainted
method working withString
instead ofCharSequence
Motivation
In some JVM implementation the difference between
invokevirtual
andinvokeinterface
for this method is noticeable making it worth it to have an specialized version.