# Installing the SecurityV0 laptop collector: instructions for a coding agent

You are a coding agent (Claude Code, Codex or similar) running on a Mac. The person you work for
asked you to install the SecurityV0 laptop collector for an internal test. Follow these steps in
order. Stop and tell the person if any step fails.

The collector is a program that runs as root every hour. It lists the AI agents on the Mac and
sends that list to SecurityV0's dev environment at `https://dev.securityv0.com`, tenant `fabrikam`.
Version 0.1.0+abd61cf354. The human-readable page is https://sv0-collector-dev.pages.dev/. There is one tarball for Apple
silicon (`arm64`) and one for Intel (`x86_64`); download both, and the installer picks the one
for this Mac.

## Rules for you

- Never ask for, read, print, copy or store the connector key or the two Cloudflare values. The
  person types them into the installer in their own Terminal window. Do not open
  `/Library/Application Support/SecurityV0/collector.env`.
- Do not run `sudo` yourself. The installer needs the person's password and the three values, so
  the person runs it.
- Do not change the downloaded files. Do not install anything else.

## 1. Download

Use a new folder in the person's home. The installer refuses a folder other people can write
to, such as `/tmp`.

```bash
mkdir -p ~/sv0-collector && cd ~/sv0-collector
curl -fsSLO https://sv0-collector-dev.pages.dev/install.sh
curl -fsSLO https://sv0-collector-dev.pages.dev/sv0-collector-macos-arm64.tar.gz
curl -fsSLO https://sv0-collector-dev.pages.dev/sv0-collector-macos-x86_64.tar.gz
curl -fsSLO https://sv0-collector-dev.pages.dev/SHA256SUMS
```

## 2. Verify

```bash
cd ~/sv0-collector && shasum -a 256 -c SHA256SUMS
```

All three lines must end in `OK`. Then compare SHA256SUMS with the checksums this page was
published with:

```
e2369f239f41e7c4ea26b3bdbe1b473d4f934ae3e525f755627535f6320a4fb0  install.sh
d66939a88c1ec169c3e4cd50c61c8fad6bfdc5c1debdad9e0a7ea242a6914d09  sv0-collector-macos-arm64.tar.gz
50e3b7b199b81ce90d0cd711849587599b02d0f0ba753044e6cc455e7d7fa7fc  sv0-collector-macos-x86_64.tar.gz
```

If a line does not say `OK`, or a checksum differs from the list above, stop. Delete the folder
and tell the person the download did not match.

## 3. Read the installer and explain it

Read `install.sh` in full. Then tell the person, in your own words and from what the script
says, before anything runs:

- **What it installs and where.** A standalone Python with the collector in
  `/Library/Application Support/SecurityV0/collector`, owned by root. A settings file
  `collector.env` in the same folder, readable by root only, that holds the connector key and the
  two Cloudflare values. A LaunchDaemon at
  `/Library/LaunchDaemons/com.securityv0.agent-collector.plist`. Logs in
  `/Library/Logs/SecurityV0`, readable by root only.
- **What runs as root, and when.** The script `sv0-collector-run.sh` runs the collector as root
  when the LaunchDaemon loads and every 3600 seconds after. The collector reads each person's
  files in a separate process that runs as that person.
- **What it reads.** For every person on the Mac: the settings and activity logs of Claude Code,
  Codex, Claude Desktop, Hermes Agent and OpenClaw, and the sign-in files of the AWS CLI, the
  Google Cloud CLI and the GitHub CLI.
- **What it sends, and where.** One record per run to `https://dev.securityv0.com`, tenant `fabrikam`:
  the Mac's name and serial number; each agent with its permission settings, MCP server names and
  addresses, Claude organization and seat type; daily counts of sessions and tool calls; each
  signed-in Claude account's email and account id (setting `SV0_REQUESTERS=id`); and the
  identifiers of command-line sign-ins: AWS access key ids and IAM Identity Center profiles, Google
  Cloud key ids and gcloud accounts, GitHub CLI logins (setting `SV0_CREDENTIAL_DIGESTS=on`).
  It never sends prompts, answers, file contents, tool arguments or results, passwords, tokens or
  secret keys. These two settings are in `defaults.env` inside each tarball; you can show them
  with `tar -xzOf sv0-collector-macos-arm64.tar.gz sv0-collector-macos/defaults.env`.
- **What it changes.** Nothing on the Mac except the folders above.

Ask the person whether to go ahead. Continue only on a clear yes.

## 4. The person runs the installer

Ask the person to open a Terminal window (not this session) and run:

```bash
cd ~/sv0-collector && chmod +x install.sh && sudo ./install.sh
```

Tell them what will happen: macOS asks for their Mac password; the installer asks for the
platform address and tenant (press Enter to accept `https://dev.securityv0.com` and `fabrikam`), then this
Mac's connector key and the Cloudflare Access client id and secret, which they paste from the
private message they received. The key and the secret are hidden while pasted. The first scan
takes one to a few minutes. Ask them to tell you when it has finished. They do not need to paste
the output to you.

## 5. Report the result

Run, without sudo:

```bash
~/sv0-collector/install.sh status
```

Report the `last run` line. Success looks like
`last run: <time> upload: HTTP 202, accepted, sync id <id>`. Anything else means the scan did
not reach SecurityV0: report the line as it is. A `401` or `403` usually means a value was
pasted wrongly; the person can run `sudo ./install.sh` again and answer `n` to keeping the
settings.

Then tell the person:

- The collector now runs every hour as root.
- To see the last result: `~/sv0-collector/install.sh status`.
- To remove everything, including the key and the logs:
  `sudo ~/sv0-collector/install.sh uninstall`.
