Skip to content

Conversation

habib-deriv
Copy link
Contributor

Potential fix for https://github.com/deriv-com/deriv-api-docs/security/code-scanning/84

To fix the issue, the untrusted entry_tick value should be sanitized before being logged. Specifically, newline characters (\n and \r) should be removed from the value to prevent log injection. This can be achieved using String.prototype.replace to ensure that the logged value is safe.

The fix involves modifying the code on line 58 to sanitize entry_spot before logging it. This ensures that any malicious input from the WebSocket message cannot manipulate the log output.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link

vercel bot commented Jul 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-api-docs ✅ Ready (Inspect) Visit Preview Jul 1, 2025 3:51am

Copy link

github-actions bot commented Jul 1, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

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.

1 participant