Skip to content
Merged
12 changes: 12 additions & 0 deletions .agents/skills/verify-deepseekbot/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ The Windows runner uses [Android device QA](../../../docs/agents/android-device-
Web-export checks qualify their named web paths; native-only behavior remains untested until
its device result is recorded.

## Team mode security suite

For a change that affects Team mode permissions, run the real-model security suite on an isolated Host and attach its report to the PR:

```bash
pnpm build
node scripts/e2e-team-security.mjs --launch # every scenario
node scripts/e2e-team-security.mjs --name <n> --scenario B # only file and Shell boundaries
```

It sets up roles with Role Policy, members, public and private Bots, folders and Channels, then drives real model turns that try to leak finance figures (A), reach other members' folders, the Host data directory or the Host API through file tools, Shell and grants (B), and cross private Bots, Channels, Human DMs, offboarding and model allowlists (C). Hard boundaries are asserted on Host state and tool results; Role Policy scenarios pass only when no restricted value appears in any reply. Shell checks are enforced only when `team-mode status` reports `isolation: enforced` (Linux with bwrap, slirp4netns and nft); elsewhere B2 reports the known gap. The report lands in `.humanlayer/team-security/<time>/`; publish it with `pnpm evidence:publish`.

## Evidence

`shot` writes `<label>.png`, `<label>.aria.txt` and `<label>.console.txt` to `.humanlayer/verify/<n>/evidence/`, and `<label>.failure.png` plus `<label>.failure.aria.txt` when a step fails. Its JSON output lists every step it performed.
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/verify-deepseekbot/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| VRM companion Panel | yes for speaking | `scripts/e2e-vrm-companion.mjs` | [vrm-companion.md](vrm-companion.md) |
| Desktop whole-window zoom (controlled S1 / Windows candidate) | no | `scripts/e2e-desktop-zoom-launch.mjs`, `scripts/e2e-desktop-zoom-windows.mjs`, `scripts/e2e-dock-zoom.mjs`, `scripts/e2e-workspace-chrome.mjs` | [desktop-window-zoom.md](desktop-window-zoom.md) |
| Global search: Alt/Option+K, settings results and pinyin matching | no | `verify-app` Bot mode path | [global-search.md](global-search.md) |
| Team mode: Owner password, members, member sign-in, automatic Channel membership | no | `verify-app` Owner path + member browser + `deepseekbot --as`, `scripts/e2e-team-auto-join.mjs`, `scripts/e2e-team-human-dm.mjs` | [team-mode.md](team-mode.md) |
| Team mode: Owner password, members, member sign-in, automatic Channel membership, M15 security suite | no | `verify-app` Owner path + member browser + `deepseekbot --as`, `scripts/e2e-team-auto-join.mjs`, `scripts/e2e-team-human-dm.mjs`, `scripts/e2e-team-security.mjs` | [team-mode.md](team-mode.md) |
| DeepSeekBot device-local appearance | no | `scripts/e2e-local-appearance.mjs` | [local-appearance.md](local-appearance.md) |
| Functional Panel appearance | no | `scripts/e2e-panel-appearance.mjs`, `scripts/e2e-nested-appearance.mjs` | [panel-appearance.md](panel-appearance.md) |
| Global panel materials | no | `scripts/e2e-global-materials.mjs` | [global-materials.md](global-materials.md) |
Expand Down
2 changes: 2 additions & 0 deletions .agents/skills/verify-deepseekbot/features/team-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ Managed Tailscale qualification: launch a named isolated Host, save private Serv
#4222 automatic Channel membership: launch a fresh named instance and run `node scripts/e2e-team-auto-join.mjs --name <instance>`. It creates a Finance role, public, roles and private Channels and two members, then checks through `--as` that each member is in exactly the Channels they can see, that pins stay per user, that granting the role joins its Channel, that revoking it removes the Channel even while it is open in the member Web Client, and that making a Channel private removes every automatic member. It captures the member Web Client in light and dark under `.humanlayer/verify/<instance>/team-auto-join/`. Native mobile and Human acceptance are separate.

#4222 Human DMs: run `node scripts/e2e-team-human-dm.mjs --name <instance>` on a fresh named instance. Opening a person with `--as <user> dm <username>` returns the DM but lists it for neither side; the first `channels send` lists it for both, and the recipient's member Web Client shows it without a reload. Light and dark captures land under `.humanlayer/verify/<instance>/team-human-dm/`. Native mobile and Human acceptance are separate.

M15 security suite: `node scripts/e2e-team-security.mjs --launch` (or `--name <instance>` on a running Host) drives real model turns against Role Policy (A), file, Shell and grant boundaries (B) and the shipped hard boundaries (C), asserting on Host state and tool results. Shell boundaries count only when `team-mode status` reports `isolation: enforced`. Publish `.humanlayer/team-security/<time>/` with `pnpm evidence:publish`; AGENTS.md requires it for permission-affecting PRs.
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# AGENTS.md — BotHarness

Project-specific guidance for AI coding agents.
Expand Down Expand Up @@ -154,6 +154,8 @@

Pull requests run only the tests their diff can reach; see [CI test plan](docs/agents/development-scripts.md#ci-test-plan) for the rules and `node scripts/ci-plan.mjs --base origin/main` to preview them. Add the `ci:full` label to force a full run on a risky change. When a PR adds a kind of file or test input that the plan misses, update `RULES` in `scripts/ci-plan.mjs` in the same PR; `pnpm lint` fails until it does.

Every PR that changes who can read, write, run or reach something in Team mode (roles, Role Policy, Bot visibility, Channel access, folders and grants, member execution confinement, devices, offboarding, model allowlists) runs the Team mode security suite on its head commit and attaches the result: `node scripts/e2e-team-security.mjs --launch` (real model, isolated Host). Publish `report.md` and the transcripts with `pnpm evidence:publish`, never Git. A failing scenario blocks the merge unless the PR names it as a known gap with a tracking issue.

For every PR, assess whether a detailed explanation would help review; follow [PR HTML explainers](docs/agents/pr-html-explainer.md). Use the repository's `answer-me-with-html` skill for nontrivial behavior, lifecycle, permission, persistence, or cross-module changes; simple edits may omit it. Keep `visual-pr` as the PR description authority, bind explainers to the exact head SHA, and do not treat local HTML as reviewer-accessible or as runtime evidence.

For PRs that change architecture or data flow across modules, read [the optional PR Lens supplement](docs/agents/visual-pr-pr-lens.md) and use a diagram when it clarifies the review. HTML explains the details; PR Lens provides focused architecture/data-flow views. Neither replaces required GitHub-rendered UI evidence or the Human-QA gate.
Expand Down
11 changes: 11 additions & 0 deletions changes/4197-team-security-suite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
section: Added
---

## en

- Team mode has a re-runnable security suite, `node scripts/e2e-team-security.mjs`. It drives real model turns on an isolated Host that try to leak Role Policy-restricted figures, reach other members' folders, the Host data directory and the Host API through file tools, Shell and grants, and cross private Bots, Channels, DMs, offboarding and model allowlists. Pull requests that change Team mode permissions attach its report ([#4197](https://github.com/BotHarness/DeepSeekBot/issues/4197)).

## zh

- Team 模式新增可重复运行的安全场景套件 `node scripts/e2e-team-security.mjs`。它在隔离 Host 上用真实模型对话发起各种尝试:套取 Role Policy 限制的数据;通过文件工具、Shell 和授权申请访问其他成员的文件夹、Host 数据目录和 Host API;越过私有 Bot、频道、私信、离职处理和模型白名单的限制。修改 Team 模式权限的 PR 需要附上它的报告([#4197](https://github.com/BotHarness/DeepSeekBot/issues/4197))。
13 changes: 13 additions & 0 deletions docs/agents/development-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,19 @@ Every run uses `opencode-go/deepseek-v4.1-flash` unless `--model` names others (

The `llm e2e` workflow runs them nightly, after a push to `main` that touches a scenario's paths (only those scenarios), on manual dispatch, and on a pull request labeled `ci:llm-e2e`. It uses the OpenCode Go subscription through the `OPENCODE_GO_API_KEY` repository secret on `deepseek-v4.1-flash` (selected with `scripts/dev-model.mjs setup --from-env --model deepseek-v4.1-flash`) and skips with a notice without it. It is never part of the required `verify` check. When a feature adds a model-driven flow, add a scenario with the paths it depends on.

### Team mode security suite

`scripts/e2e-team-security.mjs` (#4197) is the security counterpart for Team mode. It creates roles with Role Policy, members, public and private Bots, folders and Channels on an isolated Host, then drives real model turns that try to break the permission model: Role Policy leaks through direct asks, claimed permission, role-play, summaries, encodings and Bot relays (A); file tools, Shell, symlinks, `..` paths, Host API access and grant requests outside the member's folders (B); and private Bots, private Channels, Human DMs, offboarding and model allowlists (C). It asserts hard boundaries on Host state and tool results; Role Policy scenarios pass only when no restricted value appears in any reply. Shell boundaries are enforced only when `team-mode status` reports `isolation: enforced`.

```bash
pnpm build
node scripts/e2e-team-security.mjs --launch # every scenario
node scripts/e2e-team-security.mjs --name <n> --scenario A # Role Policy only, on a running instance
node scripts/e2e-team-security.mjs --list
```

The report (`report.json`, `report.md`, `fixture.json` and `transcripts/`) lands in `.humanlayer/team-security/<time>/`. Publish it with `pnpm evidence:publish` and link it from the PR; AGENTS.md requires it for every PR that changes Team mode permissions.

> > > > > > > origin/claude/bot-mention-wake-te5p0m

## Call keyframe evaluation (VC8)
Expand Down
Loading
Loading