Skip to content

chore: 清理开源仓库内网敏感信息(域名/内部包名/mock 数据脱敏) - #201

Merged
csunny merged 1 commit into
derisk-ai:mainfrom
yhjun1026:fix/clean_code
Sep 17, 2026
Merged

csunny merged 1 commit into
derisk-ai:mainfrom
yhjun1026:fix/clean_code

Conversation

@yhjun1026

Copy link
Copy Markdown
Collaborator

背景

开源仓库中残留了内网相关信息,本 PR 进行脱敏清理。

清理内容

  • 测试文件:移除硬编码的内部 LLM 网关地址与 API key(改为占位符;该 key 已完成轮换)
  • yuque_url.py:不再硬编码内部语雀域名,改为从传入 URL 解析 host(顺带修复 host 不一致问题)
  • tracer/base.py:移除注释中的内部文档链接
  • tool_client.py:docstring 中性化
  • 前端 mock/文档(VisCodeIde/code-mock.md、VisLLM/index.md 等):内部包名、内部 registry、内部平台 id 等全部替换为中性示例值
  • 删除注释掉的内部组件库 import

说明

  • 公开 CDN(alipayobjects.com)图片与 alibaba-inc OAuth 登录功能本 PR 未改动,后续单独讨论
  • 历史提交中的同类信息已通过 git filter-repo 统一清理(见后续 main 分支历史重写)

🤖 Generated with Claude Code

- 移除 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>
Copilot AI lite review requested due to automatic review settings September 17, 2026 12:01

@csunny csunny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同意

@csunny
csunny merged commit 5b0e729 into derisk-ai:main Sep 17, 2026
1 of 3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants