Skip to content

Conversation

@SFARPak
Copy link
Owner

@SFARPak SFARPak commented Sep 14, 2025

Potential fix for https://github.com/SFARPak/ACode/security/code-scanning/17

The best way to fix the problem is to ensure that any checks regarding the domain should be made against the parsed URL's hostname, not against the entire URL as a string. Specifically, instead of modelUrl.includes(".volces.com"), the code should parse the URL and verify whether the hostname equals volces.com or ends with .volces.com (to allow subdomains). To achieve this, you should use the standard Node.js url module (or the WHATWG URL class) to extract the hostname, and then perform proper checks. The fix should be implemented in src/api/providers/openai.ts, updating line 95. If parsing logic is not already present, import the required standard library.

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

…g sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@SFARPak SFARPak marked this pull request as ready for review September 14, 2025 16:00
@SFARPak SFARPak merged commit f0b5350 into feature/extension-improvements Sep 14, 2025
5 checks passed
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