Skip to content

Commit 8ecd78f

Browse files
authored
docs: harden agent-device skill security guidance (#113)
1 parent 6ab51ae commit 8ecd78f

3 files changed

Lines changed: 32 additions & 3 deletions

File tree

skills/agent-device/SKILL.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,21 @@ agent-device batch --steps-file /tmp/batch-steps.json --json
108108
- iOS settings helpers are simulator-only; use faceid `match|nonmatch|enroll|unenroll`.
109109
- If using `--save-script`, prefer explicit path syntax (`--save-script=flow.ad` or `./flow.ad`).
110110

111+
## Security and Trust Notes
112+
113+
- Prefer a preinstalled `agent-device` binary over on-demand package execution.
114+
- If install is required, pin an exact version (for example: `npx --yes agent-device@<exact-version> --help`).
115+
- Signing/provisioning environment variables are optional, sensitive, and only for iOS physical-device setup.
116+
- Logs/artifacts are written under `~/.agent-device`; replay scripts write to explicit paths you provide.
117+
- Keep logging off unless debugging and use least-privilege/isolated environments for autonomous runs.
118+
111119
## Common Mistakes
112120

113121
- Mixing debug flow into normal runs (keep logs off unless debugging).
114122
- Continuing to use stale refs after screen transitions.
115123
- Using URL opens with Android `--activity` (unsupported combination).
116124
- Treating `boot` as default first step instead of fallback.
117125

118-
If the CLI is not installed in environment, use:
119-
`npx -y agent-device`
120-
121126
## References
122127

123128
- [references/snapshot-refs.md](references/snapshot-refs.md)

skills/agent-device/references/logs-and-debug.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
Logging is off by default in normal flows. Enable it on demand for debugging windows. App output is written to a session-scoped file so agents can grep it instead of loading full logs into context.
44

5+
## Data Handling
6+
7+
- Default app logs are stored under `~/.agent-device/sessions/<session>/app.log`.
8+
- Replay scripts saved with `--save-script` are written to the explicit path you provide.
9+
- Log files may contain sensitive runtime data; review before sharing and clean up when finished.
10+
- Use `AGENT_DEVICE_APP_LOG_REDACT_PATTERNS` to redact sensitive patterns at write time when needed.
11+
12+
## Retention and Cleanup
13+
14+
- Keep logging scoped to active debug windows (`logs clear --restart` before repro, `logs stop` after repro).
15+
- Prefer bounded inspection (`grep -n`, `tail -50`) instead of reading full logs into context.
16+
- Clear session logs when finished:
17+
`agent-device logs clear`
18+
- Close session to stop background logging state:
19+
`agent-device close`
20+
521
## Quick Flow
622

723
```bash

skills/agent-device/references/permissions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ Use Automatic Signing in Xcode, or provide optional overrides:
1313
- `AGENT_DEVICE_IOS_SIGNING_IDENTITY`
1414
- `AGENT_DEVICE_IOS_PROVISIONING_PROFILE`
1515

16+
Security guidance for these overrides:
17+
18+
- These variables are optional and only needed for physical-device XCTest setup.
19+
- Treat values as sensitive host configuration; do not share in chat logs or commit to source control.
20+
- Do not provide private keys or unrelated secrets; use the minimum values required for signing.
21+
- Prefer Xcode Automatic Signing when possible to reduce manual secret/config handling.
22+
- For autonomous/CI runs, keep these unset by default and require explicit opt-in for physical-device workflows.
23+
1624
If setup/build takes long, increase:
1725

1826
- `AGENT_DEVICE_DAEMON_TIMEOUT_MS` (default `45000`, for example `120000`)

0 commit comments

Comments
 (0)