Skip to content

chore: return SDS findings into SDK Response#7761

Merged
smola merged 3 commits intomasterfrom
oceane.bordeau/sds-attach-sdk-response
Mar 13, 2026
Merged

chore: return SDS findings into SDK Response#7761
smola merged 3 commits intomasterfrom
oceane.bordeau/sds-attach-sdk-response

Conversation

@obordeau
Copy link
Copy Markdown
Contributor

@obordeau obordeau commented Mar 12, 2026

What does this PR do?

AI Guard return SDS tags in SDK response from evaluator API response.

Motivation

APPSEC-61591

Additional Notes

APPSEC-61588 - SDS scans returned in SDK response by AI Guard [system-tests]
System Test for this feature is passing locally

./run.sh AI_GUARD                               
=================================================================================================== test context ====================================================================================================
Scenario: AI_GUARD
Logs folder: ./logs_ai_guard
Starting containers...
Agent: 7.76.1
Backend: datad0g.com
Library: nodejs@6.0.0-pre
Weblog variant: express4
Weblog system: Linux weblog 6.12.65-linuxkit #1 SMP Thu Jan 15 14:58:53 UTC 2026 aarch64 Linux

================================================================================================ test session starts ================================================================================================
collected 2267 items / 2256 deselected / 11 selected                                                                                                                                                                
---------------------------------------------------------------------------------------------------- tests setup ----------------------------------------------------------------------------------------------------

tests/ai_guard/test_ai_guard_sdk.py .........

------------------------------------------------------------------------------------------ Wait for library interface (0s) ------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------- Wait for agent interface (5s) -------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------ Wait for backend interface (0s) ------------------------------------------------------------------------------------------

tests/ai_guard/test_ai_guard_sdk.py ....x...X                                                                                                                                                                 [ 81%]
tests/schemas/test_schemas.py ..                                                                                                                                                                              [100%]

-------------------------------------------------- generated xml file: /Users/oceane.bordeau/go/src/github.com/DataDog/system-tests/logs_ai_guard/reportJunit.xml ---------------------------------------------------
============================================================================================== short test summary info ==============================================================================================
XPASS tests/ai_guard/test_ai_guard_sdk.py::Test_SDS_Findings_In_SDK_Response::test_sds_in_response missing_feature

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 12, 2026

Overall package size

Self size: 4.96 MB
Deduped: 5.81 MB
No deduping: 5.81 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.43%. Comparing base (1a5eae4) to head (d2c7003).
⚠️ Report is 47 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7761      +/-   ##
==========================================
+ Coverage   80.40%   80.43%   +0.02%     
==========================================
  Files         741      741              
  Lines       32110    32173      +63     
==========================================
+ Hits        25819    25877      +58     
- Misses       6291     6296       +5     
Flag Coverage Δ
aiguard-macos 38.84% <100.00%> (-0.14%) ⬇️
aiguard-ubuntu 38.95% <100.00%> (-0.14%) ⬇️
aiguard-windows 38.68% <100.00%> (-0.14%) ⬇️
apm-capabilities-tracing-macos 48.90% <0.00%> (+0.03%) ⬆️
apm-capabilities-tracing-ubuntu 48.93% <0.00%> (+0.03%) ⬆️
apm-capabilities-tracing-windows 48.67% <0.00%> (+0.03%) ⬆️
apm-integrations-child-process 38.39% <0.00%> (-0.15%) ⬇️
apm-integrations-couchbase-18 37.31% <0.00%> (-0.17%) ⬇️
apm-integrations-couchbase-eol 37.78% <0.00%> (-0.14%) ⬇️
apm-integrations-oracledb 37.62% <0.00%> (-0.14%) ⬇️
appsec-express 55.20% <0.00%> (-0.01%) ⬇️
appsec-fastify 51.54% <0.00%> (-0.02%) ⬇️
appsec-graphql 51.73% <0.00%> (-0.01%) ⬇️
appsec-kafka 44.27% <0.00%> (-0.09%) ⬇️
appsec-ldapjs 43.93% <0.00%> (-0.05%) ⬇️
appsec-lodash 43.59% <0.00%> (-0.05%) ⬇️
appsec-macos 58.21% <0.00%> (-0.02%) ⬇️
appsec-mongodb-core 48.71% <0.00%> (-0.04%) ⬇️
appsec-mongoose 49.37% <0.00%> (-0.06%) ⬇️
appsec-mysql 50.80% <0.00%> (-0.11%) ⬇️
appsec-node-serialize 43.11% <0.00%> (-0.05%) ⬇️
appsec-passport 47.55% <0.00%> (-0.01%) ⬇️
appsec-postgres 50.54% <0.00%> (+<0.01%) ⬆️
appsec-sourcing 42.51% <0.00%> (-0.05%) ⬇️
appsec-template 43.27% <0.00%> (-0.05%) ⬇️
appsec-ubuntu 58.29% <0.00%> (-0.02%) ⬇️
appsec-windows 58.05% <0.00%> (-0.02%) ⬇️
instrumentations-instrumentation-bluebird 32.26% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-body-parser 40.41% <0.00%> (-0.06%) ⬇️
instrumentations-instrumentation-child_process 37.71% <0.00%> (-0.15%) ⬇️
instrumentations-instrumentation-cookie-parser 34.24% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-express 34.56% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.37% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-express-session 40.05% <0.00%> (-0.06%) ⬇️
instrumentations-instrumentation-fs 31.88% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-generic-pool 29.69% <ø> (-0.20%) ⬇️
instrumentations-instrumentation-http 39.69% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-knex 32.27% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-mongoose 33.39% <0.00%> (-0.13%) ⬇️
instrumentations-instrumentation-multer 40.16% <0.00%> (-0.06%) ⬇️
instrumentations-instrumentation-mysql2 38.17% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-passport 43.97% <0.00%> (+0.01%) ⬆️
instrumentations-instrumentation-passport-http 43.64% <0.00%> (+<0.01%) ⬆️
instrumentations-instrumentation-passport-local 44.17% <0.00%> (+<0.01%) ⬆️
instrumentations-instrumentation-pg 37.60% <0.00%> (-0.15%) ⬇️
instrumentations-instrumentation-promise 32.19% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-promise-js 32.20% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-q 32.24% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-url 32.17% <0.00%> (-0.14%) ⬇️
instrumentations-instrumentation-when 32.21% <0.00%> (-0.14%) ⬇️
llmobs-ai 42.15% <0.00%> (-0.14%) ⬇️
llmobs-anthropic 40.14% <0.00%> (-0.14%) ⬇️
llmobs-bedrock 39.13% <0.00%> (-0.12%) ⬇️
llmobs-google-genai 39.69% <0.00%> (-0.13%) ⬇️
llmobs-langchain 39.93% <0.00%> (-0.11%) ⬇️
llmobs-openai 43.87% <0.00%> (-0.13%) ⬇️
llmobs-vertex-ai 39.94% <0.00%> (-0.13%) ⬇️
platform-core 31.53% <ø> (ø)
platform-esbuild 34.48% <ø> (ø)
platform-instrumentations-misc 48.40% <ø> (ø)
platform-shimmer 37.63% <ø> (ø)
platform-unit-guardrails 32.95% <ø> (ø)
plugins-azure-event-hubs 25.83% <ø> (ø)
plugins-azure-service-bus 25.19% <ø> (ø)
plugins-bullmq 44.07% <0.00%> (-0.20%) ⬇️
plugins-cassandra 37.66% <0.00%> (-0.14%) ⬇️
plugins-cookie 26.89% <ø> (ø)
plugins-cookie-parser 26.67% <ø> (ø)
plugins-crypto 26.79% <ø> (ø)
plugins-dd-trace-api 38.22% <0.00%> (-0.15%) ⬇️
plugins-express-mongo-sanitize 26.82% <ø> (ø)
plugins-express-session 26.63% <ø> (ø)
plugins-fastify 42.13% <0.00%> (-0.06%) ⬇️
plugins-fetch 38.22% <0.00%> (-0.14%) ⬇️
plugins-fs 38.49% <0.00%> (-0.15%) ⬇️
plugins-generic-pool 25.87% <ø> (ø)
plugins-google-cloud-pubsub 45.34% <0.00%> (-0.04%) ⬇️
plugins-grpc 40.81% <0.00%> (-0.10%) ⬇️
plugins-handlebars 26.86% <ø> (ø)
plugins-hapi 40.04% <0.00%> (-0.20%) ⬇️
plugins-hono 40.30% <0.00%> (-0.06%) ⬇️
plugins-ioredis 38.30% <0.00%> (-0.15%) ⬇️
plugins-knex 26.50% <ø> (ø)
plugins-ldapjs 24.36% <ø> (ø)
plugins-light-my-request 26.23% <ø> (ø)
plugins-limitd-client 32.54% <0.00%> (-0.14%) ⬇️
plugins-lodash 25.96% <ø> (ø)
plugins-mariadb 39.35% <0.00%> (-0.15%) ⬇️
plugins-memcached 38.03% <0.00%> (-0.15%) ⬇️
plugins-microgateway-core 39.11% <0.00%> (-0.12%) ⬇️
plugins-moleculer 40.40% <0.00%> (-0.10%) ⬇️
plugins-mongodb 39.05% <0.00%> (-0.14%) ⬇️
plugins-mongodb-core 38.88% <0.00%> (-0.14%) ⬇️
plugins-mongoose 38.74% <0.00%> (-0.14%) ⬇️
plugins-multer 26.63% <ø> (ø)
plugins-mysql 39.01% <0.00%> (-0.18%) ⬇️
plugins-mysql2 39.14% <0.00%> (-0.14%) ⬇️
plugins-node-serialize 26.93% <ø> (ø)
plugins-opensearch 37.49% <0.00%> (-0.14%) ⬇️
plugins-passport-http 26.68% <ø> (ø)
plugins-postgres 35.53% <0.00%> (-0.21%) ⬇️
plugins-process 26.79% <ø> (ø)
plugins-pug 26.89% <ø> (ø)
plugins-redis 38.77% <0.00%> (-0.15%) ⬇️
plugins-router 42.85% <0.00%> (-0.05%) ⬇️
plugins-sequelize 25.47% <ø> (ø)
plugins-test-and-upstream-amqp10 38.38% <0.00%> (-0.15%) ⬇️
plugins-test-and-upstream-amqplib 43.76% <0.00%> (-0.09%) ⬇️
plugins-test-and-upstream-apollo 39.01% <0.00%> (-0.13%) ⬇️
plugins-test-and-upstream-avsc 38.55% <0.00%> (-0.15%) ⬇️
plugins-test-and-upstream-bunyan 33.80% <0.00%> (-0.14%) ⬇️
plugins-test-and-upstream-connect 40.70% <0.00%> (-0.05%) ⬇️
plugins-test-and-upstream-graphql 40.00% <0.00%> (-0.14%) ⬇️
plugins-test-and-upstream-koa 40.29% <0.00%> (-0.05%) ⬇️
plugins-test-and-upstream-protobufjs 38.78% <0.00%> (-0.15%) ⬇️
plugins-test-and-upstream-rhea 43.97% <0.00%> (-0.06%) ⬇️
plugins-undici 38.99% <0.00%> (-0.13%) ⬇️
plugins-url 26.79% <ø> (ø)
plugins-valkey 37.97% <0.00%> (-0.15%) ⬇️
plugins-vm 26.79% <ø> (ø)
plugins-winston 33.99% <0.00%> (-0.14%) ⬇️
plugins-ws 41.76% <0.00%> (-0.11%) ⬇️
profiling-macos 39.80% <0.00%> (-0.15%) ⬇️
profiling-ubuntu 40.33% <0.00%> (+0.26%) ⬆️
profiling-windows 41.11% <0.00%> (-0.54%) ⬇️
serverless-azure-functions-client 25.54% <ø> (ø)
serverless-azure-functions-eventhubs 25.54% <ø> (ø)
serverless-azure-functions-servicebus 25.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-prod-us1-3

This comment has been minimized.

@obordeau obordeau marked this pull request as ready for review March 12, 2026 15:10
@obordeau obordeau requested review from a team as code owners March 12, 2026 15:10
@simon-id
Copy link
Copy Markdown
Member

can we have some tests added or existing ones updated for this ?

@obordeau obordeau marked this pull request as draft March 12, 2026 15:31
@obordeau obordeau force-pushed the oceane.bordeau/sds-attach-sdk-response branch from 7d6f6de to 237e658 Compare March 12, 2026 16:21
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 12, 2026

Benchmarks

Benchmark execution time: 2026-03-13 09:11:44

Comparing candidate commit d2c7003 in PR branch oceane.bordeau/sds-attach-sdk-response with baseline commit 1a5eae4 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 230 metrics, 30 unstable metrics.

Comment thread index.d.ts Outdated
@obordeau obordeau marked this pull request as ready for review March 13, 2026 09:24
Copy link
Copy Markdown
Contributor

@IlyasShabi IlyasShabi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smola smola merged commit 63a867a into master Mar 13, 2026
789 checks passed
@smola smola deleted the oceane.bordeau/sds-attach-sdk-response branch March 13, 2026 10:14
dd-octo-sts Bot pushed a commit that referenced this pull request Mar 14, 2026
* feat(ai-guard): return SDS findings into SDK Response
* add tests for sds findings in sdk response and abort error
* change sds format from unknown to Object
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Mar 14, 2026
CarlesDD pushed a commit that referenced this pull request Mar 16, 2026
* feat(ai-guard): return SDS findings into SDK Response
* add tests for sds findings in sdk response and abort error
* change sds format from unknown to Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants