chore: 清理开源仓库内网敏感信息(域名/内部包名/mock 数据脱敏) - #201
Merged
Merged
Conversation
- 移除 antchat.alipay.com 硬编码及泄露的 API key 占位 - yuque_url.py 不再硬编码 yuque.antfin.com,改为从传入 URL 解析 host - 清理 mock/doc 中的内部包名(@alipay/*、@ali/*)、内部 registry、花名、内部平台 id - 删除注释中的内网文档链接与内部工具引用 Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Placeholder LLM settings break executable validation scripts, and unvalidated Yuque schemes can create unsafe links.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR removes internal domains, package names, credentials, and documentation references from the open-source repository.
Changes:
- Replaced internal LLM credentials with placeholders.
- Preserved the host from incoming Yuque URLs.
- Neutralized frontend mocks, documentation, comments, and imports.
File summaries
| File | Description |
|---|---|
web/.../VariableChooseModal/index.tsx |
Removes internal UI import comment |
web/.../VisLLM/index.md |
Replaces package and avatar examples |
web/.../VisCodeIde/index.md |
Replaces package example |
web/.../VisCodeIde/code-mock.md |
Sanitizes package metadata and registry |
tests/test_agent_refactor_validation.py |
Replaces gateway credentials |
tests/test_agent_refactor_simple.py |
Replaces gateway credentials and log |
packages/.../yuque_url.py |
Preserves URL host |
packages/.../tracer/base.py |
Removes internal documentation link |
packages/.../tool_client.py |
Neutralizes docstring |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+60
to
64
| scheme, _, host, group, book_slug, doc_id = self._path.split("/", 5) | ||
| web_reader = AntYuqueLoader(access_token=self._doc_token) | ||
| book = web_reader.single_doc( | ||
| group=group, book_slug=book_slug, doc_id=doc_id | ||
| ) |
Comment on lines
+104
to
+105
| api_base="https://xx/v1", | ||
| api_key="YOUR_API_KEY", |
Comment on lines
+94
to
+95
| "api_base": "https://xxx/v1", | ||
| "api_key": "YOUR_API_KEY", |
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.
背景
开源仓库中残留了内网相关信息,本 PR 进行脱敏清理。
清理内容
说明
🤖 Generated with Claude Code