-
Notifications
You must be signed in to change notification settings - Fork 304
Add fallback for missing http.route in API Security #8987
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
base: master
Are you sure you want to change the base?
Add fallback for missing http.route in API Security #8987
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 10 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~2885767d12
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.026 s) : 0, 1025840
Total [baseline] (8.571 s) : 0, 8570543
Agent [candidate] (1.03 s) : 0, 1030473
Total [candidate] (8.585 s) : 0, 8584669
section iast
Agent [baseline] (1.158 s) : 0, 1157966
Total [baseline] (9.262 s) : 0, 9261670
Agent [candidate] (1.15 s) : 0, 1149720
Total [candidate] (9.203 s) : 0, 9202784
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.153 s) : 0, 1152536
Total [baseline] (9.179 s) : 0, 9178547
Agent [candidate] (1.158 s) : 0, 1158185
Total [candidate] (9.153 s) : 0, 9152559
section iast_TELEMETRY_OFF
Agent [baseline] (1.156 s) : 0, 1155931
Total [baseline] (9.197 s) : 0, 9196556
Agent [candidate] (1.146 s) : 0, 1146051
Total [candidate] (9.263 s) : 0, 9263491
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~2885767d12
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (683.732 ms) : 0, 683732
BytebuddyAgent [candidate] (687.614 ms) : 0, 687614
GlobalTracer [baseline] (240.172 ms) : 0, 240172
GlobalTracer [candidate] (241.739 ms) : 0, 241739
AppSec [baseline] (58.408 ms) : 0, 58408
AppSec [candidate] (55.906 ms) : 0, 55906
Debugger [baseline] (6.184 ms) : 0, 6184
Debugger [candidate] (6.268 ms) : 0, 6268
Remote Config [baseline] (733.575 µs) : 0, 734
Remote Config [candidate] (741.378 µs) : 0, 741
Telemetry [baseline] (13.01 ms) : 0, 13010
Telemetry [candidate] (14.549 ms) : 0, 14549
section iast
BytebuddyAgent [baseline] (805.637 ms) : 0, 805637
BytebuddyAgent [candidate] (801.334 ms) : 0, 801334
GlobalTracer [baseline] (231.486 ms) : 0, 231486
GlobalTracer [candidate] (230.624 ms) : 0, 230624
IAST [baseline] (27.709 ms) : 0, 27709
IAST [candidate] (27.062 ms) : 0, 27062
AppSec [baseline] (54.866 ms) : 0, 54866
AppSec [candidate] (52.711 ms) : 0, 52711
Debugger [baseline] (6.059 ms) : 0, 6059
Debugger [candidate] (5.944 ms) : 0, 5944
Remote Config [baseline] (613.096 µs) : 0, 613
Remote Config [candidate] (608.771 µs) : 0, 609
Telemetry [baseline] (8.04 ms) : 0, 8040
Telemetry [candidate] (7.904 ms) : 0, 7904
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (801.861 ms) : 0, 801861
BytebuddyAgent [candidate] (807.766 ms) : 0, 807766
GlobalTracer [baseline] (230.34 ms) : 0, 230340
GlobalTracer [candidate] (232.003 ms) : 0, 232003
IAST [baseline] (26.112 ms) : 0, 26112
IAST [candidate] (25.842 ms) : 0, 25842
AppSec [baseline] (56.203 ms) : 0, 56203
AppSec [candidate] (54.296 ms) : 0, 54296
Debugger [baseline] (5.994 ms) : 0, 5994
Debugger [candidate] (6.057 ms) : 0, 6057
Remote Config [baseline] (585.151 µs) : 0, 585
Remote Config [candidate] (584.35 µs) : 0, 584
Telemetry [baseline] (7.896 ms) : 0, 7896
Telemetry [candidate] (7.933 ms) : 0, 7933
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (804.027 ms) : 0, 804027
BytebuddyAgent [candidate] (798.045 ms) : 0, 798045
GlobalTracer [baseline] (231.986 ms) : 0, 231986
GlobalTracer [candidate] (230.711 ms) : 0, 230711
IAST [baseline] (28.84 ms) : 0, 28840
IAST [candidate] (26.68 ms) : 0, 26680
AppSec [baseline] (52.896 ms) : 0, 52896
AppSec [candidate] (52.616 ms) : 0, 52616
Debugger [baseline] (5.991 ms) : 0, 5991
Debugger [candidate] (6.037 ms) : 0, 6037
Remote Config [baseline] (598.342 µs) : 0, 598
Remote Config [candidate] (613.778 µs) : 0, 614
Telemetry [baseline] (7.902 ms) : 0, 7902
Telemetry [candidate] (7.862 ms) : 0, 7862
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~2885767d12
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.026 s) : 0, 1025640
Total [baseline] (10.509 s) : 0, 10509387
Agent [candidate] (1.023 s) : 0, 1022894
Total [candidate] (10.441 s) : 0, 10440878
section appsec
Agent [baseline] (1.182 s) : 0, 1182129
Total [baseline] (10.687 s) : 0, 10686983
Agent [candidate] (1.173 s) : 0, 1173073
Total [candidate] (10.703 s) : 0, 10702523
section iast
Agent [baseline] (1.161 s) : 0, 1161443
Total [baseline] (10.897 s) : 0, 10896869
Agent [candidate] (1.147 s) : 0, 1147129
Total [candidate] (10.821 s) : 0, 10820514
section profiling
Agent [baseline] (1.281 s) : 0, 1281324
Total [baseline] (10.893 s) : 0, 10893139
Agent [candidate] (1.266 s) : 0, 1266295
Total [candidate] (10.865 s) : 0, 10864804
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~2885767d12
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (682.283 ms) : 0, 682283
BytebuddyAgent [candidate] (682.594 ms) : 0, 682594
GlobalTracer [baseline] (240.403 ms) : 0, 240403
GlobalTracer [candidate] (240.137 ms) : 0, 240137
AppSec [baseline] (59.399 ms) : 0, 59399
AppSec [candidate] (57.614 ms) : 0, 57614
Debugger [baseline] (6.153 ms) : 0, 6153
Debugger [candidate] (6.126 ms) : 0, 6126
Remote Config [baseline] (727.073 µs) : 0, 727
Remote Config [candidate] (722.247 µs) : 0, 722
Telemetry [baseline] (13.049 ms) : 0, 13049
Telemetry [candidate] (12.12 ms) : 0, 12120
section appsec
BytebuddyAgent [baseline] (708.461 ms) : 0, 708461
BytebuddyAgent [candidate] (704.132 ms) : 0, 704132
GlobalTracer [baseline] (235.058 ms) : 0, 235058
GlobalTracer [candidate] (233.83 ms) : 0, 233830
IAST [baseline] (21.933 ms) : 0, 21933
IAST [candidate] (21.706 ms) : 0, 21706
AppSec [baseline] (179.26 ms) : 0, 179260
AppSec [candidate] (176.012 ms) : 0, 176012
Debugger [baseline] (5.893 ms) : 0, 5893
Debugger [candidate] (5.905 ms) : 0, 5905
Remote Config [baseline] (615.823 µs) : 0, 616
Remote Config [candidate] (615.817 µs) : 0, 616
Telemetry [baseline] (7.268 ms) : 0, 7268
Telemetry [candidate] (7.31 ms) : 0, 7310
section iast
BytebuddyAgent [baseline] (807.043 ms) : 0, 807043
BytebuddyAgent [candidate] (800.225 ms) : 0, 800225
GlobalTracer [baseline] (233.034 ms) : 0, 233034
GlobalTracer [candidate] (229.676 ms) : 0, 229676
IAST [baseline] (27.245 ms) : 0, 27245
IAST [candidate] (26.831 ms) : 0, 26831
AppSec [baseline] (55.059 ms) : 0, 55059
AppSec [candidate] (52.568 ms) : 0, 52568
Debugger [baseline] (6.058 ms) : 0, 6058
Debugger [candidate] (5.893 ms) : 0, 5893
Remote Config [baseline] (596.213 µs) : 0, 596
Remote Config [candidate] (591.151 µs) : 0, 591
Telemetry [baseline] (8.126 ms) : 0, 8126
Telemetry [candidate] (7.85 ms) : 0, 7850
section profiling
BytebuddyAgent [baseline] (680.865 ms) : 0, 680865
BytebuddyAgent [candidate] (674.965 ms) : 0, 674965
GlobalTracer [baseline] (362.495 ms) : 0, 362495
GlobalTracer [candidate] (359.77 ms) : 0, 359770
AppSec [baseline] (64.538 ms) : 0, 64538
AppSec [candidate] (61.676 ms) : 0, 61676
Debugger [baseline] (6.19 ms) : 0, 6190
Debugger [candidate] (6.111 ms) : 0, 6111
Remote Config [baseline] (656.728 µs) : 0, 657
Remote Config [candidate] (652.197 µs) : 0, 652
Telemetry [baseline] (8.35 ms) : 0, 8350
Telemetry [candidate] (8.196 ms) : 0, 8196
ProfilingAgent [baseline] (107.076 ms) : 0, 107076
ProfilingAgent [candidate] (104.167 ms) : 0, 104167
Profiling [baseline] (107.101 ms) : 0, 107101
Profiling [candidate] (104.191 ms) : 0, 104191
LoadRequest duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~b1b0ab330e
dateFormat X
axisFormat %s
section baseline
no_agent (8.469 ms) : 8446, 8492
. : milestone, 8469,
appsec (8.097 ms) : 8072, 8123
. : milestone, 8097,
code_origins (8.044 ms) : 8015, 8073
. : milestone, 8044,
iast (8.351 ms) : 8324, 8378
. : milestone, 8351,
profiling (556.842 µs) : 520, 593
. : milestone, 557,
tracing (9.193 ms) : 9157, 9229
. : milestone, 9193,
section candidate
no_agent (8.072 ms) : 8049, 8095
. : milestone, 8072,
appsec (1.48 ms) : 1400, 1560
. : milestone, 1480,
code_origins (193.411 µs) : 156, 231
. : milestone, 193,
iast (815.976 µs) : 752, 880
. : milestone, 816,
profiling (2.655 ms) : 2547, 2764
. : milestone, 2655,
tracing (10.784 ms) : 10708, 10860
. : milestone, 10784,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~b1b0ab330e
dateFormat X
axisFormat %s
section baseline
no_agent (386.453 µs) : 366, 407
. : milestone, 386,
iast (516.366 µs) : 494, 538
. : milestone, 516,
iast_FULL (738.502 µs) : 715, 762
. : milestone, 739,
iast_GLOBAL (565.791 µs) : 544, 588
. : milestone, 566,
iast_HARDCODED_SECRET_DISABLED (524.3 µs) : 502, 546
. : milestone, 524,
iast_INACTIVE (479.277 µs) : 457, 502
. : milestone, 479,
iast_TELEMETRY_OFF (519.609 µs) : 496, 543
. : milestone, 520,
tracing (461.849 µs) : 440, 484
. : milestone, 462,
section candidate
no_agent (382.236 µs) : 361, 403
. : milestone, 382,
iast (528.988 µs) : 507, 551
. : milestone, 529,
iast_FULL (741.71 µs) : 720, 764
. : milestone, 742,
iast_GLOBAL (570.84 µs) : 549, 593
. : milestone, 571,
iast_HARDCODED_SECRET_DISABLED (531.673 µs) : 510, 553
. : milestone, 532,
iast_INACTIVE (464.412 µs) : 442, 487
. : milestone, 464,
iast_TELEMETRY_OFF (516.386 µs) : 493, 539
. : milestone, 516,
tracing (461.332 µs) : 439, 484
. : milestone, 461,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~2885767d12
dateFormat X
axisFormat %s
section baseline
no_agent (15.556 s) : 15556000, 15556000
. : milestone, 15556000,
appsec (14.919 s) : 14919000, 14919000
. : milestone, 14919000,
iast (18.193 s) : 18193000, 18193000
. : milestone, 18193000,
iast_GLOBAL (18.333 s) : 18333000, 18333000
. : milestone, 18333000,
profiling (15.602 s) : 15602000, 15602000
. : milestone, 15602000,
tracing (15.076 s) : 15076000, 15076000
. : milestone, 15076000,
section candidate
no_agent (14.963 s) : 14963000, 14963000
. : milestone, 14963000,
appsec (14.881 s) : 14881000, 14881000
. : milestone, 14881000,
iast (18.631 s) : 18631000, 18631000
. : milestone, 18631000,
iast_GLOBAL (17.945 s) : 17945000, 17945000
. : milestone, 17945000,
profiling (15.246 s) : 15246000, 15246000
. : milestone, 15246000,
tracing (14.976 s) : 14976000, 14976000
. : milestone, 14976000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~8333ddf364, baseline=1.50.0-SNAPSHOT~2885767d12
dateFormat X
axisFormat %s
section baseline
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (2.425 ms) : 2376, 2475
. : milestone, 2425,
iast (2.196 ms) : 2134, 2258
. : milestone, 2196,
iast_GLOBAL (2.251 ms) : 2189, 2313
. : milestone, 2251,
profiling (2.051 ms) : 2001, 2101
. : milestone, 2051,
tracing (2.015 ms) : 1967, 2062
. : milestone, 2015,
section candidate
no_agent (1.479 ms) : 1468, 1491
. : milestone, 1479,
appsec (2.414 ms) : 2365, 2463
. : milestone, 2414,
iast (2.208 ms) : 2146, 2270
. : milestone, 2208,
iast_GLOBAL (2.243 ms) : 2181, 2305
. : milestone, 2243,
profiling (2.055 ms) : 2005, 2105
. : milestone, 2055,
tracing (2.009 ms) : 1961, 2057
. : milestone, 2009,
|
if (route != null) { | ||
ctx.setRoute(route.toString()); | ||
} | ||
String routeStr = route != null ? route.toString() : ""; |
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.
Does it really make sense?, even though we include some requests we still don´t have the http.route
to link the request. What does it mean from a security perspective? e.g.: if we compute the request/response schemas how we are going to link them to the actual path? (maybe it can be done/ it's done in the backed using the path or other strategies)
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.
@manuel-alvarez-alvarez These can later use endpoint inference in the backend (upcoming).
What Does This Do
A fallback is added in case the
http.route
tag is missing. This is necessary because there are several frameworks where the tag is either not set in time or has not yet been implemented.This currently causes API Security to skip all requests when the tag is unavailable.
To avoid that, we now insert an empty string as a fallback when the tag is missing.
This is not the intended long-term behavior — these gaps will be addressed progressively.
In future PRs, a metric (
appsec.api_security.missing_route
) will be introduced to track how often this fallback is used.Motivation
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]