Skip to content

test(nodejs): drain outbound responses in SSRF weblogs - #8638

Merged
BridgeAR merged 2 commits into
mainfrom
BridgeAR/2026-11-20-node-http-timeout-system-tests
Nov 23, 2026
Merged

BridgeAR merged 2 commits into
mainfrom
BridgeAR/2026-11-20-node-http-timeout-system-tests

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

The Node.js weblogs replied at headers and left the outbound response body unread. Node did not emit end, so the standalone AppSec smoke test could match the SSRF rule without exporting its trace once the tracer stopped treating idle timeouts as completion.

Drain the outbound body in Express, Fastify, and Next.js without changing when the weblog replies. Refresh the affected base-image locks.

Companion to DataDog/dd-trace-js#11352.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/build/docker/base-images.lock.json                                @DataDog/system-tests-reviewers
utils/build/docker/nodejs/express/rasp.js                               @DataDog/system-tests-reviewers
utils/build/docker/nodejs/express4-typescript/rasp.ts                   @DataDog/system-tests-reviewers
utils/build/docker/nodejs/fastify/rasp.js                               @DataDog/system-tests-reviewers
utils/build/docker/nodejs/nextjs/src/app/rasp/ssrf/route.js             @DataDog/system-tests-reviewers

@BridgeAR
BridgeAR marked this pull request as ready for review November 23, 2026 10:17
@BridgeAR
BridgeAR requested a review from a team as a code owner November 23, 2026 10:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T10:19:58.496779Z 536c78c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-11-20-node-http-timeout-system-tests branch from 536c78c to 74fb1be Compare November 23, 2026 10:28

@CarlesDD CarlesDD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LTMG but the same Express' changes should be applied to express4-typescript weblog too. It does not fail today because it is running on Node 18 but it will start failing as soon as it starts running on Node 19+.

The WAF can match the SSRF rule without a trace reaching the backend.
The weblog replies at headers without reading the outbound body, so
Node.js does not emit the response end event. Drain the body so the HTTP
span can finish without relying on an idle timeout.
The TypeScript weblog replies at headers and leaves the outbound body
unread. Node.js does not emit the response end event, so the tracer
cannot finish the HTTP span. Keep the weblog reply at headers.
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-11-20-node-http-timeout-system-tests branch from 74fb1be to 95c643e Compare November 23, 2026 16:33
@BridgeAR

Copy link
Copy Markdown
Member Author

@CarlesDD addressed. That was the only change, so going to merge

@BridgeAR
BridgeAR enabled auto-merge (squash) November 23, 2026 16:43
@BridgeAR
BridgeAR merged commit b1b3e07 into main Nov 23, 2026
106 checks passed
@BridgeAR
BridgeAR deleted the BridgeAR/2026-11-20-node-http-timeout-system-tests branch November 23, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants