-
Notifications
You must be signed in to change notification settings - Fork 45
feat: initial support for ASM inside the tracer #621
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
feat: initial support for ASM inside the tracer #621
Conversation
630bdfc
to
10563b4
Compare
01bbb20
to
236b7ca
Compare
self.span, | ||
status_code, | ||
self.event_source, | ||
response=self.response, |
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 self.response
might not be a Dictionary, right?
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.
Yes you are right, it happens in two cases:
- malformed responses
- For API Gateway HTTP API events with payload version 2 or lambda function url events, the function may return just the body of the response
I pushed a fix, thank you.
19ed75a
to
6a02cc6
Compare
6a02cc6
to
095ba6d
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.
LTGM
Adds Application Security Management (ASM) – Threat Detection support to the Python Lambda layer.
What does this PR do?
Ship
libddwaf.so
in the layerParse incoming HTTP events and forward enriched data to ASM when enabled
DD_APPSEC_ENABLED
DD_SERVERLESS_APPSEC_ENABLED
(extension‑level enablement) currently in use by ASM clients in lambdaMotivation
Enable AppSec through the tracer in the context of AWS Lambda
Testing Guidelines
DD_APPSEC_ENABLED=false
to ensure that there is no impact with ASM disabled.before
ismain
andafter
is this branch both usingdd-trace-py
from main :Additional Notes
With appsec enabled during the benchmarks, I started to see the following logs:
The problem comes from a misplaced int cast when setting the
start_ns
of the lambda-url inferred span.Types of Changes
Check all that apply