
Research
/Security News
TensorLake npm SDK Compromised in ChainDrop Shai-Hulud Credential-Stealing Attack
Tensorlake npm SDK version 0.5.144 was compromised in a ChainDrop / Shai-Hulud attack, delivering credential-stealing malware.
@redscope-ai/redscope
Advanced tools
RedScope AI - security-focused AI CLI for penetration testing, asset reconnaissance, threat tracing, and red-team orchestration
English | 中文
RedScope AI 是一个面向安全团队、渗透测试、资产侦察、威胁追踪和红队编排的 AI CLI。它基于 Bun、TypeScript、React/Ink 和 MCP 工具生态构建,提供交互式终端助手、非交互式管道模式、多模型 Provider、插件系统、远程控制服务和一套受控的安全工作流脚本。
仅在你拥有授权的目标、资产、日志或代码仓库上使用 RedScope AI。项目内置的安全套件强调 scope、审批、速率限制、证据留存和可审计流程,不鼓励也不支持未授权扫描。
redscoperedscope -p "..." --output-format json要求:
npm i -g @redscope-ai/redscope
redscope --version
从源码开发或调试本仓库时,再使用 Bun 安装依赖和构建:
bun install
bun run build
开发模式:
bun run dev
bun run dev:inspect
常用检查:
bun run typecheck
bun test
bun run test:all
RedScope 推荐把模型端点、API Key 和默认模型写入用户配置目录的 env.config,默认路径是:
%USERPROFILE%\.redscope\env.config~/.redscope/env.config仓库提供了 env.config.example,可复制后按需填写。env.config 会在启动时加载,shell 中临时设置的环境变量优先级更高。
OpenAI 兼容端点示例:
REDSCOPE_MODEL_PROVIDER=openai
REDSCOPE_BASE_URL=https://api.openai.com/v1
REDSCOPE_API_KEY=sk-your-key
REDSCOPE_MODEL=gpt-4.1
DeepSeek 示例:
REDSCOPE_MODEL_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-your-key
DEEPSEEK_MODEL=deepseek-chat
Gemini 示例:
REDSCOPE_MODEL_PROVIDER=gemini
GEMINI_API_KEY=your-gemini-key
GEMINI_MODEL=gemini-2.5-pro
更多配置项见 项目使用文档。
启动交互式会话:
redscope
直接传入提示词:
redscope "帮我审查这个仓库的安全风险"
管道模式:
echo "总结 package.json 的脚本" | redscope -p
redscope -p "输出 JSON 摘要" --output-format json
指定模型和权限模式:
redscope --model sonnet --permission-mode acceptEdits
redscope -p "生成一份发布说明" --allowedTools "Read,Grep,Glob"
MCP 示例:
redscope mcp list
redscope mcp add my-server npx -- -y @my-org/mcp-server
redscope mcp remove my-server
认证与状态:
redscope auth login
redscope auth status --text
redscope auth logout
完整命令参考见 docs/usage.md。
RedScope 的安全工作流采用先授权、再计划、再执行、最后归档的流程。发布版用户可以直接用 redscope 发起评估;默认只做计划和低影响分析,不会运行主动扫描。主动或受限测试必须在提示词中明确说明已授权范围、测试窗口和执行边界,并由人工确认。
redscope "列出 RedScope 支持的安全评估 profile,并说明每种 profile 需要的授权条件"
redscope "基于 tools/authorized-scope.example.json,对 https://www.example.com/ 生成 baseline-url-review 安全评估计划,不执行主动扫描"
redscope "根据最近一次 baseline-url-review 评估结果,整理安全报告、证据索引和后续修复建议"
源码开发者需要生成本地 run/report/memory 产物时,可使用 docs/usage.md 中的 bun run redscope:* 脚本命令。
flowchart LR
A["Scope / Rules of Engagement"] --> B["Profile Selection"]
B --> C["Plan Only by Default"]
C --> D{"--execute?"}
D -- "No" --> E["Run Artifacts"]
D -- "Yes + Confirmation" --> F["Controlled Tool Execution"]
F --> E
E --> G["Report Pipeline"]
G --> H["Observability Memory"]
G --> I["Delivery Package"]
以下示例展示 RedScope AI 在授权确认、目标识别与安全评估报告输出中的终端效果。
截图中的目标地址和敏感信息已脱敏。



flowchart TD
U["User / CI / Pipe"] --> CLI["src/entrypoints/cli.tsx"]
CLI --> MAIN["src/main.tsx Commander CLI"]
MAIN --> REPL["React Ink REPL"]
MAIN --> HEADLESS["Print / JSON / Stream JSON"]
REPL --> ENGINE["QueryEngine"]
HEADLESS --> ENGINE
ENGINE --> API["Provider Adapter"]
API --> P1["Anthropic"]
API --> P2["OpenAI Compatible"]
API --> P3["Gemini / Grok / Cloud"]
ENGINE --> TOOLS["Builtin Tools + MCP Tools"]
TOOLS --> FILES["Workspace Files"]
TOOLS --> SHELL["Shell / PowerShell"]
TOOLS --> MCP["MCP Servers / Plugins"]
bun:testpackages/remote-control-server 中的 React + Vite + Radix UI如果 RedScope AI 帮你节省了时间,欢迎支持项目继续维护:
微信 / 支付宝打赏:
| 微信 | 支付宝 |
|---|---|
![]() | ![]() |
本项目 README 使用 Anti 996 badge 展示劳动价值立场。正式发布前请根据项目实际授权策略补充或确认仓库根目录的 LICENSE 文件。
FAQs
RedScope AI - security-focused AI CLI for penetration testing, asset reconnaissance, threat tracing, and red-team orchestration
The npm package @redscope-ai/redscope receives a total of 12 weekly downloads. As such, @redscope-ai/redscope popularity was classified as not popular.
We found that @redscope-ai/redscope demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Tensorlake npm SDK version 0.5.144 was compromised in a ChainDrop / Shai-Hulud attack, delivering credential-stealing malware.

Research
/Security News
Socket found 16 malicious Firefox extensions designed to steal crypto wallet recovery phrases and private keys using cloned Rabby and OKX interfaces.

Product
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.