Trace SearchSAFE
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
文本搜索后端可以按你的喜好更换,比如rigrep甚至直接命令行grep
现在支持两种使用方式:
- Trae Skill模式(推荐):位于
.trae/skills/large-text-searcher/,与Trae深度集成 - MCP服务器模式:传统的MCP协议支持,兼容Kiro等IDE
详细迁移指南请参考 MIGRATION_GUIDE.md
searchstrategy.md 和 traceformat.md 要使用你自己的trace格式
⚠️注意⚠️ ai的大脑褶皱是平滑的,你只能让他代替你进行机械化的劳动,或者期待他某一下灵光一闪
所以,流水化和标准化的trace搜索方法是你要考虑的,ai做不了你自己认知以外的事
简单的算法ai表现很好,但复杂一些的算法会大量烧token,且表现不一定好,这里要自己多调试
技术交流可以加 vx baserker2 加好备注
[+] 新功能:搜索结果溢出100个时结果已经没有意义,直接在mcp拦截,让模型重新思考如何搜索,不要浪费token还把结果看一遍 [+] 新功能: 将提示词摘要后放到skill里 [+] 添加了通过魔数先验流程的能力 //把pyberchef弄进来
think //不同的模型在使用api上有不同的偏好,claude更喜欢使用context,而gemini更喜欢使用正则匹配,但都不太喜欢搜指令 add a,c,b 这样的
//思考轮次多了以后行为会产生变异,比如gemini开始使用grep绕开指定的mcp的正则
//目前模型没有对于行相对关系的理解,比如连续搜索两次,在这两次之间做对比
//格式问题,目前st___ /ld__ 和指令操作在两行,这样ai看的时候会浪费一轮搜索,甚至可能直接迷失,可以尝试通过把st 和指令弄到同一行解决,但会牺牲一些可读性,string_也是同理,funcall?
//在mcp给ai的返回中也可以给出提示,比如进行计数,10次搜索以后提醒ai该总结了
//看起来确实有必要在python层限制ai的自由发挥,有些参数不应该给他用,会导致偏激的思路
//ai本身智力发挥占很大一部分,菜的ai只会死找,厉害的能从明文开始猜测正反向同时推,也知道利用memcpy等信息
//添加一些辅助功能,比如魔数搜索,让模型知道某些地方有加密算法,或者先枚举所有出现过的libc函数,让ai有整体印象
//提供ida mcp 让模型能靠反编译代码获取局部信息
//添加unidbg mcp 让模型能通过unidbg分析算法模拟
//告诉ai哪些搜索方案是不严谨的
{
"context": 5,
"file_path": "/Users/teng/PycharmProjects/pythonProject/shopee_proj/log/record_00.txt",
"max_results": 10,
"pattern": "704da53700"
}
比如这种搜索结果极其容易导致偏见,max_results可以不给ai操作,ai只能获取结果
这样的话或许可以给find_prev和find_next? 这样的话就又回到污点上了//TODO context 提供小范围的反向污点,增加context质量,但这又影响格式,要怎么兼容?
//升级后段,给search_text增添行范围筛选
//增加书签功能,让模型能标记某某行到某某行是什么作用,把一些范围标记为没用,并影响筛选结果
//对显示的行长给出限制,别把context消耗太快
//TODO 常见的加密算法(无魔数)的识别和处理方法
//关于模型使用api有偏好的问题,尝试执行一次示例给模型理解
d8e83dc21c07OBSERVED · 2026-10-09Exposed tools (4)
4 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
extract_lines | read | 从文件中提取指定范围的行,支持大文件的高效随机访问 |
file_info | read | 获取文件的基本信息,如大小、行数等 |
search_crypto_magic | read | 通过搜索文件中的加密算法魔数,定位加密算法并找到入参 |
search_text | read | 在大文件中进行高性能搜索,支持正则表达式和并行处理 |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (4)
"RC4": [0x4F3B2B74, 0x4E27D213],
mcp, loguru
target/release/large-text-viewer
Gates applied: no_behavioural_pass, no_license.
d8e83dc21c07full audit observations/trust-audit/mcp-server/songpengfei1111-dot__trace-search.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | d8e83dc21c07 | SAFE | B | 89 | first audit |
Questions
What tools does Trace Search expose?
4 in total: 4 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Trace Search safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Trace Search need?
No credential environment variables were found in its source, so it appears to need none.
How does Trace Search run?
It speaks stdio, so it runs as a local process your client starts.
How current is this page?
The grade is for one exact copy of the source (d8e83dc21c07), read on 2026-10-09. The repository is watched and re-audited when it changes.