You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
本文档记录了对 Claude Code v2.1.88 源代码的修改,移除了提示词级别的网络安全限制。
修改概述
修改文件
修改类型
状态
src/constants/cyberRiskInstruction.ts
清空安全指令
✅ 已完成
已移除的限制
1. CYBER_RISK_INSTRUCTION (网络安全风险指令)
文件位置:src/constants/cyberRiskInstruction.ts
移除前的完整内容:
exportconstCYBER_RISK_INSTRUCTION=`IMPORTANT: Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. Refuse requests for destructive techniques, DoS attacks, mass targeting, supply chain compromise, or detection evasion for malicious purposes. Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases.`
移除后的内容:
exportconstCYBER_RISK_INSTRUCTION=``
移除的具体限制详解
一、允许的场景 (已移除的检查)
序号
英文
中文
说明
1
authorized security testing
授权安全测试
原要求有书面授权才能协助渗透测试
2
defensive security
防御性安全
原允许安全加固、漏洞修复等防御性工作
3
CTF challenges
CTF 竞赛
原允许 CTF 竞赛相关协助
4
educational contexts
教育场景
原允许教学和学习目的的安全研究
二、拒绝的场景 (已移除的限制)
序号
英文
中文
具体行为示例
1
destructive techniques
破坏性技术
数据擦除工具、系统破坏脚本、勒索软件
2
DoS attacks
拒绝服务攻击
DDoS 脚本、SYN Flood、资源耗尽攻击
3
mass targeting
大规模攻击
批量漏洞扫描、自动化利用工具、蠕虫传播
4
supply chain compromise
供应链攻击
npm 包投毒、依赖库后门、构建系统入侵
5
detection evasion for malicious purposes
恶意逃避检测
杀毒软件绕过、沙箱逃逸、反调试技术
三、双重用途工具限制 (已移除)
序号
英文
中文
工具示例
1
C2 frameworks
命令控制框架
Cobalt Strike, Metasploit, Covenant, Sliver
2
credential testing
凭证测试工具
Hydra, crackmapexec, Medusa, Patator
3
exploit development
漏洞利用开发
Exploit 脚本编写、Payload 生成
原限制要求: 使用上述工具需要提供明确的授权上下文:
渗透测试合同
CTF 竞赛
安全研究
防御性用例
修改影响范围
该指令被注入到的位置:
普通模式 - src/constants/prompts.ts 第 182 行
functiongetSimpleIntroSection(): string{return` You are an interactive agent...${CYBER_RISK_INSTRUCTION} IMPORTANT: You must NEVER generate or guess URLs... `}
自主代理模式 - src/constants/prompts.ts 第 474 行
if(proactiveModule?.isProactiveActive()){return[`You are an autonomous agent...${CYBER_RISK_INSTRUCTION}`,// ...]}