Files
AirPlan-V2/commands/sec.md
AirLongDian 9ad232af38 docs: 全部 12 个命令文件完整化 — 消除 P0/P1 操作歧义
P0: 9 个存根命令文件从 11 行模板扩展为完整操作文档
- dbg: 7 步工作流表格 + 证据类型 + 子命令 + Dbg↔Do 集成路径
- ctx: 三级降级压缩 + 质量校验 + Token 估算 + 陈旧锁清理
- dep: SSH 部署流程 + MD5 校验 + systemd 管理
- tst: 5 种测试框架 + run 命令 + T-TEST 集成
- sec: advisory/blocking 双模式 + 文件/目录/Woker result 三种扫描
- rvr: 审查模式 + highRiskAudit + code-to-design + Eng merge 集成
- sdb: 6 种后端 + diff 模式 + Dbg 取证集成
- ndb: 网络抓包 + Dbg 取证集成
- xdb: kmsgrab/xvfb/fallback 三后端 + Dbg/Do GUI 验证集成

P1: 3 个有内容文件的歧义修复
- do: AirDbg 路由具体命令 + 证据采集(xdb/ndb/sdb/tst)命令
- arc: 三阶段→命令映射表 + phase 推进方式
- eng: monitor 轮询循环伪代码(Agent 无时钟概念,必须循环调 monitor)

全部命令统一使用 `python scripts/airplan.py` 路径(清除旧 $HOME/plugins 引用)

63 项功能测试全通过

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 15:57:12 +08:00

58 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: "AirPlan sec mode - security scanner for sensitive data detection"
argument-hint: "[scan|status]"
allowed-tools: "[Read, Glob, Grep, Bash, Write, Edit]"
---
# /sec
AirSec 是安全扫描器。扫描制品中的敏感数据API 密钥、令牌、密码),支持 advisory只报告和 blocking阻止合并两种模式。
## 两种扫描模式
| 模式 | --sec-mode | 行为 |
|------|-----------|------|
| advisory | `advisory` | 只报告,不阻止 |
| blocking | `blocking` | 发现敏感数据时阻止合并 |
## 子命令
### scan — 执行安全扫描
扫描单个文件:
```bash
python scripts/airplan.py --mode sec --project . --sub scan --task-id T-001 --scan-path ./src/config.cpp --sec-mode blocking
```
扫描整个目录:
```bash
python scripts/airplan.py --mode sec --project . --sub scan --task-id T-001 --scan-path ./src --sec-mode advisory
```
不传 `--scan-path` 时扫描 Worker result
```bash
python scripts/airplan.py --mode sec --project . --sub scan --task-id T-001 --sec-mode blocking
```
参数:
- `--task-id`:关联任务 ID
- `--scan-path`:扫描目标路径(文件或目录,可选)
- `--sec-mode``advisory`(默认)或 `blocking`
返回 `{task_id, clean, findings, whitelisted, mode}`。emit `sec.scan` 事件。
### status — 查看扫描状态
```bash
python scripts/airplan.py --mode sec --project . --sub status
```
## 集成路径
**Do Worker finish 前**Worker 完成代码后、调 finish 前,先调 sec scan
```bash
python scripts/airplan.py --mode sec --project . --sub scan --task-id {tid} --sec-mode blocking
```
**Eng merge 前**merge_worker_result Phase 1 验证后检查 sec 扫描结果。`clean=false` 时阻止合并。