-
Notifications
You must be signed in to change notification settings - Fork 309
Fix NPE in AppSecConfigServiceImpl #9165
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 AppSecConfigServiceImpl #9165
Conversation
e219fd4
to
0684458
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.004 s) : 0, 1003611
Total [baseline] (10.64 s) : 0, 10639579
Agent [candidate] (994.12 ms) : 0, 994120
Total [candidate] (10.675 s) : 0, 10674975
section appsec
Agent [baseline] (1.173 s) : 0, 1173324
Total [baseline] (10.787 s) : 0, 10786637
Agent [candidate] (1.178 s) : 0, 1177560
Total [candidate] (10.82 s) : 0, 10820269
section iast
Agent [baseline] (1.131 s) : 0, 1131476
Total [baseline] (10.831 s) : 0, 10831124
Agent [candidate] (1.132 s) : 0, 1131685
Total [candidate] (10.831 s) : 0, 10831451
section profiling
Agent [baseline] (1.24 s) : 0, 1240357
Total [baseline] (10.964 s) : 0, 10964463
Agent [candidate] (1.246 s) : 0, 1245511
Total [candidate] (10.997 s) : 0, 10996688
gantt
title petclinic - break down per module: candidate=1.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (694.078 ms) : 0, 694078
BytebuddyAgent [candidate] (685.908 ms) : 0, 685908
GlobalTracer [baseline] (243.075 ms) : 0, 243075
GlobalTracer [candidate] (242.116 ms) : 0, 242116
AppSec [baseline] (30.462 ms) : 0, 30462
AppSec [candidate] (30.397 ms) : 0, 30397
Debugger [baseline] (6.029 ms) : 0, 6029
Debugger [candidate] (5.963 ms) : 0, 5963
Remote Config [baseline] (678.03 µs) : 0, 678
Remote Config [candidate] (673.684 µs) : 0, 674
Telemetry [baseline] (8.231 ms) : 0, 8231
Telemetry [candidate] (8.209 ms) : 0, 8209
section appsec
BytebuddyAgent [baseline] (708.422 ms) : 0, 708422
BytebuddyAgent [candidate] (710.353 ms) : 0, 710353
GlobalTracer [baseline] (234.833 ms) : 0, 234833
GlobalTracer [candidate] (235.927 ms) : 0, 235927
AppSec [baseline] (171.222 ms) : 0, 171222
AppSec [candidate] (172.366 ms) : 0, 172366
Debugger [baseline] (5.724 ms) : 0, 5724
Debugger [candidate] (5.778 ms) : 0, 5778
Remote Config [baseline] (608.197 µs) : 0, 608
Remote Config [candidate] (615.44 µs) : 0, 615
Telemetry [baseline] (7.997 ms) : 0, 7997
Telemetry [candidate] (8.122 ms) : 0, 8122
IAST [baseline] (23.573 ms) : 0, 23573
IAST [candidate] (23.464 ms) : 0, 23464
section iast
BytebuddyAgent [baseline] (805.992 ms) : 0, 805992
BytebuddyAgent [candidate] (805.867 ms) : 0, 805867
GlobalTracer [baseline] (232.748 ms) : 0, 232748
GlobalTracer [candidate] (232.746 ms) : 0, 232746
AppSec [baseline] (29.575 ms) : 0, 29575
AppSec [candidate] (29.116 ms) : 0, 29116
Debugger [baseline] (5.721 ms) : 0, 5721
Debugger [candidate] (5.738 ms) : 0, 5738
Remote Config [baseline] (578.179 µs) : 0, 578
Remote Config [candidate] (587.339 µs) : 0, 587
Telemetry [baseline] (7.891 ms) : 0, 7891
Telemetry [candidate] (7.862 ms) : 0, 7862
IAST [baseline] (28.191 ms) : 0, 28191
IAST [candidate] (28.922 ms) : 0, 28922
section profiling
BytebuddyAgent [baseline] (674.418 ms) : 0, 674418
BytebuddyAgent [candidate] (676.912 ms) : 0, 676912
GlobalTracer [baseline] (360.683 ms) : 0, 360683
GlobalTracer [candidate] (362.078 ms) : 0, 362078
AppSec [baseline] (31.69 ms) : 0, 31690
AppSec [candidate] (34.238 ms) : 0, 34238
Debugger [baseline] (10.906 ms) : 0, 10906
Debugger [candidate] (9.85 ms) : 0, 9850
Remote Config [baseline] (661.07 µs) : 0, 661
Remote Config [candidate] (663.867 µs) : 0, 664
Telemetry [baseline] (10.261 ms) : 0, 10261
Telemetry [candidate] (8.139 ms) : 0, 8139
ProfilingAgent [baseline] (103.164 ms) : 0, 103164
ProfilingAgent [candidate] (105.017 ms) : 0, 105017
Profiling [baseline] (103.188 ms) : 0, 103188
Profiling [candidate] (105.041 ms) : 0, 105041
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (998.687 ms) : 0, 998687
Total [baseline] (8.609 s) : 0, 8608515
Agent [candidate] (995.253 ms) : 0, 995253
Total [candidate] (8.587 s) : 0, 8586842
section iast
Agent [baseline] (1.131 s) : 0, 1130793
Total [baseline] (9.311 s) : 0, 9310841
Agent [candidate] (1.131 s) : 0, 1130699
Total [candidate] (9.324 s) : 0, 9324054
gantt
title insecure-bank - break down per module: candidate=1.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (689.541 ms) : 0, 689541
BytebuddyAgent [candidate] (686.255 ms) : 0, 686255
GlobalTracer [baseline] (242.745 ms) : 0, 242745
GlobalTracer [candidate] (242.569 ms) : 0, 242569
AppSec [baseline] (30.526 ms) : 0, 30526
AppSec [candidate] (30.677 ms) : 0, 30677
Debugger [baseline] (6.029 ms) : 0, 6029
Debugger [candidate] (5.976 ms) : 0, 5976
Remote Config [baseline] (684.319 µs) : 0, 684
Remote Config [candidate] (684.276 µs) : 0, 684
Telemetry [baseline] (8.269 ms) : 0, 8269
Telemetry [candidate] (8.23 ms) : 0, 8230
section iast
BytebuddyAgent [baseline] (805.177 ms) : 0, 805177
BytebuddyAgent [candidate] (805.23 ms) : 0, 805230
GlobalTracer [baseline] (232.835 ms) : 0, 232835
GlobalTracer [candidate] (232.351 ms) : 0, 232351
AppSec [baseline] (30.466 ms) : 0, 30466
AppSec [candidate] (28.307 ms) : 0, 28307
Debugger [baseline] (5.745 ms) : 0, 5745
Debugger [candidate] (7.503 ms) : 0, 7503
Remote Config [baseline] (582.564 µs) : 0, 583
Remote Config [candidate] (592.341 µs) : 0, 592
Telemetry [baseline] (7.93 ms) : 0, 7930
Telemetry [candidate] (7.882 ms) : 0, 7882
IAST [baseline] (27.286 ms) : 0, 27286
IAST [candidate] (28.036 ms) : 0, 28036
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 11 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section baseline
no_agent (4.379 ms) : 4330, 4428
. : milestone, 4379,
iast (9.394 ms) : 9237, 9550
. : milestone, 9394,
iast_FULL (13.841 ms) : 13568, 14114
. : milestone, 13841,
iast_GLOBAL (9.714 ms) : 9537, 9892
. : milestone, 9714,
profiling (8.783 ms) : 8650, 8916
. : milestone, 8783,
tracing (7.523 ms) : 7416, 7629
. : milestone, 7523,
section candidate
no_agent (4.374 ms) : 4325, 4423
. : milestone, 4374,
iast (9.141 ms) : 8992, 9291
. : milestone, 9141,
iast_FULL (14.446 ms) : 14155, 14737
. : milestone, 14446,
iast_GLOBAL (10.058 ms) : 9883, 10232
. : milestone, 10058,
profiling (8.902 ms) : 8754, 9050
. : milestone, 8902,
tracing (7.344 ms) : 7233, 7455
. : milestone, 7344,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section baseline
no_agent (37.677 ms) : 37372, 37982
. : milestone, 37677,
appsec (47.038 ms) : 46624, 47451
. : milestone, 47038,
code_origins (44.625 ms) : 44257, 44992
. : milestone, 44625,
iast (45.853 ms) : 45444, 46261
. : milestone, 45853,
profiling (49.483 ms) : 49006, 49960
. : milestone, 49483,
tracing (44.767 ms) : 44393, 45140
. : milestone, 44767,
section candidate
no_agent (37.942 ms) : 37636, 38248
. : milestone, 37942,
appsec (47.887 ms) : 47465, 48309
. : milestone, 47887,
code_origins (44.395 ms) : 44037, 44754
. : milestone, 44395,
iast (44.911 ms) : 44523, 45299
. : milestone, 44911,
profiling (48.222 ms) : 47777, 48667
. : milestone, 48222,
tracing (45.255 ms) : 44882, 45629
. : milestone, 45255,
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.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section baseline
no_agent (15.638 s) : 15638000, 15638000
. : milestone, 15638000,
appsec (14.753 s) : 14753000, 14753000
. : milestone, 14753000,
iast (18.708 s) : 18708000, 18708000
. : milestone, 18708000,
iast_GLOBAL (17.97 s) : 17970000, 17970000
. : milestone, 17970000,
profiling (15.314 s) : 15314000, 15314000
. : milestone, 15314000,
tracing (14.85 s) : 14850000, 14850000
. : milestone, 14850000,
section candidate
no_agent (15.467 s) : 15467000, 15467000
. : milestone, 15467000,
appsec (14.752 s) : 14752000, 14752000
. : milestone, 14752000,
iast (18.64 s) : 18640000, 18640000
. : milestone, 18640000,
iast_GLOBAL (18.367 s) : 18367000, 18367000
. : milestone, 18367000,
profiling (15.266 s) : 15266000, 15266000
. : milestone, 15266000,
tracing (14.633 s) : 14633000, 14633000
. : milestone, 14633000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~9a188f8669, baseline=1.52.0-SNAPSHOT~562e53388e
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (2.411 ms) : 2361, 2461
. : milestone, 2411,
iast (2.196 ms) : 2134, 2258
. : milestone, 2196,
iast_GLOBAL (2.248 ms) : 2184, 2311
. : milestone, 2248,
profiling (2.489 ms) : 2317, 2662
. : milestone, 2489,
tracing (2.027 ms) : 1978, 2075
. : milestone, 2027,
section candidate
no_agent (1.48 ms) : 1468, 1491
. : milestone, 1480,
appsec (2.42 ms) : 2370, 2470
. : milestone, 2420,
iast (2.205 ms) : 2143, 2267
. : milestone, 2205,
iast_GLOBAL (2.237 ms) : 2174, 2299
. : milestone, 2237,
profiling (2.058 ms) : 2007, 2109
. : milestone, 2058,
tracing (2.023 ms) : 1974, 2071
. : milestone, 2023,
|
0684458
to
c228fda
Compare
task :dd-java-agent:appsec:test is failing in all test_base |
91aba31
to
4668cfd
Compare
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!
@@ -320,6 +308,20 @@ private void distributeSubConfigurations( | |||
} | |||
} | |||
|
|||
private void maybeInitializeDefaultConfig() { |
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.
Suggestion: Maybe initializeDefaultConfigIfNeeded()
would be a better name here?
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.
The maybe
pattern looks to be used here and there among the code base.
Not sure where it comes from, but that seems to spread to both common parts (agent) and products.
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.
Yep, there are other examples even in the same class (e.g. maybeSubscribeConfigPolling
), I think it's better to leave it as it is for consistency.
Removing the second component to prevent duplicated entry from the changelog 😉 |
Thanks!, I was in doubt when I added it. |
4668cfd
to
dfd3d4a
Compare
dfd3d4a
to
9a188f8
Compare
What Does This Do
Fixes NPE in
AppSecConfigServiceImpl
when receiving RC payloads without being properly initialized.Motivation
In the last release
AppSecConfigServiceImpl
has been modified to be lazy initializable which is causing issues when receiving some RC payloads.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: [PROJ-IDENT]