-
Notifications
You must be signed in to change notification settings - Fork 293
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
Fix NPE in IAST evidence redaction #6099
Merged
Merged
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
When serializing vulnerability evidence, we could trigger an NPE when the data source has no value (e.g. this happens with request body as source).
anderruiz
approved these changes
Oct 25, 2023
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 cases. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.22.0-SNAPSHOT~b9b32a0de1, baseline=1.22.0-SNAPSHOT~4b83850f24
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.029 s) : 0, 1028674
Total [baseline] (8.733 s) : 0, 8732769
Agent [candidate] (1.036 s) : 0, 1036362
Total [candidate] (8.71 s) : 0, 8710127
section iast
Agent [baseline] (1.146 s) : 0, 1146395
Total [baseline] (9.232 s) : 0, 9232150
Agent [candidate] (1.148 s) : 0, 1147602
Total [candidate] (9.233 s) : 0, 9232655
section iast_TELEMETRY_OFF
Agent [baseline] (1.137 s) : 0, 1136866
Total [baseline] (9.189 s) : 0, 9188553
Agent [candidate] (1.14 s) : 0, 1140097
Total [candidate] (9.203 s) : 0, 9202842
gantt
title insecure-bank - break down per module: candidate=1.22.0-SNAPSHOT~b9b32a0de1, baseline=1.22.0-SNAPSHOT~4b83850f24
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (642.711 ms) : 0, 642711
BytebuddyAgent [candidate] (647.358 ms) : 0, 647358
GlobalTracer [baseline] (294.999 ms) : 0, 294999
GlobalTracer [candidate] (297.464 ms) : 0, 297464
AppSec [baseline] (49.492 ms) : 0, 49492
AppSec [candidate] (49.82 ms) : 0, 49820
Remote Config [baseline] (710.459 µs) : 0, 710
Remote Config [candidate] (696.666 µs) : 0, 697
Telemetry [baseline] (6.123 ms) : 0, 6123
Telemetry [candidate] (6.175 ms) : 0, 6175
section iast
BytebuddyAgent [baseline] (766.876 ms) : 0, 766876
BytebuddyAgent [candidate] (767.274 ms) : 0, 767274
GlobalTracer [baseline] (271.281 ms) : 0, 271281
GlobalTracer [candidate] (272.161 ms) : 0, 272161
AppSec [baseline] (49.252 ms) : 0, 49252
AppSec [candidate] (47.561 ms) : 0, 47561
IAST [baseline] (15.821 ms) : 0, 15821
IAST [candidate] (18.835 ms) : 0, 18835
Remote Config [baseline] (579.153 µs) : 0, 579
Remote Config [candidate] (589.364 µs) : 0, 589
Telemetry [baseline] (8.213 ms) : 0, 8213
Telemetry [candidate] (6.79 ms) : 0, 6790
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (760.15 ms) : 0, 760150
BytebuddyAgent [candidate] (761.971 ms) : 0, 761971
GlobalTracer [baseline] (271.653 ms) : 0, 271653
GlobalTracer [candidate] (272.81 ms) : 0, 272810
AppSec [baseline] (45.878 ms) : 0, 45878
AppSec [candidate] (46.455 ms) : 0, 46455
IAST [baseline] (17.516 ms) : 0, 17516
IAST [candidate] (14.934 ms) : 0, 14934
Remote Config [baseline] (599.911 µs) : 0, 600
Remote Config [candidate] (556.044 µs) : 0, 556
Telemetry [baseline] (6.758 ms) : 0, 6758
Telemetry [candidate] (8.925 ms) : 0, 8925
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.22.0-SNAPSHOT~b9b32a0de1, baseline=1.22.0-SNAPSHOT~4b83850f24
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1020556
Total [baseline] (9.215 s) : 0, 9214974
Agent [candidate] (1.025 s) : 0, 1024538
Total [candidate] (9.306 s) : 0, 9306062
section appsec
Agent [baseline] (1.12 s) : 0, 1119723
Total [baseline] (9.319 s) : 0, 9319007
Agent [candidate] (1.109 s) : 0, 1108960
Total [candidate] (9.316 s) : 0, 9315616
section iast
Agent [baseline] (1.144 s) : 0, 1144460
Total [baseline] (9.436 s) : 0, 9436308
Agent [candidate] (1.147 s) : 0, 1147260
Total [candidate] (9.44 s) : 0, 9439645
section profiling
Agent [baseline] (1.203 s) : 0, 1203170
Total [baseline] (9.556 s) : 0, 9556060
Agent [candidate] (1.197 s) : 0, 1196611
Total [candidate] (9.508 s) : 0, 9507578
gantt
title petclinic - break down per module: candidate=1.22.0-SNAPSHOT~b9b32a0de1, baseline=1.22.0-SNAPSHOT~4b83850f24
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (637.257 ms) : 0, 637257
BytebuddyAgent [candidate] (638.493 ms) : 0, 638493
GlobalTracer [baseline] (292.853 ms) : 0, 292853
GlobalTracer [candidate] (295.604 ms) : 0, 295604
AppSec [baseline] (49.279 ms) : 0, 49279
AppSec [candidate] (49.32 ms) : 0, 49320
Remote Config [baseline] (686.279 µs) : 0, 686
Remote Config [candidate] (678.081 µs) : 0, 678
Telemetry [baseline] (6.105 ms) : 0, 6105
Telemetry [candidate] (6.177 ms) : 0, 6177
section appsec
BytebuddyAgent [baseline] (643.989 ms) : 0, 643989
BytebuddyAgent [candidate] (638.217 ms) : 0, 638217
GlobalTracer [baseline] (296.029 ms) : 0, 296029
GlobalTracer [candidate] (292.176 ms) : 0, 292176
AppSec [baseline] (138.685 ms) : 0, 138685
AppSec [candidate] (137.959 ms) : 0, 137959
Remote Config [baseline] (654.648 µs) : 0, 655
Remote Config [candidate] (643.673 µs) : 0, 644
Telemetry [baseline] (5.792 ms) : 0, 5792
Telemetry [candidate] (5.698 ms) : 0, 5698
section iast
BytebuddyAgent [baseline] (766.323 ms) : 0, 766323
BytebuddyAgent [candidate] (768.129 ms) : 0, 768129
GlobalTracer [baseline] (271.792 ms) : 0, 271792
GlobalTracer [candidate] (272.387 ms) : 0, 272387
AppSec [baseline] (46.991 ms) : 0, 46991
AppSec [candidate] (46.782 ms) : 0, 46782
IAST [baseline] (16.727 ms) : 0, 16727
IAST [candidate] (17.993 ms) : 0, 17993
Remote Config [baseline] (589.334 µs) : 0, 589
Remote Config [candidate] (586.163 µs) : 0, 586
Telemetry [baseline] (7.621 ms) : 0, 7621
Telemetry [candidate] (6.896 ms) : 0, 6896
section profiling
BytebuddyAgent [baseline] (654.238 ms) : 0, 654238
BytebuddyAgent [candidate] (650.35 ms) : 0, 650350
GlobalTracer [baseline] (357.832 ms) : 0, 357832
GlobalTracer [candidate] (356.347 ms) : 0, 356347
AppSec [baseline] (49.635 ms) : 0, 49635
AppSec [candidate] (49.163 ms) : 0, 49163
Remote Config [baseline] (646.737 µs) : 0, 647
Remote Config [candidate] (645.321 µs) : 0, 645
Telemetry [baseline] (6.052 ms) : 0, 6052
Telemetry [candidate] (6.045 ms) : 0, 6045
ProfilingAgent [baseline] (81.025 ms) : 0, 81025
ProfilingAgent [candidate] (80.72 ms) : 0, 80720
Profiling [baseline] (81.05 ms) : 0, 81050
Profiling [candidate] (80.744 ms) : 0, 80744
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.22.0-SNAPSHOT~b9b32a0de1, baseline=1.22.0-SNAPSHOT~4b83850f24
dateFormat X
axisFormat %s
section baseline
no_agent (365.026 µs) : 345, 385
. : milestone, 365,
iast (461.442 µs) : 440, 482
. : milestone, 461,
iast_FULL (516.047 µs) : 495, 537
. : milestone, 516,
iast_INACTIVE (428.319 µs) : 407, 449
. : milestone, 428,
iast_TELEMETRY_OFF (451.448 µs) : 429, 473
. : milestone, 451,
tracing (426.483 µs) : 406, 447
. : milestone, 426,
section candidate
no_agent (356.651 µs) : 337, 376
. : milestone, 357,
iast (457.201 µs) : 437, 478
. : milestone, 457,
iast_FULL (524.248 µs) : 504, 545
. : milestone, 524,
iast_INACTIVE (429.333 µs) : 409, 450
. : milestone, 429,
iast_TELEMETRY_OFF (455.689 µs) : 435, 477
. : milestone, 456,
tracing (427.274 µs) : 407, 448
. : milestone, 427,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.22.0-SNAPSHOT~b9b32a0de1, baseline=1.22.0-SNAPSHOT~4b83850f24
dateFormat X
axisFormat %s
section baseline
no_agent (1.331 ms) : 1312, 1350
. : milestone, 1331,
appsec (1.712 ms) : 1688, 1736
. : milestone, 1712,
iast (1.455 ms) : 1431, 1479
. : milestone, 1455,
profiling (1.459 ms) : 1433, 1485
. : milestone, 1459,
tracing (1.465 ms) : 1441, 1490
. : milestone, 1465,
section candidate
no_agent (1.332 ms) : 1313, 1351
. : milestone, 1332,
appsec (1.707 ms) : 1682, 1731
. : milestone, 1707,
iast (1.467 ms) : 1443, 1491
. : milestone, 1467,
profiling (1.469 ms) : 1445, 1493
. : milestone, 1469,
tracing (1.448 ms) : 1424, 1472
. : milestone, 1448,
|
manuel-alvarez-alvarez
approved these changes
Oct 25, 2023
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
When serializing vulnerability evidence, we could trigger an NPE when the data source has no value (e.g. this happens with request body as source). The end result is losing these vulnerabilities.
Motivation
Additional Notes
Jira ticket: APPSEC-11847