Conversation
Automated security fix generated by OrbisAI Security
|
I'm a good samaritan. My key is encrypted and can only be used by my project. The project official website provides free AI experience for users. This modification will not be adopted. 我是一个大善人 我的密钥加密过 只有我的项目能够使用 项目官网可以给用户免费提供ai体验 不采纳此修改 |
…sclosure Restores the default free AI experience broken by the previous commit (_dk() returning ''). The key was never a secret to begin with — any credential shipped to browser JS is publicly recoverable regardless of Base64/array chunking — so instead of deleting it, rename the identifiers and document in-code that it is intentionally public and relies on OpenRouter-side domain/usage restrictions, not obscurity. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks for the context — makes sense that you want to keep the free AI experience working, and good to know the key is already provider-restricted to your project. I've pushed a revised commit that no longer touches the key or its Base64-fragment mechanism at all; it only renames the identifiers and adds a code comment stating clearly that this credential is public-by-design (since anything shipped to browser JS is), relying on your OpenRouter-side restrictions rather than obfuscation. A small test now guards that disclosure comment. The default AI experience is unaffected. Happy to adjust further if any part of this doesn't fit how you'd like it framed. |
I've revised this PR to avoid breaking the existing free AI experience.
The original concern remains that the OpenRouter credential is delivered to browser JavaScript and therefore cannot be considered a secret, even though it was obfuscated (Base64 + array-splitting) in the source.
Rather than removing the default AI functionality, this revision:
_k/_dkidentifiers toPUBLIC_AI_KEY_FRAGMENTS/getPublicAIKey;A stronger long-term fix would be to proxy OpenRouter requests through a backend so the credential never reaches the browser at all — but this repo is a static Jekyll site with no server component, so that's a separate, larger architectural change and out of scope here.
This PR is now focused purely on removing the misleading "obfuscation = security" framing, without any functional regression.