Files
AirCoding ae44be31d5 chore: push all design docs, V2 plan specs, and current working state
Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2,
AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code
changes across packages.

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

58 lines
1.7 KiB
Markdown
Executable File
Raw Permalink 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` 时阻止合并。