Weak cipher detection in javax.crypto.KeyGenerator#5634
Merged
Conversation
manuel-alvarez-alvarez
approved these changes
Jul 29, 2023
smola
approved these changes
Aug 2, 2023
DDJavierSantos
force-pushed
the
jsantos/weak_cipher_KeyGenerator
branch
2 times, most recently
from
August 9, 2023 15:58
4bf4061 to
f927aa5
Compare
DDJavierSantos
force-pushed
the
jsantos/weak_cipher_KeyGenerator
branch
from
August 11, 2023 08:30
f927aa5 to
7cd7a38
Compare
manuel-alvarez-alvarez
approved these changes
Aug 11, 2023
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 cases. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.20.0-SNAPSHOT~bf4c342317, baseline=1.20.0-SNAPSHOT~995e9c41d8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (993.568 ms) : 0, 993568
Total [baseline] (8.667 s) : 0, 8666854
Agent [candidate] (994.931 ms) : 0, 994931
Total [candidate] (8.691 s) : 0, 8690651
section appsec
Agent [baseline] (1.072 s) : 0, 1071676
Total [baseline] (8.751 s) : 0, 8750562
Agent [candidate] (1.079 s) : 0, 1079102
Total [candidate] (8.743 s) : 0, 8743445
section iast
Agent [baseline] (1.089 s) : 0, 1089260
Total [baseline] (9.147 s) : 0, 9146834
Agent [candidate] (1.099 s) : 0, 1099041
Total [candidate] (9.178 s) : 0, 9177647
section profiling
Agent [baseline] (1.157 s) : 0, 1156554
Total [baseline] (8.845 s) : 0, 8844509
Agent [candidate] (1.165 s) : 0, 1165164
Total [candidate] (8.9 s) : 0, 8899783
gantt
title insecure-bank - break down per module: candidate=1.20.0-SNAPSHOT~bf4c342317, baseline=1.20.0-SNAPSHOT~995e9c41d8
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (615.876 ms) : 0, 615876
BytebuddyAgent [candidate] (616.964 ms) : 0, 616964
GlobalTracer [baseline] (286.24 ms) : 0, 286240
GlobalTracer [candidate] (286.406 ms) : 0, 286406
AppSec [baseline] (50.222 ms) : 0, 50222
AppSec [candidate] (50.291 ms) : 0, 50291
Remote Config [baseline] (668.06 µs) : 0, 668
Remote Config [candidate] (675.528 µs) : 0, 676
Telemetry [baseline] (6.006 ms) : 0, 6006
Telemetry [candidate] (6.053 ms) : 0, 6053
section appsec
BytebuddyAgent [baseline] (612.231 ms) : 0, 612231
BytebuddyAgent [candidate] (616.388 ms) : 0, 616388
GlobalTracer [baseline] (283.334 ms) : 0, 283334
GlobalTracer [candidate] (285.801 ms) : 0, 285801
AppSec [baseline] (135.384 ms) : 0, 135384
AppSec [candidate] (135.938 ms) : 0, 135938
Remote Config [baseline] (717.171 µs) : 0, 717
Remote Config [candidate] (752.512 µs) : 0, 753
Telemetry [baseline] (5.744 ms) : 0, 5744
Telemetry [candidate] (5.786 ms) : 0, 5786
section iast
BytebuddyAgent [baseline] (717.491 ms) : 0, 717491
BytebuddyAgent [candidate] (724.366 ms) : 0, 724366
GlobalTracer [baseline] (269.944 ms) : 0, 269944
GlobalTracer [candidate] (272.527 ms) : 0, 272527
AppSec [baseline] (47.24 ms) : 0, 47240
AppSec [candidate] (46.947 ms) : 0, 46947
IAST [baseline] (13.947 ms) : 0, 13947
IAST [candidate] (14.274 ms) : 0, 14274
Remote Config [baseline] (550.241 µs) : 0, 550
Remote Config [candidate] (579.024 µs) : 0, 579
Telemetry [baseline] (5.698 ms) : 0, 5698
Telemetry [candidate] (5.758 ms) : 0, 5758
section profiling
BytebuddyAgent [baseline] (623.182 ms) : 0, 623182
BytebuddyAgent [candidate] (629.288 ms) : 0, 629288
GlobalTracer [baseline] (346.931 ms) : 0, 346931
GlobalTracer [candidate] (350.028 ms) : 0, 350028
AppSec [baseline] (48.947 ms) : 0, 48947
AppSec [candidate] (49.433 ms) : 0, 49433
Remote Config [baseline] (647.313 µs) : 0, 647
Remote Config [candidate] (641.468 µs) : 0, 641
Telemetry [baseline] (6.025 ms) : 0, 6025
Telemetry [candidate] (5.973 ms) : 0, 5973
ProfilingAgent [baseline] (78.057 ms) : 0, 78057
ProfilingAgent [candidate] (76.631 ms) : 0, 76631
Profiling [baseline] (78.081 ms) : 0, 78081
Profiling [candidate] (76.655 ms) : 0, 76655
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.20.0-SNAPSHOT~bf4c342317, baseline=1.20.0-SNAPSHOT~995e9c41d8
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (990.185 ms) : 0, 990185
Total [baseline] (9.182 s) : 0, 9181703
Agent [candidate] (991.03 ms) : 0, 991030
Total [candidate] (9.169 s) : 0, 9169090
section appsec
Agent [baseline] (1.071 s) : 0, 1071436
Total [baseline] (9.297 s) : 0, 9297229
Agent [candidate] (1.073 s) : 0, 1073029
Total [candidate] (9.255 s) : 0, 9255306
section iast
Agent [baseline] (1.097 s) : 0, 1097420
Total [baseline] (9.516 s) : 0, 9516203
Agent [candidate] (1.092 s) : 0, 1092483
Total [candidate] (9.472 s) : 0, 9471645
section profiling
Agent [baseline] (1.158 s) : 0, 1158387
Total [baseline] (9.406 s) : 0, 9406043
Agent [candidate] (1.166 s) : 0, 1165708
Total [candidate] (9.441 s) : 0, 9440659
gantt
title petclinic - break down per module: candidate=1.20.0-SNAPSHOT~bf4c342317, baseline=1.20.0-SNAPSHOT~995e9c41d8
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (615.208 ms) : 0, 615208
BytebuddyAgent [candidate] (615.3 ms) : 0, 615300
GlobalTracer [baseline] (283.564 ms) : 0, 283564
GlobalTracer [candidate] (284.65 ms) : 0, 284650
AppSec [baseline] (50.258 ms) : 0, 50258
AppSec [candidate] (49.996 ms) : 0, 49996
Remote Config [baseline] (666.273 µs) : 0, 666
Remote Config [candidate] (662.54 µs) : 0, 663
Telemetry [baseline] (6.009 ms) : 0, 6009
Telemetry [candidate] (5.955 ms) : 0, 5955
section appsec
BytebuddyAgent [baseline] (612.133 ms) : 0, 612133
BytebuddyAgent [candidate] (612.699 ms) : 0, 612699
GlobalTracer [baseline] (283.186 ms) : 0, 283186
GlobalTracer [candidate] (284.323 ms) : 0, 284323
AppSec [baseline] (135.368 ms) : 0, 135368
AppSec [candidate] (135.294 ms) : 0, 135294
Remote Config [baseline] (727.873 µs) : 0, 728
Remote Config [candidate] (722.657 µs) : 0, 723
Telemetry [baseline] (5.751 ms) : 0, 5751
Telemetry [candidate] (5.725 ms) : 0, 5725
section iast
BytebuddyAgent [baseline] (723.423 ms) : 0, 723423
BytebuddyAgent [candidate] (718.194 ms) : 0, 718194
GlobalTracer [baseline] (271.664 ms) : 0, 271664
GlobalTracer [candidate] (272.351 ms) : 0, 272351
AppSec [baseline] (47.509 ms) : 0, 47509
AppSec [candidate] (47.152 ms) : 0, 47152
IAST [baseline] (14.053 ms) : 0, 14053
IAST [candidate] (14.248 ms) : 0, 14248
Remote Config [baseline] (555.784 µs) : 0, 556
Remote Config [candidate] (583.595 µs) : 0, 584
Telemetry [baseline] (5.704 ms) : 0, 5704
Telemetry [candidate] (5.829 ms) : 0, 5829
section profiling
BytebuddyAgent [baseline] (625.045 ms) : 0, 625045
BytebuddyAgent [candidate] (629.958 ms) : 0, 629958
GlobalTracer [baseline] (347.367 ms) : 0, 347367
GlobalTracer [candidate] (350.248 ms) : 0, 350248
AppSec [baseline] (49.04 ms) : 0, 49040
AppSec [candidate] (48.859 ms) : 0, 48859
Remote Config [baseline] (638.022 µs) : 0, 638
Remote Config [candidate] (643.369 µs) : 0, 643
Telemetry [baseline] (5.971 ms) : 0, 5971
Telemetry [candidate] (5.983 ms) : 0, 5983
ProfilingAgent [baseline] (77.393 ms) : 0, 77393
ProfilingAgent [candidate] (76.796 ms) : 0, 76796
Profiling [baseline] (77.418 ms) : 0, 77418
Profiling [candidate] (76.82 ms) : 0, 76820
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 24 cases. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~bf4c342317, baseline=1.20.0-SNAPSHOT~995e9c41d8
dateFormat X
axisFormat %s
section baseline
no_agent (356.054 µs) : 336, 376
. : milestone, 356,
appsec (651.058 µs) : 631, 671
. : milestone, 651,
iast (450.719 µs) : 430, 472
. : milestone, 451,
iast_FULL (515.36 µs) : 495, 536
. : milestone, 515,
iast_INACTIVE (435.421 µs) : 415, 456
. : milestone, 435,
profiling (424.552 µs) : 404, 445
. : milestone, 425,
tracing (440.655 µs) : 420, 462
. : milestone, 441,
section candidate
no_agent (358.239 µs) : 338, 378
. : milestone, 358,
appsec (649.941 µs) : 630, 670
. : milestone, 650,
iast (453.956 µs) : 433, 475
. : milestone, 454,
iast_FULL (510.182 µs) : 490, 531
. : milestone, 510,
iast_INACTIVE (432.138 µs) : 411, 453
. : milestone, 432,
profiling (435.494 µs) : 415, 456
. : milestone, 435,
tracing (432.087 µs) : 411, 453
. : milestone, 432,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~bf4c342317, baseline=1.20.0-SNAPSHOT~995e9c41d8
dateFormat X
axisFormat %s
section baseline
no_agent (1.336 ms) : 1317, 1355
. : milestone, 1336,
appsec (1.647 ms) : 1623, 1672
. : milestone, 1647,
iast (1.455 ms) : 1432, 1479
. : milestone, 1455,
profiling (1.477 ms) : 1449, 1505
. : milestone, 1477,
tracing (1.424 ms) : 1399, 1449
. : milestone, 1424,
section candidate
no_agent (1.331 ms) : 1312, 1350
. : milestone, 1331,
appsec (1.658 ms) : 1634, 1682
. : milestone, 1658,
iast (1.455 ms) : 1432, 1479
. : milestone, 1455,
profiling (1.447 ms) : 1422, 1471
. : milestone, 1447,
tracing (1.435 ms) : 1411, 1459
. : milestone, 1435,
|
DDJavierSantos
force-pushed
the
jsantos/weak_cipher_KeyGenerator
branch
3 times, most recently
from
August 21, 2023 11:45
99b6757 to
cafdaf5
Compare
smola
force-pushed
the
jsantos/weak_cipher_KeyGenerator
branch
from
August 21, 2023 16:48
cafdaf5 to
3fd36d4
Compare
smola
marked this pull request as ready for review
August 21, 2023 16:49
DDJavierSantos
force-pushed
the
jsantos/weak_cipher_KeyGenerator
branch
from
August 28, 2023 10:11
3fd36d4 to
3ffc77a
Compare
DDJavierSantos
force-pushed
the
jsantos/weak_cipher_KeyGenerator
branch
from
August 28, 2023 15:08
3ffc77a to
bf4c342
Compare
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
Instruments javax.crypto.KeyGenerator so we can detect weak cypher vulnerabilities
Motivation
We need to cover all of the calls where the user can create a cypher with a weak algorithm including KeyGenerator and SecretKeyFactory
Additional Notes