Repository navigation
fix: harden local test server responses [ISS-387948] - #104
Closed
radovanjorgic wants to merge 1 commit into
Closed
radovanjorgic wants to merge 1 commit into
radovanjorgic wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Harden the local HTTP test server by disabling Express's
X-Powered-Byheader, returning synchronous results as explicit JSON, and escaping HTML-sensitive characters in JSON responses. Return the server handle so regression tests can close the listener reliably.Snyk Code confirms these three low-severity findings are absent at the final commit:
This changes developer test tooling. Parsed result/error objects and asynchronous acknowledgements retain their existing shape.
Connected Issues
https://app.devrev.ai/devrev/works/ISS-387948
How to test
From
code/, runnpm ci,npm run build,npm run lint, andnpm testunder Node 22.23.3. All pass; the three new HTTP regression tests verify the missing framework header, escaped results/errors, and unchanged empty asynchronous acknowledgement. All three tests failed against the original response settings, with only the server handle returned for test cleanup.Final-commit Snyk Code and dependency scans completed. Dependency advisory IDs are unchanged; no dependency files change.
Remaining findings
The existing fixture-path finding remains. Snyk Code also reports a new low
HttpToHttps/testnote for the regression test's HTTP client. That client sends synthetic data only to127.0.0.1on the temporary test server's assigned port; no credentials or remote endpoints are involved. Neither finding is suppressed.Existing dependency remediation is covered separately by #102 and #103; other development dependency findings remain outside this change.
Checklist