MCPcopy Index your code
hub / github.com/MiSecurity/x-patrol

github.com/MiSecurity/x-patrol @0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.3 ↗ · + Follow
1,166 symbols 3,678 edges 136 files 251 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Github leaked patrol

Github leaked patrol为一款github泄露巡航工具:

  1. 提供了WEB管理端,后台数据库支持SQLITE3、MYSQL和POSTGRES
  2. 双引擎搜索,github code接口搜索全局github以及本地搜索例行监控的repos
  3. 支持规则管理(github搜索规则及本地repos搜索规则)
  4. 支持github token管理和用户管理
  5. 支持在WEB中对扫描结果审核

使用方法

  • 命令行参数如下:
    1. web指令表示启动web管理端
    2. scan指令表示只启动github搜索
    3. scan -m local,表示只启动本地代码搜索功能
    4. scan -m all,表示同时启动github代码搜索与本地Repos搜索功能

  • 配置好conf/app.ini中的参数后使用WEB参数后启动WEB服务器。默认会监听到本地的8000端口,默认的管理员账户和密码分别为:xsecx@xsec.io

  • 登录WEB管理端,录入github token、规则。

  • 启动搜索功能:

  • 审核结果
    1. github code搜索结果审核:
    2. 本地repos详细搜索结果审核:

更新记录

2018/5/25,修改了本地扫描的逻辑

  1. 只扫描在后台添加的仓库了
  2. 同时支持git远程地址和本地地址,格式如下:

Extension points exported contracts — how you extend this code

Driver (Interface)
A "plugin" for each vcs that supports the very limited set of vcs operations that hound needs. [4 implementers]
util/vcs/vcs.go

Core symbols most depended-on inside this repo

push
called by 910
util/codesearch/index/write.go
e
called by 693
public/lib/echarts/2.2.7/echarts-all.js
i
called by 270
public/lib/echarts/2.2.7/echarts-all.js
t
called by 170
public/lib/echarts/2.2.7/echarts-all.js
match
called by 165
util/codesearch/regexp/match.go
a
called by 158
public/lib/echarts/2.2.7/echarts-all.js
find
called by 134
util/searcher/searcher.go
max
called by 127
util/codesearch/index/read.go

Shape

Function 909
Method 192
Struct 57
TypeAlias 7
Interface 1

Languages

TypeScript52%
Go48%

Modules by API surface

public/lib/datatables/jquery.dataTables.js155 symbols
public/lib/datatables/jquery.dataTables.min.js129 symbols
public/lib/jQuery/jquery-2.2.3.min.js73 symbols
util/codesearch/index/regexp.go45 symbols
util/codesearch/index/write.go40 symbols
public/lib/echarts/2.2.7/echarts-all.js40 symbols
util/codesearch/index/read.go31 symbols
util/searcher/searcher.go30 symbols
util/index/index.go28 symbols
util/codesearch/regexp/match.go22 symbols
public/lib/bootstrap/js/bootstrap.js22 symbols
public/lib/datatables/extensions/KeyTable/js/dataTables.keyTable.js20 symbols

For agents

$ claude mcp add x-patrol \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact