Skip to content

Conversation

@elvessilvavieira
Copy link

@elvessilvavieira elvessilvavieira commented Nov 23, 2025

Hi, @AugustinMauroy

Here's a draft. I'd like to know if I'm on the right track. There are some things missing, like the README, but I'll add them. Thx

issue: #128

@AugustinMauroy
Copy link
Member

No need to ping me, I receive notification for all thing on the repo

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

Not too bad there are some pont that you can improve 👍

const matches = rootNode.findAll({
rule: { pattern: "$OBJ._headers[$KEY]" },
});
for (const m of matches) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (const m of matches) {
for (const m of matches) {


{
const matches = rootNode.findAll({
rule: { pattern: "$OBJ._headers[$KEY]" },
Copy link
Member

Choose a reason for hiding this comment

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

main part here...

Here if the user code have ah propriety expression _headers it's will be catch. We need a more complex logic to catch http usage and -> catch response objects -> catch _headers

I have to admit that the orignal issue examples wasn't 100% complete

@AugustinMauroy
Copy link
Member

bump @elvessilvavieira 👋

@AugustinMauroy AugustinMauroy added the awaiting author Reviewer has requested something from the author label Dec 13, 2025
@elvessilvavieira elvessilvavieira force-pushed the feat(outgoingmessage-headers) branch from 259f795 to 06a18ea Compare December 13, 2025 23:08
@elvessilvavieira
Copy link
Author

Hi, Augustin

I renamed the folder to http-outgoing message-headers then created a function looksLikeOutgoingMessage. pls tell me if it's weak in preventing false positives, or if there are any utilities that could help me. I even considered using resolveBindingPath for when they explicitly use http.createServer, but it has some drawbacks

@AugustinMauroy
Copy link
Member

Hi, Augustin

I renamed the folder to http-outgoing message-headers then created a function looksLikeOutgoingMessage. pls tell me if it's weak in preventing false positives, or if there are any utilities that could help me. I even considered using resolveBindingPath for when they explicitly use http.createServer, but it has some drawbacks

Yeah to have better handling of the detection/node catch workflow we can use https://docs.codemod.com/jssg/semantic-analysis which is a brand new feature of codemod

BTW codemod have a mcp that can help you it's aware of this new feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting author Reviewer has requested something from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants