Skip to content

MLE-29886: [node-client-api][polaris]NULL Pointer Dereference in optic-cts-param-test.js - #1135

Merged
vishwach merged 1 commit into
developfrom
MLE-29886
Nov 19, 2026
Merged

vishwach merged 1 commit into
developfrom
MLE-29886

Conversation

@vishwach

@vishwach vishwach commented Nov 19, 2026 •

Copy link
Copy Markdown

Summary

  • Replaced the should.exist(paramNode) assertion with an explicit null check that throws an Error if paramNode is null or undefined.
  • Introduces an unconditional control-flow termination branch before dereferencing paramNode.ns, satisfying Polaris's data-flow and control-flow graph (CFG) analysis.

Testing

  • Verified test-basic/optic-cts-param-test.js passes locally:
    npx mocha test-basic/optic-cts-param-test.js

@vishwach
vishwach marked this pull request as ready for review November 19, 2026 05:34
Copilot AI balanced review requested due to automatic review settings November 19, 2026 05:34

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified for the explicit null-guard change in the cts.param integration test.

No open issues 🎉

What changed in this PR

This PR makes the null guard in the cts.param integration test explicit so Polaris can recognize that execution stops before dereferencing a missing paramNode.

Changes:

  • Replaces should.exist(paramNode) with a conditional throw while preserving the error message and subsequent namespace assertion.
File Description
test-basic/​optic-cts-param-test.js Adds an explicit guard before accessing paramNode.ns.

Review effort: Balanced

@vishwach
vishwach merged commit a0faf94 into develop Nov 19, 2026
5 checks passed
@vishwach
vishwach deleted the MLE-29886 branch November 20, 2026 04:36
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.

4 participants