-
Notifications
You must be signed in to change notification settings - Fork 322
Adding missing XML request/response schema collection #9432
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?
Conversation
fd35d02 to
d4321c4
Compare
|
🎯 Code Coverage 🔗 Commit SHA: 04a13ef | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.02 s) : 0, 1020367
Total [baseline] (10.678 s) : 0, 10678051
Agent [candidate] (1.019 s) : 0, 1019015
Total [candidate] (10.71 s) : 0, 10709844
section appsec
Agent [baseline] (1.206 s) : 0, 1205738
Total [baseline] (11.05 s) : 0, 11050479
Agent [candidate] (1.197 s) : 0, 1196610
Total [candidate] (11.067 s) : 0, 11067220
section iast
Agent [baseline] (1.162 s) : 0, 1162247
Total [baseline] (11.014 s) : 0, 11013544
Agent [candidate] (1.154 s) : 0, 1153988
Total [candidate] (11.016 s) : 0, 11015817
section profiling
Agent [baseline] (1.165 s) : 0, 1164968
Total [baseline] (11.047 s) : 0, 11046768
Agent [candidate] (1.173 s) : 0, 1172941
Total [candidate] (11.079 s) : 0, 11078755
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.458 ms) : 0, 1458
BytebuddyAgent [baseline] (696.022 ms) : 0, 696022
BytebuddyAgent [candidate] (693.627 ms) : 0, 693627
GlobalTracer [baseline] (243.648 ms) : 0, 243648
GlobalTracer [candidate] (242.375 ms) : 0, 242375
AppSec [baseline] (32.579 ms) : 0, 32579
AppSec [candidate] (32.35 ms) : 0, 32350
Debugger [baseline] (6.542 ms) : 0, 6542
Debugger [candidate] (6.407 ms) : 0, 6407
Remote Config [baseline] (720.383 µs) : 0, 720
Remote Config [candidate] (713.044 µs) : 0, 713
Telemetry [baseline] (9.474 ms) : 0, 9474
Telemetry [candidate] (9.308 ms) : 0, 9308
Flare Poller [baseline] (8.695 ms) : 0, 8695
Flare Poller [candidate] (11.529 ms) : 0, 11529
section appsec
crashtracking [baseline] (1.48 ms) : 0, 1480
crashtracking [candidate] (1.455 ms) : 0, 1455
BytebuddyAgent [baseline] (726.051 ms) : 0, 726051
BytebuddyAgent [candidate] (719.721 ms) : 0, 719721
GlobalTracer [baseline] (237.004 ms) : 0, 237004
GlobalTracer [candidate] (234.895 ms) : 0, 234895
IAST [baseline] (24.811 ms) : 0, 24811
IAST [candidate] (24.823 ms) : 0, 24823
AppSec [baseline] (176.197 ms) : 0, 176197
AppSec [candidate] (175.543 ms) : 0, 175543
Debugger [baseline] (6.088 ms) : 0, 6088
Debugger [candidate] (6.066 ms) : 0, 6066
Remote Config [baseline] (635.917 µs) : 0, 636
Remote Config [candidate] (634.039 µs) : 0, 634
Telemetry [baseline] (8.403 ms) : 0, 8403
Telemetry [candidate] (8.452 ms) : 0, 8452
Flare Poller [baseline] (3.871 ms) : 0, 3871
Flare Poller [candidate] (3.926 ms) : 0, 3926
section iast
crashtracking [baseline] (1.484 ms) : 0, 1484
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (823.78 ms) : 0, 823780
BytebuddyAgent [candidate] (817.464 ms) : 0, 817464
GlobalTracer [baseline] (233.56 ms) : 0, 233560
GlobalTracer [candidate] (232.689 ms) : 0, 232689
IAST [baseline] (27.577 ms) : 0, 27577
IAST [candidate] (26.384 ms) : 0, 26384
AppSec [baseline] (34.666 ms) : 0, 34666
AppSec [candidate] (35.032 ms) : 0, 35032
Debugger [baseline] (6.171 ms) : 0, 6171
Debugger [candidate] (6.147 ms) : 0, 6147
Remote Config [baseline] (623.5 µs) : 0, 623
Remote Config [candidate] (618.866 µs) : 0, 619
Telemetry [baseline] (8.662 ms) : 0, 8662
Telemetry [candidate] (8.679 ms) : 0, 8679
Flare Poller [baseline] (4.24 ms) : 0, 4240
Flare Poller [candidate] (4.232 ms) : 0, 4232
section profiling
crashtracking [baseline] (1.441 ms) : 0, 1441
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (724.061 ms) : 0, 724061
BytebuddyAgent [candidate] (727.405 ms) : 0, 727405
GlobalTracer [baseline] (218.721 ms) : 0, 218721
GlobalTracer [candidate] (219.834 ms) : 0, 219834
AppSec [baseline] (32.753 ms) : 0, 32753
AppSec [candidate] (32.997 ms) : 0, 32997
Debugger [baseline] (6.441 ms) : 0, 6441
Debugger [candidate] (7.393 ms) : 0, 7393
Remote Config [baseline] (707.979 µs) : 0, 708
Remote Config [candidate] (698.347 µs) : 0, 698
Telemetry [baseline] (16.747 ms) : 0, 16747
Telemetry [candidate] (15.29 ms) : 0, 15290
Flare Poller [baseline] (4.204 ms) : 0, 4204
Flare Poller [candidate] (5.088 ms) : 0, 5088
ProfilingAgent [baseline] (106.451 ms) : 0, 106451
ProfilingAgent [candidate] (109.791 ms) : 0, 109791
Profiling [baseline] (107.757 ms) : 0, 107757
Profiling [candidate] (110.372 ms) : 0, 110372
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.028 s) : 0, 1027586
Total [baseline] (8.716 s) : 0, 8715869
Agent [candidate] (1.02 s) : 0, 1019776
Total [candidate] (8.702 s) : 0, 8701909
section iast
Agent [baseline] (1.152 s) : 0, 1152153
Total [baseline] (9.329 s) : 0, 9329431
Agent [candidate] (1.155 s) : 0, 1155003
Total [candidate] (9.321 s) : 0, 9321153
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.486 ms) : 0, 1486
crashtracking [candidate] (1.472 ms) : 0, 1472
BytebuddyAgent [baseline] (700.734 ms) : 0, 700734
BytebuddyAgent [candidate] (696.568 ms) : 0, 696568
GlobalTracer [baseline] (244.205 ms) : 0, 244205
GlobalTracer [candidate] (243.117 ms) : 0, 243117
AppSec [baseline] (32.757 ms) : 0, 32757
AppSec [candidate] (32.443 ms) : 0, 32443
Debugger [baseline] (6.539 ms) : 0, 6539
Debugger [candidate] (6.373 ms) : 0, 6373
Remote Config [baseline] (720.7 µs) : 0, 721
Remote Config [candidate] (707.224 µs) : 0, 707
Telemetry [baseline] (9.38 ms) : 0, 9380
Telemetry [candidate] (9.375 ms) : 0, 9375
Flare Poller [baseline] (10.407 ms) : 0, 10407
Flare Poller [candidate] (8.517 ms) : 0, 8517
section iast
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (815.657 ms) : 0, 815657
BytebuddyAgent [candidate] (818.302 ms) : 0, 818302
GlobalTracer [baseline] (232.29 ms) : 0, 232290
GlobalTracer [candidate] (232.642 ms) : 0, 232642
IAST [baseline] (26.641 ms) : 0, 26641
IAST [candidate] (26.536 ms) : 0, 26536
AppSec [baseline] (35.24 ms) : 0, 35240
AppSec [candidate] (34.876 ms) : 0, 34876
Debugger [baseline] (6.096 ms) : 0, 6096
Debugger [candidate] (6.175 ms) : 0, 6175
Remote Config [baseline] (599.519 µs) : 0, 600
Remote Config [candidate] (594.603 µs) : 0, 595
Telemetry [baseline] (8.655 ms) : 0, 8655
Telemetry [candidate] (8.782 ms) : 0, 8782
Flare Poller [baseline] (4.184 ms) : 0, 4184
Flare Poller [candidate] (4.286 ms) : 0, 4286
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section baseline
no_agent (4.216 ms) : 4162, 4271
. : milestone, 4216,
iast (9.9 ms) : 9732, 10067
. : milestone, 9900,
iast_FULL (14.085 ms) : 13808, 14362
. : milestone, 14085,
iast_GLOBAL (10.737 ms) : 10546, 10927
. : milestone, 10737,
profiling (9.02 ms) : 8869, 9172
. : milestone, 9020,
tracing (7.95 ms) : 7837, 8064
. : milestone, 7950,
section candidate
no_agent (4.304 ms) : 4254, 4354
. : milestone, 4304,
iast (9.576 ms) : 9415, 9737
. : milestone, 9576,
iast_FULL (14.215 ms) : 13933, 14497
. : milestone, 14215,
iast_GLOBAL (10.107 ms) : 9929, 10284
. : milestone, 10107,
profiling (8.976 ms) : 8834, 9117
. : milestone, 8976,
tracing (7.78 ms) : 7668, 7891
. : milestone, 7780,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section baseline
no_agent (36.745 ms) : 36453, 37036
. : milestone, 36745,
appsec (49.16 ms) : 48724, 49595
. : milestone, 49160,
code_origins (43.567 ms) : 43213, 43920
. : milestone, 43567,
iast (45.217 ms) : 44835, 45598
. : milestone, 45217,
profiling (48.671 ms) : 48210, 49133
. : milestone, 48671,
tracing (44.952 ms) : 44563, 45342
. : milestone, 44952,
section candidate
no_agent (38.079 ms) : 37773, 38384
. : milestone, 38079,
appsec (48.062 ms) : 47649, 48475
. : milestone, 48062,
code_origins (44.164 ms) : 43788, 44540
. : milestone, 44164,
iast (47.149 ms) : 46747, 47551
. : milestone, 47149,
profiling (47.979 ms) : 47518, 48440
. : milestone, 47979,
tracing (43.111 ms) : 42743, 43480
. : milestone, 43111,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section baseline
no_agent (1.479 ms) : 1467, 1491
. : milestone, 1479,
appsec (3.736 ms) : 3517, 3954
. : milestone, 3736,
iast (2.224 ms) : 2160, 2288
. : milestone, 2224,
iast_GLOBAL (2.258 ms) : 2194, 2322
. : milestone, 2258,
profiling (2.08 ms) : 2027, 2133
. : milestone, 2080,
tracing (2.03 ms) : 1980, 2079
. : milestone, 2030,
section candidate
no_agent (1.478 ms) : 1466, 1489
. : milestone, 1478,
appsec (3.727 ms) : 3509, 3946
. : milestone, 3727,
iast (2.213 ms) : 2149, 2277
. : milestone, 2213,
iast_GLOBAL (2.256 ms) : 2192, 2320
. : milestone, 2256,
profiling (2.482 ms) : 2317, 2648
. : milestone, 2482,
tracing (2.033 ms) : 1983, 2083
. : milestone, 2033,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~04a13efffb, baseline=1.55.0-SNAPSHOT~295f7bf5b4
dateFormat X
axisFormat %s
section baseline
no_agent (15.58 s) : 15580000, 15580000
. : milestone, 15580000,
appsec (15.258 s) : 15258000, 15258000
. : milestone, 15258000,
iast (18.749 s) : 18749000, 18749000
. : milestone, 18749000,
iast_GLOBAL (18.059 s) : 18059000, 18059000
. : milestone, 18059000,
profiling (15.159 s) : 15159000, 15159000
. : milestone, 15159000,
tracing (15.084 s) : 15084000, 15084000
. : milestone, 15084000,
section candidate
no_agent (15.498 s) : 15498000, 15498000
. : milestone, 15498000,
appsec (15.268 s) : 15268000, 15268000
. : milestone, 15268000,
iast (18.858 s) : 18858000, 18858000
. : milestone, 18858000,
iast_GLOBAL (17.72 s) : 17720000, 17720000
. : milestone, 17720000,
profiling (15.05 s) : 15050000, 15050000
. : milestone, 15050000,
tracing (15.086 s) : 15086000, 15086000
. : milestone, 15086000,
|
|
Looks good! I updated the title of the PR because you’re solving the problem for both request and response. |
849c2bb to
104bbbd
Compare
92c36be to
5328ef4
Compare
|
Hi! 👋 Looks like you updated a Git Submodule.
|
3334659 to
cb66848
Compare
|
Hi! 👋 Looks like you updated a Git Submodule.
|
cb66848 to
c11840f
Compare
|
Hi! 👋 Looks like you updated a Git Submodule.
|
c11840f to
b47fdf5
Compare
|
Hi! 👋 Looks like you updated a Git Submodule.
|
| public final class XmlDomUtils { | ||
|
|
||
| /** Default maximum recursion depth for XML DOM conversion to prevent stack overflow. */ | ||
| public static final int DEFAULT_MAX_CONVERSION_DEPTH = 15; |
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.
any reason to set the max depth to 15 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.
didn’t want to risk overflowing the client app 😅
| * | ||
| * <p>The method applies the same truncation limits as the main conversion logic. | ||
| */ | ||
| private static Object doConversionXmlDom(Object obj, int depth, State state) { |
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.
Hey! Just wondering... would it make sense to preserve the namespace info here?
Right now we are dropping the XML namespaces. Maybe we could keep the full name using something like {namespace}localName?
What do you think, @sezen-datadog, @manuel-alvarez-alvarez?
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.
it's a good place to do it as technically all xml conversions pass through here!
| Map<String, Object> newMap = new HashMap<>(); | ||
|
|
||
| // Add attributes | ||
| NamedNodeMap attributes = elem.getAttributes(); |
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.
Would it make sense to separate element attributes from child elements in the map?
Maybe something like:
newMap.put("@attributes", attributesMap)
newMap.put("elements", elementsMap)
What do you think?
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.
I’m not against it~!
dd-java-agent/appsec/src/main/java/com/datadog/appsec/event/data/ObjectIntrospection.java
Show resolved
Hide resolved
Signed-off-by: sezen.leblay <sezen.leblay@datadoghq.com>
b47fdf5 to
0967f11
Compare
...agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/XmlDomUtils.java
Outdated
Show resolved
Hide resolved
...agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/XmlDomUtils.java
Outdated
Show resolved
Hide resolved
...agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/XmlDomUtils.java
Show resolved
Hide resolved
...agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/XmlDomUtils.java
Outdated
Show resolved
Hide resolved
Signed-off-by: sezen.leblay <sezen.leblay@datadoghq.com>
What Does This Do
The instrumentation can digest XML to pass onto WAF
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: APPSEC-58618