diff --git a/README.md b/README.md index 8a4810f..132fa64 100644 --- a/README.md +++ b/README.md @@ -207,9 +207,17 @@ explaining why: `not_found`, `error`, `pipeline_stopped`. the camera, what is stored, retention and redaction. - [Software bill of materials](docs/SBOM.md): CycloneDX SBOM and licence summary for 0.1.1. +- [Shared responsibility](docs/SHARED_RESPONSIBILITY.md): who owns which + security control (CloudLab Works, you, the model provider), per AI-CAIQ + question. +- [Risk assessment](docs/RISK_ASSESSMENT.md): AI risk register and AI impact + assessment. +- [Hardening](docs/HARDENING.md): running oak-events as a dedicated user, with + a sandboxed, read-only MCP server. - CloudLab Works [security policies](https://github.com/cloudlabworks/.github/tree/main/policies): security baseline, security and AI governance policy (including acceptable - use of oak-events) and incident response plan. + use of oak-events), incident response plan, supply chain policy and the + security program index. Report vulnerabilities as described in [`SECURITY.md`](SECURITY.md). diff --git a/docs/HARDENING.md b/docs/HARDENING.md new file mode 100644 index 0000000..f07baa7 --- /dev/null +++ b/docs/HARDENING.md @@ -0,0 +1,139 @@ +# Hardening an oak-events deployment + +| | | +| --- | --- | +| Owner | Alex Alvord, CloudLab Works | +| Version | Approved by Alex Alvord and published 2026-11-02. Needs oak-events 0.1.2 or later (`--model-sha256`, `--access-log`) | +| Review | At each release that changes a command line option, the MCP tools or the files oak-events writes, and at least once a year (next by 2027-11-01) | +| Files | [`examples/hardening/`](../examples/hardening/): `oak-events-run.service`, `oak-events-mcp-sandbox`, `test/` | + +oak-events already limits itself: no pictures leave the camera, the MCP server has three read-only tools +and no path arguments, and event files are owner-only. This guide adds operating-system isolation, so +that a bug in oak-events, in DepthAI or in an agent's use of the MCP tools cannot reach the rest of the +host. It is the customer's part of AI-CAIQ AIS-13.1 (see `SHARED_RESPONSIBILITY.md`). + +The recipe is for Linux with systemd. It was tested in a container (section 5), not with a camera. + +## 1. Layout + +| Path | Owner and mode | Who writes it | Who reads it | +| --- | --- | --- | --- | +| `/opt/oak-events/venv` | root, 0755 | Install step only | Both services | +| `/etc/oak-events/` (model archive, zones file) | root, 0644 files | Admin only | Runner | +| `/var/lib/oak-events/events/` | `oak-events`, 0700; files 0600 | Runner only | MCP server, read-only | +| `/var/log/oak-events/mcp-access.jsonl` | `oak-events`, 0700 directory; file 0600 | MCP server | Admin | + +Two processes, one dedicated system user, `oak-events`, with no login shell. The runner can write only the +events directory. The MCP server can write only its access log: the events directory is read-only to it, +and it has no network at all. + +## 2. Install + +```bash +sudo useradd --system --home-dir /var/lib/oak-events --shell /usr/sbin/nologin oak-events +sudo python3 -m venv /opt/oak-events/venv +sudo /opt/oak-events/venv/bin/pip install 'oak-events[camera,mcp]' # pin the version you tested +sudo install -d -m 0755 /etc/oak-events +sudo install -m 0644 yolov6n-r2-288x512.rvc2.tar.xz /etc/oak-events/ +``` + +Verify the model archive first (`MODEL_CARD.md` section 2.1) and put its SHA-256 in the unit file. + +## 3. Runner: a sandboxed system service + +Copy `examples/hardening/oak-events-run.service` to `/etc/systemd/system/`, edit the model path, hash and +options, then: + +```bash +sudo systemctl daemon-reload +sudo systemctl enable --now oak-events-run.service +journalctl -u oak-events-run.service -f +``` + +What the unit does: + +- runs as `oak-events`, with `NoNewPrivileges`, no capabilities, and a system call filter + (`@system-service`); +- `ProtectSystem=strict`, `ProtectHome=yes`, `PrivateTmp=yes`: the whole file system is read-only or + hidden except the state directory `/var/lib/oak-events/events`, created by systemd with mode 0700; +- `UMask=0077`, so nothing it creates is readable by other users; +- `--model-sha256`: refuses to start if the model archive changed; +- `--quiet`: events go only to the event files, not to the journal (otherwise the journal keeps a + second copy of every event; `DATA_FLOW.md` section 3); +- network limited to IPv4, IPv6, netlink and Unix sockets, which a PoE camera needs. For a USB camera, use + the commented lines instead: no network at all, and only USB devices. + +**Not tested with a camera.** The unit was tested without DepthAI and without a camera (section 5). If +DepthAI fails under it, read the journal for `SECCOMP` or address-family errors and relax one option at a +time; please report what you had to change. + +## 4. MCP server: read-only, no network, started on demand + +An MCP client starts the server over stdio, so it is not a long-running service. The wrapper +`examples/hardening/oak-events-mcp-sandbox` starts it as a transient systemd unit with `systemd-run +--pipe`, which passes stdin and stdout through to the client: + +- runs as `oak-events` (the only user that can read the 0600 event files); +- `ReadOnlyPaths=/var/lib/oak-events`: it can read events but cannot change or add any; +- `PrivateNetwork=yes`, `IPAddressDeny=any`, Unix sockets only: no network; +- `PrivateDevices=yes`, `ProtectHome=yes`, `ProtectSystem=strict`, no capabilities, system call filter, + memory and task limits; +- `--access-log /var/log/oak-events/mcp-access.jsonl`: one line per tool call (tool, argument sizes, + result count, outcome, client process id), never values or results. The log directory is the only + writable path. + +`systemd-run` needs root, so the desktop user who runs the MCP client gets one `sudo` rule for this exact +command, which takes no arguments: + +```bash +sudo install -m 0755 oak-events-mcp-sandbox /usr/local/bin/ +echo 'alice ALL=(root) NOPASSWD: /usr/local/bin/oak-events-mcp-sandbox' | sudo tee /etc/sudoers.d/oak-events-mcp +sudo chmod 0440 /etc/sudoers.d/oak-events-mcp +sudo visudo -c +``` + +Replace `alice` with the user. Client configuration (same shape as `examples/claude-desktop-mcp.json`): + +```json +{"mcpServers": {"oak-events": {"command": "sudo", "args": ["-n", "/usr/local/bin/oak-events-mcp-sandbox"]}}} +``` + +If the MCP client runs on another computer, use `ssh` as the command (`ssh HOST sudo -n +/usr/local/bin/oak-events-mcp-sandbox`); stdio passes through ssh. + +## 5. Test results + +`bash examples/hardening/test/test.sh WHEEL MODEL` builds a Debian 13 container with systemd as PID 1, +installs oak-events from a wheel, and checks the two recipes. Run on 2026-11-02 with a wheel built from the +code released in oak-events 0.1.2 (branch `csa/logging-integrity`) and the reference model archive; all 23 checks passed: + +| Check | Result | +| --- | --- | +| Runner starts as `oak-events`, passes the model hash check, writes the `privacy` event | Pass | +| Event files owned by `oak-events`, mode 0600; directory mode 0700 | Pass | +| Runner can write the events directory, cannot write `/etc`, cannot read `/home`, cannot gain root | Pass | +| A wrong `--model-sha256` stops the runner with a mismatch event, camera not opened | Pass | +| MCP server through the wrapper, started by a desktop user with `sudo`: `camera_health` and `recent_events` answer; `private` is `true` | Pass | +| Access log written, owned by `oak-events`, mode 0600, with argument sizes and result counts only | Pass | +| The desktop user cannot read event files directly | Pass | +| MCP sandbox can read events and write its log, cannot write the events directory, cannot read `/home`, has no network (the same connection works outside the sandbox) | Pass | +| `systemd-analyze security oak-events-run.service` | 1.7 ("OK"; lower is better) | + +Not tested: a real camera, DepthAI under these options, USB device access, other distributions. + +## 6. Also recommended + +1. **Camera network.** Put a PoE camera on its own network segment or VLAN that only the oak-events host + can reach (`DATA_FLOW.md` section 2). Nothing else needs to talk to it. +2. **Direct file access.** The MCP access log records reads through MCP, not someone running `cat` on + the files. To record those too, add a Linux audit rule, for example + `auditctl -w /var/lib/oak-events/events -p rwa -k oak-events`, and keep it in `/etc/audit/rules.d/`. + Not tested by CloudLab Works. +3. **Retention.** Delete old event files on a timer (`DATA_FLOW.md` section 4); run the timer as + `oak-events`. +4. **Alerts.** Forward `privacy` events with `"private": false` and `camera` errors to someone who will + read them (`examples/webhook.md`). +5. **Updates.** Pin the oak-events and DepthAI versions you tested; update both deliberately and re-run + the model spot-check (`MODEL_CARD.md` section 7) after a DepthAI update. + +macOS (launchd) is not covered yet. diff --git a/docs/MODEL_CARD.md b/docs/MODEL_CARD.md index aea92c7..4fc4814 100644 --- a/docs/MODEL_CARD.md +++ b/docs/MODEL_CARD.md @@ -3,7 +3,7 @@ | | | | --- | --- | | Owner | Alex Alvord, CloudLab Works | -| Version | Published 2026-11-02; written against commit 00d9053 | +| Version | Published 2026-11-02; written against commit 00d9053. Revised, approved by Alex Alvord and published 2026-11-02: verification steps (section 2.1), provenance (section 2.2), monitoring and spot-check (section 7), bias and fairness (section 8) | | Review | At each release that changes model guidance, and at least once a year (next by 2027-11-01) | ## 1. What oak-events ships @@ -42,6 +42,52 @@ not record which archive file was loaded, so the link between this hash and the UNVERIFIED. The zoo now lists 4 versions of this model; a new download may differ. Check the hash of what you download and compare with this card. +### 2.1 Verifying a model archive + +Check the archive at every handover: when you download it, when you copy it to the host that runs +oak-events, and every time oak-events loads it. + +1. **Hash.** Compare with the SHA-256 above (Linux `sha256sum`, macOS `shasum -a 256`): + + ```bash + echo "8372e2dec2d5e192e6ad9555b9412c3e31101b06e68121cfd08e92d4a4641122 yolov6n-r2-288x512.rvc2.tar.xz" | sha256sum -c - + ``` + + It must print `OK`. Tested on macOS (`shasum -a 256 -c -`) and Debian 13 (`sha256sum -c -`) on + 2026-11-02 against the archive described here. + +2. **Contents.** The archive must hold exactly three regular files, and nothing that runs on the host: + + ```bash + tar -tvJf yolov6n-r2-288x512.rvc2.tar.xz + ``` + + Expected: `config.json`, `buildinfo.json` and `yolov6n-r2-288x512.superblob`, each a regular file + (the listing starts with `-`). Any other file, a link, or a Python, pickle or script file means the + archive is not the one described here: do not use it. Checked 2026-11-02. + +3. **At every load** (from the 0.1.2 and later): run with + `--model-sha256 8372e2dec2d5e192e6ad9555b9412c3e31101b06e68121cfd08e92d4a4641122`. oak-events + computes the archive's SHA-256 before opening the camera and refuses to start on a mismatch (a + `camera` event with `state` `error`, exit code 3). Every `camera` `up` event records the hash of + the archive that was loaded, so the event files show which model ran. + +If you use another archive, record its hash the day you download it and use that value instead. + +### 2.2 Provenance + +| Step | Who | Evidence | Signed? | +| --- | --- | --- | --- | +| Architecture and training on COCO | Meituan ([meituan/YOLOv6](https://github.com/meituan/YOLOv6), GPL-3.0) | Upstream repository and paper ([arXiv:2209.02976](https://arxiv.org/abs/2209.02976)) | No signature found for upstream weights | +| Conversion to an RVC2 blob | Luxonis, ModelConverter 0.1.2 with the OpenVINO 2022.3 compile tool, 2024-07-24 | Archive `buildinfo.json` | No | +| Distribution | Luxonis model zoo (HubAI), model marked official | Luxonis model API, read 2026-11-02 | No signature offered; download over HTTPS | +| Download by the deployer | Deployer, once, with `dai.getModelFromZoo` (README) | The archive's SHA-256, compared with this card | Hash only | +| Load | oak-events, on each start | `--model-sha256` (0.1.2 and later) and the hash in the `camera` `up` event | Hash only | + +Hash pinning detects a changed file; it does not prove who made it. A signature from the model provider +would. CloudLab Works checks at each review whether Luxonis has started signing model archives, and +verifies signatures once they are offered. **Commitment:** next check by 2027-11-01 (owner: Alex Alvord). + ## 3. Intended use and limits **Intended:** detect that a person is present in a zone, for presence events. @@ -56,11 +102,11 @@ people where accuracy matters; safety or security decisions; children's monitori 2. Photos, screens, posters and mannequins can be detected as people. 3. The 512 x 288 input is smaller than the 640 x 640 used for the published accuracy figure. 4. Fairness across skin tones, clothing, body types and mobility aids has not been evaluated by - CloudLab Works. Whether upstream evaluated it is UNKNOWN. + CloudLab Works. No upstream fairness evaluation was found (section 8). 5. Depth is aligned to the colour image only approximately, so zone edges are fuzzy. 6. CloudLab Works has run only a functional live test (camera up, baseline built, about 10 frames per second). It has not measured accuracy. **Commitment:** a documented spot-check on the test camera by - 2027-03-31. + 2027-03-31, using the procedure in section 7. ## 4. Failure modes @@ -89,5 +135,86 @@ Any model CloudLab Works names as a reference must have, in this card: name and distributor, licence, training data, input and format, thresholds, reported metrics with their source, archive hash, intended and out-of-scope uses, known limits, CloudLab Works' own evaluation, failure modes, open-model risk, and review date. At each review the fields are checked against the archive's `config.json` -and `buildinfo.json`, the Luxonis model page and a fresh SHA-256 of the archive. This card was checked that -way on 2026-11-02. +and `buildinfo.json`, the Luxonis model page and a fresh SHA-256 of the archive, and the archive contents +are checked as in section 2.1. The bias and fairness notes (section 8) are re-checked against upstream and +published research. This card was checked that way on 2026-11-02. + +The verification steps in section 2.1 are reviewed with this card: at each release that changes model +guidance, at each change of reference model, and at least once a year. + +## 7. Monitoring detection quality + +oak-events cannot see pictures, so it cannot score its own detections. Two things help. + +**Confidence statistics** (from the 0.1.2 and later). With `oak-events run --confidence-stats`, +every `alive` event carries, per zone, the number of person detections at or above the threshold +(`n`), their `mean`, `min` and `max` confidence, and the number below the threshold (`below`), for the +time since the previous `alive` event. Only numbers are kept. + +Watch the trend on a scene that does not change. Signs that something changed (camera moved, lighting, +lens dirt, a different model, a firmware update): + +- the mean confidence for a zone drops by more than 0.1 against the same hours of the previous week; +- `below` grows to more than twice its usual share of `n + below`; +- `n` falls to zero in hours when people are normally present. + +```bash +jq -c 'select(.kind == "alive" and .confidence) | {ts, confidence}' DIR/*.jsonl +``` + +**Spot-check procedure.** Run it when you install a camera, after any of the changes above, and at +least once a month. CloudLab Works runs it on its test camera by 2027-03-31 and at each change of +reference model, and records the result in this card. + +1. Turn on `--confidence-stats` and note the date, camera position, lighting, model hash and + oak-events version. +2. With the people who use the space, and with their agreement, walk through each zone 20 times: + standing, walking, sitting, and, where it fits the space, lying down, carrying something, and at the + far edge of the zone. Count the `person_enter` events. Expected: 20 of 20 for standing and walking. +3. Show the camera a printed photo and a screen with a person on it for 30 seconds each. Count any + `person_enter` events: each one is a false positive (threat model T9). +4. Leave the zone empty for 10 minutes. Count any `person_enter` events. +5. Record the counts and the confidence statistics. Compare with the last check. If standing or walking + detection is below 18 of 20, or empty-zone or photo tests produce events, fix the cause (position, + light, threshold, model) before relying on the events. + +No picture is taken or stored at any step; the check uses the events only. + +## 8. Bias and fairness + +**Upstream evaluation.** The YOLOv6 README and paper report accuracy on COCO val2017 only. No +evaluation of detection rates across groups of people was found: the upstream README has no mention +of bias, fairness, demographics or skin tone (searched 2026-11-02), nor does the paper's abstract. +The Luxonis model page cites the upstream accuracy figure. Upstream fairness evaluation is therefore +UNKNOWN, and treated as not done. + +**Published research on similar detectors.** These studies did not test YOLOv6. They show the kinds of +gaps to expect from person detectors trained on everyday photographs: + +- Wilson, Hoffman and Morgenstern, *Predictive Inequity in Object Detection*, 2019 + ([arXiv:1902.11097](https://arxiv.org/abs/1902.11097)): detectors performed less well on pedestrians + with darker skin tones (Fitzpatrick 4 to 6) on BDD100K, and time of day and occlusion did not explain + the gap. +- Brandão, *Age and gender bias in pedestrian detection algorithms*, 2019 + ([arXiv:1906.10490](https://arxiv.org/abs/1906.10490)): all 24 top pedestrian detectors tested had + higher miss rates on children; gender differences were not significant. + +**Known and possible gaps for oak-events** + +| Group or condition | Expected effect | Status | +| --- | --- | --- | +| Children, people small in frame or far away | Lower recall: late or missing `person_enter`, early `person_exit` | Likely (section 3 limit 1; Brandão 2019). Not measured | +| People lying down, sitting low, or seen from above | Lower recall | Likely (section 3 limit 1). Not measured | +| People using wheelchairs or other mobility aids | UNKNOWN | Not measured; COCO coverage UNKNOWN | +| Darker skin tones, especially in low light | Possibly lower recall | Possible (Wilson 2019, on other detectors). UNKNOWN for this model | +| Unusual clothing, costumes, heavy coats | UNKNOWN | Not measured | + +**What this means for use.** Events may be less reliable for some people in view. That is one reason +oak-events must not be used for safety, care or security decisions (section 3, and the acceptable use +policy). Deployers should run the spot-check (section 7) with the people who actually use the space. + +**Regular evaluation.** CloudLab Works re-checks upstream and published research at each review of +this card, at least once a year. The first CloudLab Works spot-check (by 2027-03-31) will include the +poses and heights available at the test site, with the agreement of the people involved. A household +test cannot measure differences across skin tones or mobility aids with any confidence; CloudLab Works +will say so in the result rather than claim a fairness evaluation it has not done. diff --git a/docs/RISK_ASSESSMENT.md b/docs/RISK_ASSESSMENT.md new file mode 100644 index 0000000..821db2c --- /dev/null +++ b/docs/RISK_ASSESSMENT.md @@ -0,0 +1,139 @@ +# oak-events AI risk assessment and AI impact assessment + +| | | +| --- | --- | +| Owner and risk acceptor | Alex Alvord, founder, CloudLab Works | +| Version | Published 2026-11-02, written against oak-events 0.1.1 plus unreleased changes (commit c3075be) and the changes released in 0.1.2 | +| Status | Approved by Alex Alvord and published 2026-11-02. The residual risks in section 3 are accepted as of that date | +| Review | At least once a year (next by 2027-11-01) and on any trigger in section 1.5 | +| Related | [`THREAT_MODEL.md`](THREAT_MODEL.md), [`DATA_FLOW.md`](DATA_FLOW.md), [`MODEL_CARD.md`](MODEL_CARD.md), [`SHARED_RESPONSIBILITY.md`](SHARED_RESPONSIBILITY.md), CloudLab Works [governance policy](https://github.com/cloudlabworks/.github/blob/main/policies/security-and-ai-governance-policy.md) (section 8, acceptable use) | + +This is the AI risk management program for oak-events: how risks are found, rated, owned, treated and +accepted (section 1), the current register (sections 2 and 3), and the AI impact assessment (section 4). +CloudLab Works is one person, so the founder sponsors the program, owns every CloudLab Works risk and is +the only person who can accept one. + +## 1. Procedure + +### 1.1 Identify + +Sources, checked at each review: the threat model (every threat T1 to T13 has a risk here), the model +card's limits and failure modes, the data flow, vulnerability reports and incidents, Dependabot and code +scanning alerts, the supplier review (supply chain policy), the legal tracking table (governance policy +section 7), and new entries in MITRE ATLAS and the OWASP Top 10 for LLM Applications. + +### 1.2 Evaluate + +Likelihood and impact are each Low, Medium or High. + +| | Impact Low | Impact Medium | Impact High | +| --- | --- | --- | --- | +| **Likelihood High** | Medium | High | High | +| **Likelihood Medium** | Low | Medium | High | +| **Likelihood Low** | Low | Low | Medium | + +Impact is judged for the people in view of the camera first, then the deployer, then CloudLab Works. + +### 1.3 Own + +Each risk has one owner: **CloudLab Works** (fixed in the code, releases or documents), **Customer** +(fixed in the deployment), or **Shared** (both have actions; the split follows `SHARED_RESPONSIBILITY.md`). + +### 1.4 Treat and accept + +| Option | Use | +| --- | --- | +| Mitigate | Add or strengthen a control; record it in "Controls" with a date if not done | +| Avoid | Remove the feature or prohibit the use (acceptable use, governance policy section 8) | +| Transfer | Move the duty to the party able to act on it, and say so in `SHARED_RESPONSIBILITY.md` | +| Accept | Only if the residual rating is Low or Medium, by Alex, recorded in section 3 with the date | + +A High residual risk cannot be accepted: it needs a dated treatment or an avoid decision. + +### 1.5 Review + +Once a year, and when any of these happens: a change to the event schema, MCP tools, host output queues, +privacy defaults or reference model; a new DepthAI major version; a security incident or vulnerability +report rated High or Critical; a change to a law in the governance policy's legal table; a supplier +trigger in the supply chain policy. Each review is a dated commit to this file, and its outcome feeds the +review of the acceptable use policy (governance policy section 8). + +## 2. Risk register + +L: likelihood, I: impact, R: residual rating after current controls. "Done" controls exist in the +published code or documents; "Planned" controls are published commitments with a date. Controls marked (L) +were released in oak-events 0.1.2. + +| ID | Risk | Source | L | I | R | Owner | Treatment | Controls | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| R1 | A code change sends pictures or depth maps to the host or to disk | T1 | Low | High | Medium | CloudLab Works | Mitigate | Done: two host queues only, `test_no_images.py`, `CONTRIBUTING.md` rule, ethics and privacy check (governance section 9), CodeQL. Planned: a test that asserts the host queue count, by 2027-03-31 | +| R2 | DepthAI telemetry, crash-dump upload or auto-calibration turns on without the deployer knowing | T2 | Low | Medium | Low | Shared | Mitigate | Done: `privacy.py` forces the variables; `doctor` shows them. (L): `privacy` event at each start and `private` in `camera_health`, alerting example | +| R3 | Someone with access to the host reads event files and learns people's routines | T3, DATA_FLOW 7 | Medium | High | High | Customer | Transfer, mitigate | Done: mode 0600 files, retention and redaction guidance, data flow privacy impact summary. (L): MCP access log; sandbox recipe in `HARDENING.md`. Planned: `--retain-days`, by 2027-03-31. Not acceptable as High; the planned control and the customer duties (retention, host access) bring it to Medium | +| R4 | Forged or edited event lines mislead an agent | T4 | Low | Medium | Low | Shared | Mitigate, accept | Done: owner-only files, malformed lines skipped. Accepted: no integrity protection on event lines | +| R5 | Prompt injection through zone names, model labels or error text | T5 | Low | Medium | Low | Shared | Mitigate | Done: flat JSON, capped error text, tools return data. Deployer tells the agent tool output is untrusted | +| R6 | An agent acts on events without a human (for example unlocks a door) | T6, OWASP LLM06 | Medium | High | High | Customer | Avoid, transfer | Done: read-only tools; acceptable use requires a human approval step before any action that affects a person; prohibited as a safety or security system. Residual stays High in deployments that ignore this; CloudLab Works cannot prevent it, so it is a deployer duty in `SHARED_RESPONSIBILITY.md` | +| R7 | The MCP server reads files outside the events directory | T7 | Low | High | Medium | CloudLab Works | Mitigate | Done: no path arguments, `*.jsonl` only. Remaining: a symbolic link inside the directory is followed. (L): read-only sandbox in `HARDENING.md`. Planned: refuse symbolic links, by 2027-03-31 | +| R8 | Large event files stop the MCP server | T8 | Low | Low | Low | CloudLab Works | Accept | Done: result limit 500, 14-day scan window | +| R9 | People are not detected, or photos are detected as people | T9, MODEL_CARD 3 and 4 | High | Medium | High for safety use, Medium otherwise | Shared | Avoid, mitigate | Done: confirm frames, threshold, gone timeout; safety and security use prohibited. (L): per-zone confidence statistics and the spot-check procedure (`MODEL_CARD.md` section 7) | +| R10 | A poisoned or swapped model archive | T10 | Low | High | Medium | Shared | Mitigate | Done: no runtime download; archive is a device blob, not host code; reference SHA-256 published. (L): `--model-sha256` refuses a mismatch; hash in every `camera` `up` event | +| R11 | A supplier fails, changes terms or is compromised, and CloudLab Works cannot enforce service levels | T12, supply chain policy | Low | Medium | Low | CloudLab Works | Accept, mitigate | Done: annual supplier review, hash-pinned CI tools, Dependabot, trusted publishing. Accepted: no negotiated service levels; customers run oak-events themselves, so a supplier outage does not stop a running deployment | +| R12 | A malicious release or dependency | T12 | Low | High | Medium | CloudLab Works | Mitigate | Done: Actions pinned by SHA, Dependabot, CodeQL, trusted publishing. Planned: branch protection 2026-12-15, signed tags 2027-01-31, SBOM in `release.yml` 2027-02-28 | +| R13 | A malformed zones file stops the runner | T13 | Low | Low | Low | CloudLab Works | Accept | Done: validation, exit code 2, fuzzing | +| R14 | A PoE camera is read directly by another host on the network | T11 | Medium | High | Depends on deployment | Customer | Transfer | Done: `DATA_FLOW.md` and `HARDENING.md` tell deployers to isolate the camera network | +| R15 | oak-events is used for covert monitoring, monitoring of employees or tenants, or in private spaces | Impact assessment 4.2 | Medium | High | High | Customer | Avoid | Done: prohibited uses (governance section 8); no identification, no pictures; notice duties. CloudLab Works cannot enforce this outside the shipped code; residual stays with the deployer | +| R16 | Someone adds identification (face recognition, re-identification) to a fork or a deployment | Impact assessment 4.1 | Low | High | Medium | Shared | Avoid | Done: prohibited use; contributions that add identification are refused; the event schema has no identity fields | +| R17 | Lower detection for some people (children, people lying down or using mobility aids, some clothing or skin tones) makes events less reliable for them | MODEL_CARD 8 | Medium | Medium | Medium | Shared | Mitigate | Done: limits documented; not for safety use. Planned: first CloudLab Works spot-check by 2027-03-31 (`MODEL_CARD.md` section 7) | +| R18 | Events retained indefinitely build a detailed pattern of life | DATA_FLOW 4 | High | Medium | High | Customer | Mitigate, transfer | Done: retention example in `DATA_FLOW.md`. Planned: `--retain-days`, by 2027-03-31. Deployer sets retention | +| R19 | Events reach the agent's model provider, outside the deployer's control | T6, B4 | High | Medium | High | Customer | Transfer | Done: documented in `DATA_FLOW.md` and the threat model. The deployer chooses the agent and provider; oak-events cannot reduce this | +| R20 | The only maintainer becomes unavailable and fixes stop | Governance section 2 | Low | Medium | Low | CloudLab Works | Mitigate | Done: open source, MIT licence, no hosted service, coordinated disclosure lets reporters publish. Planned: continuity plan by 2027-03-31 | +| R21 | A change in privacy or AI law makes a common deployment unlawful | Governance section 7 | Low | Medium | Low | Shared | Mitigate | Done: legal tracking table reviewed yearly and on change; deployer duty to check local law | + +## 3. Acceptance + +Residual risks rated Low or Medium and marked "Accept" or "Accepted" above (R4, R8, R11, R13, and the +accepted remainders of R2 and R5) are accepted by Alex Alvord **when this file is approved and +published**. The date of that commit is the acceptance date. High residual risks (R3, R6, R9 for safety +use, R15, R18, R19) are not accepted by CloudLab Works: each has a dated control, an avoid decision, or a +customer duty in `SHARED_RESPONSIBILITY.md`. + +## 4. AI impact assessment + +### 4.1 Method and criteria + +The assessment covers the whole lifecycle: design (what the code can sense and output), release (what +ships and what defaults are on), deployment (where a camera is placed, who is told), operation (what is +stored, who and which agents read it), and retirement (deleting event files and the model file). + +Each impact is rated by **severity** (how much harm to a person), **reach** (how many people, and +whether they chose to be there), **reversibility** (can the harm be undone), and **likelihood** (Low, +Medium or High, as in section 1.2). People in view of the camera are assessed first: they did not +choose oak-events and may not know it is running. + +It is repeated at each review (section 1.5) and before any change that triggers the ethics and privacy +check in the governance policy (section 9). Results feed the risk register (section 2), the acceptable +use policy (governance policy section 8) and the shared-responsibility guide. + +### 4.2 Assessment + +Assessment of 2026-11-02 for oak-events 0.1.1 plus the changes released in 0.1.2. + +| Dimension | Who is affected | Impact | Severity, reach, reversibility | Likelihood | Mitigations | Residual and owner | +| --- | --- | --- | --- | --- | --- | --- | +| Ethical: consent and notice | Household members, guests, workers in view | Presence and routines recorded without real consent, especially guests and children | Medium severity; few people per camera; harm to trust is hard to undo | Medium | No pictures, no identities; notice duty and prohibited covert use (governance section 8) | Medium; customer | +| Ethical: function creep toward identification | People in view | Events joined with other data, or a fork adds face recognition, to single out a person | High severity; irreversible once identities are linked | Low | Prohibited use; refused contributions; no identity fields; no image path to the host | Medium; shared (R16) | +| Societal: home monitoring | Partners, children, carers, guests | Monitoring inside a home can be used for control or coercion between household members | High severity for the person monitored; hard to reverse | Low to Medium | Prohibited covert monitoring and monitoring in private spaces; events show presence, not activity | Medium; customer (R15) | +| Societal: workplace monitoring | Employees, contractors | Presence and dwell times used to judge work, in places where law or agreements forbid it | Medium to High severity; affects a whole team | Low (product is aimed at homes and labs) | Prohibited where local law does not allow it; decisions with significant effect from events alone are prohibited | Medium; customer (R15) | +| Societal: public spaces | Passers-by | Camera covers a street, hallway or shared space; people cannot opt out | Medium severity; unknown reach | Low | Intended use is the deployer's own space with the knowledge of its users | Low; customer | +| Operational: wrong detections | Deployer, people relying on automations | Missed or false person events cause wrong automations (lights, alerts, messages) | Low to Medium severity; reversible | High | Confirm frames, threshold, timeout; not a safety system; (L) confidence statistics and spot-check | Medium; shared (R9) | +| Operational: agent actions | People affected by an agent's action | An agent acts on an event without a human check | Up to High severity depending on the action | Medium | Read-only tools; human approval step required by acceptable use | High where ignored; customer (R6) | +| Operational: availability | Deployer | Camera or runner stops; health tool shows it | Low severity | Medium | Supervisor restart, `camera_health`, reconnect logic | Low; shared | +| Legal | Deployer, people in view, CloudLab Works | Deployment breaks privacy, recording-notice or workplace law; licence breach on model redistribution | Medium to High for the deployer | Low | Legal tracking table (not legal advice); DPIA guidance in `DATA_FLOW.md`; GPL-3.0 note in `MODEL_CARD.md` | Low for CloudLab Works; Medium for deployers who do not check local law (R21) | +| Privacy | People in view | Pattern of life from long retention; disclosure of absence (burglary risk); events sent to an agent's model provider | Medium to High; disclosure is irreversible | Medium | Files 0600; no telemetry; retention guidance and planned `--retain-days`; redaction recipe; (L) access log | High until retention is set; customer (R3, R18, R19) | +| Security | People in view, deployer | Tampered model, malicious release, local file access, PoE stream exposure | Medium to High | Low | Threat model T1 to T13 and their controls; (L) model hash check | Medium; shared (R10, R12, R14) | +| Fairness | Children, people lying down, wheelchair users, people in unusual clothing or poses, some skin tones in low light | Fewer or later events for them, so automations work less well for them | Medium severity; reversible | Medium | Known limits documented with sources (`MODEL_CARD.md` section 8); not for safety or care use; spot-check procedure | Medium; shared (R17) | + +### 4.3 Communication + +This file is public in the oak-events repository and linked from the README. Material changes are noted +in `CHANGELOG.md`. Deployers are asked to repeat section 4.2 for their own site; the privacy impact +summary in `DATA_FLOW.md` section 7 is a starting point. diff --git a/docs/SHARED_RESPONSIBILITY.md b/docs/SHARED_RESPONSIBILITY.md new file mode 100644 index 0000000..950a3bd --- /dev/null +++ b/docs/SHARED_RESPONSIBILITY.md @@ -0,0 +1,352 @@ +# oak-events shared security responsibility model (SSRM) + +| | | +| --- | --- | +| Owner and approver | Alex Alvord, CloudLab Works | +| Version | Approved by Alex Alvord and published 2026-11-02 with the CloudLab Works AI-CAIQ (CSA AI-CAIQ v1.1.0, AI Controls Matrix v1.1.1) | +| Source | The ownership column (D) and customer-responsibility column (F) of the CloudLab Works AI-CAIQ, one row per question, in [`ssrm-ownership-ai-caiq-v1.1.0.csv`](ssrm-ownership-ai-caiq-v1.1.0.csv) | +| Review | At every release, and at least once a year with the AI-CAIQ refresh (next by 2027-11-01) | + +oak-events is open source software that the customer installs and runs on their own camera and host. +CloudLab Works runs no hosted service and receives no data from it (see [`DATA_FLOW.md`](DATA_FLOW.md)). +That fixes the split: CloudLab Works owns what it writes, ships and documents; the customer owns +everything about the deployment; the model provider owns the detector's training and build. + +## 1. Parties + +| Party | Who | Owns | +| --- | --- | --- | +| Application provider | CloudLab Works (Cloud Lab Works LLC) | oak-events code, releases, documentation, security fixes, vulnerability handling, the privacy defaults, the reference-model guidance in `MODEL_CARD.md`, its own accounts and devices | +| Customer (deployer) | The person or organization that runs oak-events | The camera, the host, the network, the event files and their retention, notice to people in view, the choice of model file, the choice of AI agent and its model provider, access to the host, incident handling in the deployment | +| Model provider | For the reference model: Meituan (developer) and Luxonis (converts and distributes it in the Luxonis model zoo). For any other model: whoever the customer gets it from | Training data, training pipeline, model hardening, model evaluation, the archive's content | +| Platform suppliers to CloudLab Works | GitHub (code, CI, advisories), PyPI (packages), Luxonis (DepthAI SDK and device firmware), upstream Python packages, Cloudflare (DNS and hosting for cloudlabworks.dev only, not the product) | Their own services, under their published terms. CloudLab Works reviews them as set out in the [supply chain policy](https://github.com/cloudlabworks/.github/blob/main/policies/supply-chain-policy.md) | +| Agent and its model provider | Chosen by the customer | Whatever the agent does with events it reads, and whatever its model provider keeps. Outside oak-events (`THREAT_MODEL.md`, boundary B4) | + +## 2. Ownership per AICM domain + +Count of AI-CAIQ questions per owner. CLW: CloudLab Works. Shared: CloudLab Works and the customer each +do part. Customer: the customer does all of it. Model provider and Supply chain: the model provider +does it, or it is shared along the model supply chain. Platform: a platform provider. NA: the control +does not apply to oak-events (the AI-CAIQ gives the reason per question). + +| Domain | CLW | Shared | Customer | Model provider | Supply chain | Platform | NA | Total | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| Audit & Assurance (A&A) | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | +| Application & Interface Security (AIS) | 12 | 4 | 1 | 0 | 0 | 0 | 1 | 18 | +| Business Continuity Management and Operational Resilience (BCR) | 9 | 1 | 3 | 0 | 0 | 0 | 3 | 16 | +| Change Control and Configuration Management (CCC) | 8 | 2 | 1 | 0 | 0 | 0 | 0 | 11 | +| Cryptography, Encryption & Key Management (CEK) | 4 | 0 | 3 | 0 | 0 | 1 | 15 | 23 | +| Datacenter Security (DCS) | 4 | 0 | 14 | 0 | 0 | 0 | 10 | 28 | +| Data Security and Privacy Lifecycle Management (DSP) | 7 | 10 | 4 | 5 | 0 | 0 | 4 | 30 | +| Governance, Risk and Compliance (GRC) | 16 | 1 | 0 | 0 | 1 | 0 | 0 | 18 | +| Human Resources (HRS) | 1 | 0 | 0 | 0 | 0 | 0 | 21 | 22 | +| Identity & Access Management (IAM) | 18 | 3 | 1 | 0 | 0 | 0 | 0 | 22 | +| Interoperability & Portability (IPY) | 3 | 0 | 1 | 0 | 0 | 0 | 1 | 5 | +| Infrastructure Security (I&S) | 0 | 0 | 9 | 0 | 0 | 0 | 4 | 13 | +| Logging and Monitoring (LOG) | 3 | 12 | 3 | 0 | 0 | 0 | 3 | 21 | +| Model Security (MDS) | 5 | 7 | 0 | 2 | 5 | 0 | 0 | 19 | +| Security Incident Management, E-Discovery, & Cloud Forensics (SEF) | 16 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | +| Supply Chain Management, Transparency, and Accountability (STA) | 18 | 0 | 0 | 0 | 0 | 0 | 1 | 19 | +| Threat & Vulnerability Management (TVM) | 16 | 1 | 0 | 0 | 0 | 0 | 0 | 17 | +| Universal Endpoint Management (UEM) | 12 | 1 | 0 | 0 | 0 | 0 | 2 | 15 | +| **All domains** | **159** | **42** | **40** | **7** | **6** | **1** | **65** | **320** | + +### Customer duties by domain + +**Audit & Assurance (A&A)** + +- Customers may review the published Scorecard and this AI-CAIQ; assurance over their own deployment is theirs. +- Customers needing independent assurance should perform or commission their own review of the open source code. +- Verify the legal requirements that apply to your own camera deployment (notice, consent, retention). + +**Application & Interface Security (AIS)** + +- Apply your own application security policy to how you deploy and integrate oak-events. +- None for the baseline; keep event files and the events directory owner-only as shipped. +- Test new versions on your own hardware before upgrading production deployments. +- Install a pinned version, run oak-events under a supervisor that restarts it (README 'Running it for real', https://github.com/cloudlabworks/oak-events/blob/1732fbb/README.md) and own the deployment configuration. +- Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +- Restrict who can start the MCP server and read the events directory; configure tool approval in your MCP client. +- Keep the zones file and model file under your control. +- Keep the events directory writable only by the account that runs 'oak-events run'. +- Define the agent's other tools and permissions in your MCP client; oak-events only bounds its own tools. +- Run the MCP server and agent tools in an isolated environment with read-only access to the events directory. +- Treat oak-events tool output as untrusted data in your agent's prompts (zone names and labels come from your configuration and model). + +**Business Continuity Management and Operational Resilience (BCR)** + +- Keep a copy of the release you run and of your model file. +- Run oak-events under a supervisor (systemd, launchd, container restart policy) and keep the release and model file you depend on. +- Watch the repository releases to receive notices. +- Back up event files, zones file and model file according to your own policy. +- Protect and test restores of your own backups. +- Provide redundant cameras or hosts if your use case needs them. + +**Change Control and Configuration Management (CCC)** + +- Review the CHANGELOG before upgrading. +- Decide when to upgrade; pin the version you run. +- Record the configuration you deploy. +- Alert on the startup privacy event once available. +- Pin versions and keep the previous version available for rollback. + +**Cryptography, Encryption & Key Management (CEK)** + +- Use full-disk encryption on the host and keep the PoE camera on a trusted, isolated network segment. +- Manage your own keys. +- Generate keys in your environment with approved libraries. + +**Datacenter Security (DCS)** + +- Secure the premises, camera and host physically. +- Wipe hosts and storage that held event files before disposal. +- Control transfers of your own hosts and event files. +- Restrict which devices can reach the camera network. + +**Data Security and Privacy Lifecycle Management (DSP)** + +- Apply your data lifecycle policy to event files. +- Delete event files securely when retiring storage. +- Inventory where your deployment stores event files. +- Classify event files under your own scheme (sensitive at minimum). +- Document any further flows you add (webhooks, agent logs). +- Name an owner for event data in your organization. +- Review your data ownership annually. +- Keep event files local. +- Meet recording, notice and consent laws where the camera is installed. +- Run your own DPIA where law requires. +- Protect any forwarding you configure and isolate the camera link. +- Handle data-subject requests for your event files. +- Declare and keep to the purpose of your camera deployment. +- Set and enforce a retention period for event files. See DATA_FLOW.md section 4 for a cleanup recipe. +- Encrypt the host disk and restrict access to the events directory. +- Choose and record where event files are stored. +- Record which model file and device you deploy. +- Choose detection models from a provider whose training-data practices you accept. + +**Governance, Risk and Compliance (GRC)** + +- Identify the requirements that apply to your deployment. +- Use oak-events within the acceptable-use policy and local law. Follow the acceptable use policy (governance policy section 8). +- Assess the impact of your own deployment. +- Check detection quality on the people and scenes in your deployment. +- Decide the explainability your use case needs. +- Account for these limits in agent behaviour. +- Keep a human in control of any actions your agent takes on oak-events data. + +**Identity & Access Management (IAM)** + +- Run oak-events under an unprivileged account. +- Control privileged access in your environment. +- Control which accounts can run oak-events and read the events directory. +- Give agents only the oak-events access they need. +- Restrict write access to the events directory. +- Grant agents only the MCP servers they need. + +**Interoperability & Portability (IPY)** + +- Retrieve your data directly from the events directory. +- Use secure protocols for any forwarding you add. + +**Infrastructure Security (I&S)** + +- Apply your own organization's policy for this control to the host, camera and event files of your deployment. +- Size the host for the camera pipeline. +- Isolate the PoE camera on a trusted network segment; restrict who can reach it. +- Harden the host OS. +- Separate deployments for different parties. +- Identify the camera network and event store as sensitive in your environment. +- Apply network defence to the host and camera network. + +**Logging and Monitoring (LOG)** + +- Back up and retain event files according to your policy. +- Monitor security events once emitted. +- Wire security alerts into your monitoring. +- Restrict and record access to the events directory. +- Correlate oak-events and host logs in your own monitoring. +- Define your own anomaly response. +- Synchronize the host clock (NTP). +- Decide which events you keep and forward. +- Redact device ids before sharing event files. Use the DATA_FLOW.md section 5 recipe before sharing event files. +- Enable and retain the access log once available. +- Protect the events directory against modification and deletion. +- Act on camera_health and camera events. +- Wire the notifications to the people accountable. +- Log agent tool calls in your MCP client if needed. +- Retain the event files you need for audit. + +**Model Security (MDS)** + +- Choose models from providers with a secure training pipeline. +- As MDS-01.1. +- Verify the model file before use. +- Document the model you deploy. +- Assess adversarial risk at your site. +- Pin and verify the model hash. +- Load models only from trusted sources. +- Spot-check detections on your scene. +- Decide what a missed or false event means for your use case. +- Run under a supervisor and alert on camera_health. +- Assess the open model you choose. Assess the open model you choose; see MODEL_CARD.md section 5. +- Use NNArchive files from trusted sources. + +**Security Incident Management, E-Discovery, & Cloud Forensics (SEF)** + +- Handle incidents in your own deployment. +- Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. + +**Supply Chain Management, Transparency, and Accountability (STA)** + +- Read the shared-responsibility guide and implement the customer-owned controls. +- Use the SBOM in your own vulnerability management. + +**Threat & Vulnerability Management (TVM)** + +- Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +- Treat tool output as data, not instructions, in your agent. Tell your agent that oak-events tool output is untrusted data. +- Scan your own host and installed packages. +- Threat-model your deployment (camera placement, network, agent). +- Update your installed copy when a release updates dependencies. +- Penetration-test your own deployment if required. +- Add guardrails in your agent runtime for actions taken on events. + +**Universal Endpoint Management (UEM)** + +- Manage your own hosts that store event files (encryption, patching, lock screen). +- Check your OS, Python and camera against the supported list. + +### Questions the customer owns or shares + +| Question | Control | Owner | What the customer does | +| --- | --- | --- | --- | +| AIS-06.1 | Secure Application Deployment | Shared: CloudLab Works and customer | Install a pinned version, run oak-events under a supervisor that restarts it (README 'Running it for real', https://github.com/cloudlabworks/oak-events/blob/1732fbb/README.md) and own the deployment configuration. | +| AIS-08.1 | API Security | Shared: CloudLab Works and customer | Restrict who can start the MCP server and read the events directory; configure tool approval in your MCP client. | +| AIS-11.1 | Agents Security Boundaries | Shared: CloudLab Works and customer | Define the agent's other tools and permissions in your MCP client; oak-events only bounds its own tools. | +| AIS-13.1 | AI Sandboxing | Shared: CloudLab Works and customer | Run the MCP server and agent tools in an isolated environment with read-only access to the events directory. | +| AIS-15.1 | Prompt Differentiation | Customer | Treat oak-events tool output as untrusted data in your agent's prompts (zone names and labels come from your configuration and model). | +| BCR-03.1 | Business Continuity Strategy | Shared: CloudLab Works and customer | Run oak-events under a supervisor (systemd, launchd, container restart policy) and keep the release and model file you depend on. | +| BCR-08.1 | Backup | Customer | Back up event files, zones file and model file according to your own policy. | +| BCR-08.2 | Backup | Customer | Protect and test restores of your own backups. | +| BCR-11.1 | Equipment Redundancy | Customer | Provide redundant cameras or hosts if your use case needs them. | +| CCC-05.1 | Change Agreements | Customer | Decide when to upgrade; pin the version you run. | +| CCC-07.1 | Detection of Baseline Deviation | Shared: CloudLab Works and customer | Alert on the startup privacy event once available. | +| CCC-09.1 | Change Restoration | Shared: CloudLab Works and customer | Pin versions and keep the previous version available for rollback. | +| CEK-03.1 | Data Protection | Customer | Use full-disk encryption on the host and keep the PoE camera on a trusted, isolated network segment. | +| CEK-04.1 | Encryption Algorithm | Customer | Use full-disk encryption on the host and keep the PoE camera on a trusted, isolated network segment. | +| CEK-08.1 | Service Customer Key Management Capability | Customer | Manage your own keys. | +| CEK-10.1 | Key Generation | Platform provider | Generate keys in your environment with approved libraries. | +| DCS-01.1 | Physical and Environmental Security Policy and Procedures | Customer | Secure the premises, camera and host physically. | +| DCS-01.2 | Physical and Environmental Security Policy and Procedures | Customer | Secure the premises, camera and host physically. | +| DCS-02.1 | Off-Site Equipment Disposal Policy and Procedures | Customer | Wipe hosts and storage that held event files before disposal. | +| DCS-02.2 | Off-Site Equipment Disposal Policy and Procedures | Customer | Wipe hosts and storage that held event files before disposal. | +| DCS-02.3 | Off-Site Equipment Disposal Policy and Procedures | Customer | Wipe hosts and storage that held event files before disposal. | +| DCS-03.1 | Off-Site Transfer Authorization Policy and Procedures | Customer | Control transfers of your own hosts and event files. | +| DCS-03.2 | Off-Site Transfer Authorization Policy and Procedures | Customer | Control transfers of your own hosts and event files. | +| DCS-03.3 | Off-Site Transfer Authorization Policy and Procedures | Customer | Control transfers of your own hosts and event files. | +| DCS-04.1 | Secure Area Policy and Procedures | Customer | Secure the premises, camera and host physically. | +| DCS-04.2 | Secure Area Policy and Procedures | Customer | Secure the premises, camera and host physically. | +| DCS-08.1 | Controlled Physical Access Points | Customer | Secure the premises, camera and host physically. | +| DCS-09.1 | Equipment Identification | Customer | Restrict which devices can reach the camera network. | +| DCS-10.1 | Secure Area Authorization | Customer | Secure the premises, camera and host physically. | +| DCS-10.2 | Secure Area Authorization | Customer | Secure the premises, camera and host physically. | +| DSP-02.1 | Secure Disposal | Customer | Delete event files securely when retiring storage. | +| DSP-03.1 | Data Inventory | Shared: CloudLab Works and customer | Inventory where your deployment stores event files. | +| DSP-04.1 | Data Classification | Shared: CloudLab Works and customer | Classify event files under your own scheme (sensitive at minimum). | +| DSP-05.1 | Data Flow Documentation | Shared: CloudLab Works and customer | Document any further flows you add (webhooks, agent logs). | +| DSP-06.1 | Data Ownership and Stewardship | Shared: CloudLab Works and customer | Name an owner for event data in your organization. | +| DSP-06.2 | Data Ownership and Stewardship | Shared: CloudLab Works and customer | Review your data ownership annually. | +| DSP-09.1 | Data Protection Impact Assessment | Shared: CloudLab Works and customer | Run your own DPIA where law requires. | +| DSP-10.1 | Sensitive Data Transfer | Customer | Protect any forwarding you configure and isolate the camera link. | +| DSP-11.1 | Personal Data Access, Reversal, Rectification and Deletion | Customer | Handle data-subject requests for your event files. | +| DSP-12.1 | Limitation of Purpose in Personal Data Processing | Customer | Declare and keep to the purpose of your camera deployment. | +| DSP-16.1 | Data Retention and Deletion | Shared: CloudLab Works and customer | Set and enforce a retention period for event files. See DATA_FLOW.md section 4 for a cleanup recipe. | +| DSP-17.1 | Sensitive Data Protection | Shared: CloudLab Works and customer | Encrypt the host disk and restrict access to the events directory. | +| DSP-19.1 | Data Location | Shared: CloudLab Works and customer | Choose and record where event files are stored. | +| DSP-20.1 | Data Provenance and Transparency | Shared: CloudLab Works and customer | Record which model file and device you deploy. | +| DSP-21.1 | Data Poisoning Prevention & Detection | Model provider | Choose detection models from a provider whose training-data practices you accept. | +| DSP-22.1 | Privacy Enhancing Technologies | Model provider | Choose detection models from a provider whose training-data practices you accept. | +| DSP-23.1 | Data Integrity Check | Model provider | Choose detection models from a provider whose training-data practices you accept. | +| DSP-23.2 | Data Integrity Check | Model provider | Choose detection models from a provider whose training-data practices you accept. | +| DSP-24.1 | Data Differentiation and Relevance | Model provider | Choose detection models from a provider whose training-data practices you accept. | +| GRC-11.1 | Bias and Fairness Assessment | Shared across the supply chain | Check detection quality on the people and scenes in your deployment. | +| GRC-15.1 | Human supervision | Shared: CloudLab Works and customer | Keep a human in control of any actions your agent takes on oak-events data. | +| IAM-11.1 | Service Customers' Approval for Agreed Privileged Access Roles | Customer | Control privileged access in your environment. | +| IAM-15.1 | Authorization Mechanisms | Shared: CloudLab Works and customer | Control which accounts can run oak-events and read the events directory. | +| IAM-17.1 | Output Modification and Special Authorization | Shared: CloudLab Works and customer | Restrict write access to the events directory. | +| IAM-18.1 | Agent Access Restriction | Shared: CloudLab Works and customer | Grant agents only the MCP servers they need. | +| IPY-03.1 | Secure Interoperability and Portability Management | Customer | Use secure protocols for any forwarding you add. | +| I&S-01.1 | Infrastructure and Virtualization Security Policy and Procedures | Customer | Apply your own organization's policy for this control to the host, camera and event files of your deployment. | +| I&S-01.2 | Infrastructure and Virtualization Security Policy and Procedures | Customer | Apply your own organization's policy for this control to the host, camera and event files of your deployment. | +| I&S-02.1 | Capacity and Resource Planning | Customer | Size the host for the camera pipeline. | +| I&S-03.1 | Network Security | Customer | Isolate the PoE camera on a trusted network segment; restrict who can reach it. | +| I&S-03.2 | Network Security | Customer | Apply your own organization's policy for this control to the host, camera and event files of your deployment. | +| I&S-04.1 | OS Hardening and Base Controls | Customer | Harden the host OS. | +| I&S-06.1 | Segmentation and Segregation | Customer | Separate deployments for different parties. | +| I&S-08.1 | Network Architecture Documentation | Customer | Identify the camera network and event store as sensitive in your environment. | +| I&S-09.1 | Network Defense | Customer | Apply network defence to the host and camera network. | +| LOG-02.1 | Audit Logs Protection | Shared: CloudLab Works and customer | Back up and retain event files according to your policy. | +| LOG-03.1 | Security Monitoring and Alerting | Shared: CloudLab Works and customer | Monitor security events once emitted. | +| LOG-03.2 | Security Monitoring and Alerting | Shared: CloudLab Works and customer | Wire security alerts into your monitoring. | +| LOG-04.1 | Audit Logs Access and Accountability | Shared: CloudLab Works and customer | Restrict and record access to the events directory. | +| LOG-05.1 | Audit Logs Monitoring and Response | Customer | Correlate oak-events and host logs in your own monitoring. | +| LOG-05.2 | Audit Logs Monitoring and Response | Customer | Define your own anomaly response. | +| LOG-06.1 | Clock Synchronization | Customer | Synchronize the host clock (NTP). | +| LOG-07.1 | Logging Scope | Shared: CloudLab Works and customer | Decide which events you keep and forward. | +| LOG-08.1 | Audit Logs Sanitization | Shared: CloudLab Works and customer | Redact device ids before sharing event files. Use the DATA_FLOW.md section 5 recipe before sharing event files. | +| LOG-09.1 | Log Records | Shared: CloudLab Works and customer | Enable and retain the access log once available. | +| LOG-10.1 | Audit Records Protection | Shared: CloudLab Works and customer | Protect the events directory against modification and deletion. | +| LOG-14.1 | Failures and Anomalies Reporting | Shared: CloudLab Works and customer | Act on camera_health and camera events. | +| LOG-14.2 | Failures and Anomalies Reporting | Shared: CloudLab Works and customer | Wire the notifications to the people accountable. | +| LOG-15.1 | Input Monitoring | Shared: CloudLab Works and customer | Log agent tool calls in your MCP client if needed. | +| LOG-16.1 | Output Monitoring | Shared: CloudLab Works and customer | Retain the event files you need for audit. | +| MDS-01.1 | Training Pipeline Security | Model provider | Choose models from providers with a secure training pipeline. | +| MDS-01.2 | Training Pipeline Security | Model provider | As MDS-01.1. | +| MDS-02.1 | Model Artifact Scanning | Shared across the supply chain | Verify the model file before use. | +| MDS-02.2 | Model Artifact Scanning | Shared across the supply chain | No customer action for this control; it concerns CloudLab Works' own practices. | +| MDS-06.1 | Adversarial Attack Analysis | Shared across the supply chain | Assess adversarial risk at your site. | +| MDS-07.1 | Robustness against Adversarial Attack / Model Hardening | Shared across the supply chain | No customer action for this control; it concerns CloudLab Works' own practices. | +| MDS-08.1 | Model Integrity Checks | Shared: CloudLab Works and customer | Pin and verify the model hash. | +| MDS-08.2 | Model Integrity Checks | Shared: CloudLab Works and customer | No customer action for this control; it concerns CloudLab Works' own practices. | +| MDS-09.1 | Model Signing/Ownership Verification | Shared across the supply chain | Load models only from trusted sources. | +| MDS-10.1 | Model Continuous Monitoring | Shared: CloudLab Works and customer | Spot-check detections on your scene. | +| MDS-11.2 | Model Failure | Shared: CloudLab Works and customer | Run under a supervisor and alert on camera_health. | +| MDS-12.1 | Open Model Risk Assessment | Shared: CloudLab Works and customer | Assess the open model you choose. Assess the open model you choose; see MODEL_CARD.md section 5. | +| MDS-12.2 | Open Model Risk Assessment | Shared: CloudLab Works and customer | No customer action for this control; it concerns CloudLab Works' own practices. | +| MDS-13.1 | Secure Model Format | Shared: CloudLab Works and customer | Use NNArchive files from trusted sources. | +| TVM-13.1 | Guardrails | Shared: CloudLab Works and customer | Add guardrails in your agent runtime for actions taken on events. | +| UEM-03.1 | Compatibility | Shared: CloudLab Works and customer | Check your OS, Python and camera against the supported list. | + +## 3. How customers are told + +1. This document is linked from the README ("Security and AI documentation"). +2. The per-question split is published twice: in the CSV next to this file and in the CloudLab Works + AI-CAIQ on the CSA STAR Registry. +3. A release that moves a duty between CloudLab Works and the customer (for example a new option that + the customer must turn on) says so in `CHANGELOG.md` under the release, and updates this file in the + same pull request. + +## 4. How the model is applied and kept current + +1. **Each change.** A pull request that changes the MCP tools, the event schema, the host output + queues, the privacy defaults or the reference model (the changes that already need a security and + privacy review, security baseline section 7) also answers: does this move a duty between CloudLab + Works, the customer and the model provider? If yes, it updates the CSV and section 2 here. +2. **Each release.** The release checklist (security baseline section 7) includes: regenerate section 2 + from the CSV and check that every AI-CAIQ question has exactly one owner value. +3. **Each year.** With the AI-CAIQ self-assessment (governance policy section 6), Alex re-reads every + row, checks the owner against the code and documents of the release in scope, and records the + review as a dated commit to this file and the CSV. +4. **Validation.** The CSV is checked against the submitted AI-CAIQ before each submission: same 320 + question IDs, same owner and customer-responsibility text. A difference is fixed before submission. +5. **Supply chain.** Duties that sit with the model provider or a platform supplier are checked in the + annual supplier review (supply chain policy section 5). If a supplier stops doing its part (for + example the model zoo stops publishing a model's provenance), the gap is recorded in + `RISK_ASSESSMENT.md` and this file says what the customer should do instead. + +## 5. Assessment of CloudLab Works' part + +CloudLab Works assesses its own part (every question owned by CLW or shared) once a year in the AI-CAIQ +self-assessment. Each NO answer has a corrective plan, an owner and a date, and is tracked as a public +GitHub issue labelled `csa-remediation` until closed (governance policy section 6). An independent +review is planned (governance policy section 2). diff --git a/docs/THREAT_MODEL.md b/docs/THREAT_MODEL.md index b10a7c0..aba7056 100644 --- a/docs/THREAT_MODEL.md +++ b/docs/THREAT_MODEL.md @@ -3,8 +3,8 @@ | | | | --- | --- | | Owner | Alex Alvord, CloudLab Works | -| Version | Published 2026-11-02; written against commit 00d9053 (oak-events 0.1.1 plus unreleased changes) | -| Review | At least once a year (next by 2027-11-01) and whenever the event schema, MCP tools, host output queues, privacy defaults or reference model change | +| Version | Published 2026-11-02; written against commit 00d9053 (oak-events 0.1.1 plus unreleased changes). Revised, approved by Alex Alvord and published 2026-11-02: mitigation map (section 6) and guardrail review (section 7), against commit c3075be plus the changes released in 0.1.2 | +| Review | At least once a year (next by 2027-11-01) and whenever the event schema, MCP tools, host output queues, privacy defaults, reference model or DepthAI major version change; guardrails also on the triggers in section 7 | | Method | STRIDE per trust boundary; MITRE ATLAS for threats to the model; OWASP Top 10 for LLM Applications (2025) for the agent boundary | ## 1. System @@ -38,15 +38,15 @@ mitigations. | ID | Threat | Framework | Current mitigations | Residual | | --- | --- | --- | --- | --- | | T1 | A code change links colour or preview frames to a host queue or writes images or depth maps to disk | STRIDE I | Only two host queues, with a code comment forbidding more (`camera.py`); `tests/test_no_images.py`; `CONTRIBUTING.md` rule; pull request review; CodeQL | Medium: the test scans for image files, it does not assert the queue count | -| T2 | DepthAI telemetry, crash-dump upload or auto-calibration turns on | STRIDE I | `privacy.py` forces the three variables before `depthai` loads; `oak-events doctor` shows the state | Low: relies on DepthAI honouring its own variables | +| T2 | DepthAI telemetry, crash-dump upload or auto-calibration turns on | STRIDE I | `privacy.py` forces the three variables before `depthai` loads; `oak-events doctor` shows the state; every run writes a `privacy` event and `camera_health` reports `private` (from 0.1.2) | Low: relies on DepthAI honouring its own variables | | T3 | Someone reads event files and learns people's routines | STRIDE I | Files mode 0600; files never leave the host through oak-events | Medium: no encryption at rest and no automatic deletion (see `DATA_FLOW.md`) | -| T4 | A local process forges or edits event lines | STRIDE S, T | Owner-only file mode; the MCP server skips malformed lines | Medium: anyone with the same user account can write valid fake events; no integrity protection | +| T4 | A local process forges or edits event lines | STRIDE S, T | Owner-only file mode; the MCP server skips malformed lines; `HARDENING.md` runs the runner as a dedicated user and the MCP server read-only | Medium: anyone with the same user account can write valid fake events; no integrity protection | | T5 | Text in events carries instructions to the agent (prompt injection) | OWASP LLM01 | Events are flat JSON, mostly numeric; free text comes only from zone names (deployer config), model class labels (model archive), device metadata and error details (unexpected errors capped at 300 characters); tools return data, not instructions | Medium: a malicious zones file or model archive can still place text in front of an agent | | T6 | An agent is given more power than reading events | OWASP LLM06 | Tools are read-only; no tool reaches the camera, the file system beyond the events directory, or the network | Low inside oak-events; deployers who add action tools own that risk | -| T7 | The MCP server reads files outside the events directory | STRIDE I, E | Tools take no path arguments; the server reads only `*.jsonl` in the configured directory | Low: a symbolic link placed inside the directory is followed | +| T7 | The MCP server reads files outside the events directory | STRIDE I, E | Tools take no path arguments; the server reads only `*.jsonl` in the configured directory; the `HARDENING.md` sandbox makes everything outside the events and log directories read-only or hidden | Low: a symbolic link placed inside the directory is followed | | T8 | Very large event files slow or stop the MCP server | STRIDE D | Result limit of 500; health and zone tools read at most 14 daily files | Low: each read loads a whole daily file into memory | | T9 | The detector is evaded (people not detected) or spoofed (photos, screens, mannequins detected as people) | ATLAS AML.T0015 Evade AI Model; AML.T0043 Craft Adversarial Data | Confirm frames (3), confidence threshold (0.5), gone timeout (10 s) reduce noise | High for adversarial use: not a security control. oak-events must not be used as a safety or security system (acceptable use policy) | -| T10 | A poisoned or tampered model archive | ATLAS AML.T0010 AI Supply Chain Compromise; AML.T0018 Manipulate AI Model | No download at runtime; the deployer fetches the archive once; the model runs on the camera and can only emit detections, so it cannot add a picture stream; reference archive hash published in `MODEL_CARD.md` | Medium: no signature or automatic hash check. **Commitment:** optional `--model-sha256` check by 2027-03-31 | +| T10 | A poisoned or tampered model archive | ATLAS AML.T0010 AI Supply Chain Compromise; AML.T0018 Manipulate AI Model | No download at runtime; the deployer fetches the archive once; the model runs on the camera and can only emit detections, so it cannot add a picture stream; reference archive hash published in `MODEL_CARD.md`; optional `--model-sha256` refuses a mismatch and every `camera` `up` event records the archive hash (from 0.1.2) | Medium: no signature; the hash check is off unless the deployer sets it | | T11 | Another host on the network connects to a PoE camera and reads its streams directly | STRIDE I, outside oak-events | `DATA_FLOW.md` tells deployers to keep the camera on an isolated network segment | Depends on the deployment | | T12 | A malicious release or dependency | Supply chain | Actions pinned to commit SHAs; Dependabot; CodeQL; trusted publishing (no stored upload token); 2FA on the publishing account; no binaries in the repository | Medium: no branch protection yet (**Commitment** 2026-12-15); unsigned tags (**Commitment** 2027-01-31); dependency versions are ranges, not pins | | T13 | A malformed zones file crashes the runner | STRIDE D | Zones are validated; errors exit with code 2 and a one-line message | Low | @@ -75,3 +75,73 @@ make decisions. These threats are reassessed at each review and when the referen Physical tampering with the camera; compromise of the customer's host operating system; the agent's model provider; Luxonis device firmware internals. + +## 6. Mitigations mapped to threats + +Each mitigation, the threats it addresses, who operates it, and how it is evaluated. "0.1.2" +marks the changes released in oak-events 0.1.2 (branch `csa/logging-integrity`). + +| Mitigation | Threats | Layer | Evaluated by | +| --- | --- | --- | --- | +| Only two host queues (detections, depth); colour frames never linked to the host | T1 | oak-events code | `tests/test_no_images.py`; review rule in `CONTRIBUTING.md` | +| Depth map reduced to cell medians and dropped | T1, T3 | oak-events code | `tests/test_depth_change.py`; code review | +| Privacy variables forced before `depthai` loads | T2 | oak-events code | `tests/test_privacy.py` | +| `privacy` event per run; `private` in `camera_health`; alerting example (0.1.2) | T2 | oak-events code, deployer alerting | `tests/test_logging_integrity.py` | +| Event files mode 0600; one append per line | T3, T4 | oak-events code | `tests/test_sink.py` | +| Malformed lines skipped; parsing fuzzed | T4, T8, T13 | oak-events code | `tests/test_parsing_robustness.py`; Atheris harness (`fuzz` workflow, 60 s per push) | +| Flat JSON events; error detail capped at 300 characters; tools return data | T5 | oak-events code | Code review; `tests/test_mcp_tools.py` | +| Read-only MCP tools with no path arguments | T6, T7 | oak-events code | `tests/test_mcp_tools.py` (tool list) | +| Result limit 500; 14-day scan window | T8 | oak-events code | `tests/test_mcp_tools.py` | +| MCP access log, off by default (0.1.2) | T3, T6 | oak-events code, deployer | `tests/test_logging_integrity.py` | +| Sandbox recipe: dedicated user, read-only events for the MCP server, no network for it (`HARDENING.md`) | T3, T4, T6, T7 | Deployer | Tested in a Debian 13 container under systemd 257 on 2026-11-02 (`HARDENING.md` section 5) | +| Confirm frames (3), confidence threshold (0.5), gone timeout (10 s) | T9 | oak-events code | `tests/test_person_tracker.py` | +| Per-zone confidence statistics and spot-check procedure (0.1.2; `MODEL_CARD.md` section 7) | T9, T10 | oak-events code, deployer | `tests/test_logging_integrity.py`; the spot-check itself | +| Not a safety or security system (acceptable use) | T9 | Policy, deployer | Annual acceptable use review (governance policy section 8) | +| No model download at runtime; device blob cannot run host code | T10 | oak-events code, model format | `MODEL_CARD.md` section 5; code review | +| Published SHA-256 of the tested archive; `--model-sha256` (0.1.2) | T10 | oak-events docs and code, deployer | `MODEL_CARD.md` section 2 verification command; `tests/test_logging_integrity.py` | +| Camera on an isolated network segment | T11 | Deployer | Deployer's own check | +| Actions pinned by SHA; Dependabot; CodeQL; trusted publishing; hash-pinned CI tools | T12 | CloudLab Works release process | Scorecard weekly; monthly alert review (governance policy section 6) | +| Zones validation with exit code 2 | T13 | oak-events code | `tests/test_parsing_robustness.py`; fuzzing | + +**Adversarial threats to the model** (MITRE ATLAS, section 4): + +| ATLAS technique | Threat | What CloudLab Works does | What it does not do | +| --- | --- | --- | --- | +| AML.T0015 Evade AI Model | T9 (hiding from the camera) | Limits the effect to a missing event; prohibits safety and security use; confidence statistics show drift | Does not harden the model; upstream hardening is UNKNOWN | +| AML.T0043 Craft Adversarial Data | T9 (patches, photos, screens) | Confirm frames and threshold reduce single-frame spoofs; spot-check procedure includes a photo test | No adversarial training or input filtering | +| AML.T0010 AI Supply Chain Compromise | T10 | Hash pinning, no runtime download, documented provenance | No signature (none offered upstream) | +| AML.T0018 Manipulate AI Model | T10 | Same as AML.T0010; the model runs on the camera and can only emit detections | No model scanning beyond the archive member check in `MODEL_CARD.md` | + +CloudLab Works does not train or modify the model, so it cannot harden the model itself. The measures +above limit what an attack on the model can do to events and to the people in view. **Commitment:** ask +the model provider about adversarial robustness, and prefer a reference model with a published robustness +evaluation at the next model review, by 2027-11-01 (owner: Alex Alvord). + +## 7. Guardrail review + +Guardrails are the controls that limit what oak-events and the agents reading it can do: no pictures +to the host (T1), forced privacy defaults (T2), owner-only files (T3), read-only tools with no path +arguments and a result limit (T6 to T8), capped error text (T5), the model hash check (T10), and the +acceptable use prohibitions (governance policy section 8). + +**When.** Once a year with this threat model, and within 30 days of any of these triggers: + +1. a change to a law or standard in the governance policy's legal tracking table (section 7), or a new + law the annual legal check adds to it; +2. a new version of the OWASP Top 10 for LLM Applications, or new MITRE ATLAS techniques for object + detectors or agent tools; +3. a security incident or vulnerability report rated High or Critical, or a reported misuse of + oak-events; +4. a new MCP tool, event field, host output queue, reference model or DepthAI major version; +5. a new risk, or a change in rating, in `RISK_ASSESSMENT.md`. + +**What is checked.** For each guardrail: is it still enforced (its test still exists and passes in CI), +is it still enough for the risk scenarios in `RISK_ASSESSMENT.md`, and does any tracked law or standard +now ask for more. A guardrail found weak gets a dated fix in section 2 and in the risk register. + +**Record.** Each review is a dated commit to this table. + +| Review | Trigger | Result | +| --- | --- | --- | +| 2026-11-02 | First review, with the AI-CAIQ | All guardrails enforced by tests (section 6). Added: `privacy` event, model hash check, MCP access log, sandbox recipe. Open: symbolic links in the events directory (T7), no integrity protection for event lines (T4) | + diff --git a/docs/ssrm-ownership-ai-caiq-v1.1.0.csv b/docs/ssrm-ownership-ai-caiq-v1.1.0.csv new file mode 100644 index 0000000..cdfaed3 --- /dev/null +++ b/docs/ssrm-ownership-ai-caiq-v1.1.0.csv @@ -0,0 +1,321 @@ +question_id,control_id,domain,control_title,ownership,owner,answer,customer_responsibility +A&A-01.1,A&A-01,Audit & Assurance,Audit and Assurance Policy and Procedures,AP-Owned,CloudLab Works,YES,Customers may review the published Scorecard and this AI-CAIQ; assurance over their own deployment is theirs. +A&A-01.2,A&A-01,Audit & Assurance,Audit and Assurance Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +A&A-02.1,A&A-02,Audit & Assurance,Independent Assessments,AP-Owned,CloudLab Works,NO,Customers needing independent assurance should perform or commission their own review of the open source code. +A&A-03.1,A&A-03,Audit & Assurance,Risk Based Planning Assessment,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +A&A-04.1,A&A-04,Audit & Assurance,Requirements Compliance,AP-Owned,CloudLab Works,NO,"Verify the legal requirements that apply to your own camera deployment (notice, consent, retention)." +A&A-05.1,A&A-05,Audit & Assurance,Audit Management Process,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +A&A-06.1,A&A-06,Audit & Assurance,Remediation,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +AIS-01.1,AIS-01,Application & Interface Security,Application and Interface Security Policy and Procedures,AP-Owned,CloudLab Works,YES,Apply your own application security policy to how you deploy and integrate oak-events. +AIS-01.2,AIS-01,Application & Interface Security,Application and Interface Security Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +AIS-02.1,AIS-02,Application & Interface Security,Application Security Baseline Requirements,AP-Owned,CloudLab Works,YES,None for the baseline; keep event files and the events directory owner-only as shipped. +AIS-03.1,AIS-03,Application & Interface Security,Application Security Metrics,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +AIS-04.1,AIS-04,Application & Interface Security,Secure Application Development Lifecycle,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +AIS-05.1,AIS-05,Application & Interface Security,Application Security Testing,AP-Owned,CloudLab Works,YES,Test new versions on your own hardware before upgrading production deployments. +AIS-05.2,AIS-05,Application & Interface Security,Application Security Testing,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +AIS-06.1,AIS-06,Application & Interface Security,Secure Application Deployment,Shared AP-AIC,Shared: CloudLab Works and customer,NO,"Install a pinned version, run oak-events under a supervisor that restarts it (README 'Running it for real', https://github.com/cloudlabworks/oak-events/blob/1732fbb/README.md) and own the deployment configuration." +AIS-07.1,AIS-07,Application & Interface Security,Application Vulnerability Remediation,AP-Owned,CloudLab Works,YES,Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +AIS-08.1,AIS-08,Application & Interface Security,API Security,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Restrict who can start the MCP server and read the events directory; configure tool approval in your MCP client. +AIS-08.2,AIS-08,Application & Interface Security,API Security,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +AIS-09.1,AIS-09,Application & Interface Security,Input Validation,AP-Owned,CloudLab Works,YES,Keep the zones file and model file under your control. +AIS-10.1,AIS-10,Application & Interface Security,Output Validation,AP-Owned,CloudLab Works,YES,Keep the events directory writable only by the account that runs 'oak-events run'. +AIS-11.1,AIS-11,Application & Interface Security,Agents Security Boundaries,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Define the agent's other tools and permissions in your MCP client; oak-events only bounds its own tools. +AIS-12.1,AIS-12,Application & Interface Security,Source Code Management,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +AIS-13.1,AIS-13,Application & Interface Security,AI Sandboxing,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Run the MCP server and agent tools in an isolated environment with read-only access to the events directory. +AIS-14.1,AIS-14,Application & Interface Security,AI Cache Protection,ND,Not applicable (no owner),NA,Protect any caches in your own agent runtime or MCP client. +AIS-15.1,AIS-15,Application & Interface Security,Prompt Differentiation,AIC-Owned,Customer,NA,Treat oak-events tool output as untrusted data in your agent's prompts (zone names and labels come from your configuration and model). +BCR-01.1,BCR-01,Business Continuity Management and Operational Resilience,Business Continuity Management Policy and Procedures,AP-Owned,CloudLab Works,NO,Keep a copy of the release you run and of your model file. +BCR-01.2,BCR-01,Business Continuity Management and Operational Resilience,Business Continuity Management Policy and Procedures,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +BCR-02.1,BCR-02,Business Continuity Management and Operational Resilience,Risk Assessment and Impact Analysis,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +BCR-02.2,BCR-02,Business Continuity Management and Operational Resilience,Risk Assessment and Impact Analysis,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +BCR-03.1,BCR-03,Business Continuity Management and Operational Resilience,Business Continuity Strategy,Shared AP-AIC,Shared: CloudLab Works and customer,YES,"Run oak-events under a supervisor (systemd, launchd, container restart policy) and keep the release and model file you depend on." +BCR-04.1,BCR-04,Business Continuity Management and Operational Resilience,Business Continuity Planning,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +BCR-05.1,BCR-05,Business Continuity Management and Operational Resilience,Documentation,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +BCR-05.2,BCR-05,Business Continuity Management and Operational Resilience,Documentation,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +BCR-06.1,BCR-06,Business Continuity Management and Operational Resilience,Business Continuity Exercises,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +BCR-07.1,BCR-07,Business Continuity Management and Operational Resilience,Communication,AP-Owned,CloudLab Works,YES,Watch the repository releases to receive notices. +BCR-08.1,BCR-08,Business Continuity Management and Operational Resilience,Backup,AIC-Owned,Customer,NA,"Back up event files, zones file and model file according to your own policy." +BCR-08.2,BCR-08,Business Continuity Management and Operational Resilience,Backup,AIC-Owned,Customer,NA,Protect and test restores of your own backups. +BCR-09.1,BCR-09,Business Continuity Management and Operational Resilience,Disaster Response Plan,ND,Not applicable (no owner),NA,Include the oak-events host and camera in your own disaster response plan. +BCR-09.2,BCR-09,Business Continuity Management and Operational Resilience,Disaster Response Plan,ND,Not applicable (no owner),NA,Review your own plan. +BCR-10.1,BCR-10,Business Continuity Management and Operational Resilience,Response Plan Exercise,ND,Not applicable (no owner),NA,Exercise your own plan. +BCR-11.1,BCR-11,Business Continuity Management and Operational Resilience,Equipment Redundancy,AIC-Owned,Customer,NA,Provide redundant cameras or hosts if your use case needs them. +CCC-01.1,CCC-01,Change Control and Configuration Management,Change Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CCC-01.2,CCC-01,Change Control and Configuration Management,Change Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CCC-02.1,CCC-02,Change Control and Configuration Management,Quality Testing,AP-Owned,CloudLab Works,YES,Review the CHANGELOG before upgrading. +CCC-03.1,CCC-03,Change Control and Configuration Management,Change Management Technology,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CCC-04.1,CCC-04,Change Control and Configuration Management,Unauthorized Change Protection,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +CCC-05.1,CCC-05,Change Control and Configuration Management,Change Agreements,AIC-Owned,Customer,NA,Decide when to upgrade; pin the version you run. +CCC-06.1,CCC-06,Change Control and Configuration Management,Change Management Baseline,AP-Owned,CloudLab Works,YES,Record the configuration you deploy. +CCC-06.2,CCC-06,Change Control and Configuration Management,Change Management Baseline,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CCC-07.1,CCC-07,Change Control and Configuration Management,Detection of Baseline Deviation,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Alert on the startup privacy event once available. +CCC-08.1,CCC-08,Change Control and Configuration Management,Exception Management,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CCC-09.1,CCC-09,Change Control and Configuration Management,Change Restoration,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Pin versions and keep the previous version available for rollback. +CEK-01.1,CEK-01,"Cryptography, Encryption & Key Management",Encryption and Key Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CEK-01.2,CEK-01,"Cryptography, Encryption & Key Management",Encryption and Key Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CEK-02.1,CEK-02,"Cryptography, Encryption & Key Management",CEK Roles and Responsibilities,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CEK-03.1,CEK-03,"Cryptography, Encryption & Key Management",Data Protection,AIC-Owned,Customer,NA,"Use full-disk encryption on the host and keep the PoE camera on a trusted, isolated network segment." +CEK-04.1,CEK-04,"Cryptography, Encryption & Key Management",Encryption Algorithm,AIC-Owned,Customer,NA,"Use full-disk encryption on the host and keep the PoE camera on a trusted, isolated network segment." +CEK-05.1,CEK-05,"Cryptography, Encryption & Key Management",Encryption Change Management,ND,Not applicable (no owner),NA,Manage cryptography in your own environment. +CEK-06.1,CEK-06,"Cryptography, Encryption & Key Management",Encryption Change Cost Benefit Analysis,ND,Not applicable (no owner),NA,Manage cryptography in your own environment. +CEK-07.1,CEK-07,"Cryptography, Encryption & Key Management",Encryption Risk Management,ND,Not applicable (no owner),NA,Manage cryptography in your own environment. +CEK-08.1,CEK-08,"Cryptography, Encryption & Key Management",Service Customer Key Management Capability,AIC-Owned,Customer,NA,Manage your own keys. +CEK-09.1,CEK-09,"Cryptography, Encryption & Key Management",Encryption and Key Management Audit,ND,Not applicable (no owner),NA,Audit your own systems. +CEK-09.2,CEK-09,"Cryptography, Encryption & Key Management",Encryption and Key Management Audit,ND,Not applicable (no owner),NA,Audit your own systems. +CEK-10.1,CEK-10,"Cryptography, Encryption & Key Management",Key Generation,CSP-Owned,Platform provider,NA,Generate keys in your environment with approved libraries. +CEK-11.1,CEK-11,"Cryptography, Encryption & Key Management",Key Purpose,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +CEK-12.1,CEK-12,"Cryptography, Encryption & Key Management",Key Rotation,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-13.1,CEK-13,"Cryptography, Encryption & Key Management",Key Revocation,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-14.1,CEK-14,"Cryptography, Encryption & Key Management",Key Destruction,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-15.1,CEK-15,"Cryptography, Encryption & Key Management",Key Activation,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-16.1,CEK-16,"Cryptography, Encryption & Key Management",Key Suspension,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-17.1,CEK-17,"Cryptography, Encryption & Key Management",Key Deactivation,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-18.1,CEK-18,"Cryptography, Encryption & Key Management",Key Archival,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-19.1,CEK-19,"Cryptography, Encryption & Key Management",Key Compromise,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-20.1,CEK-20,"Cryptography, Encryption & Key Management",Key Recovery,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +CEK-21.1,CEK-21,"Cryptography, Encryption & Key Management",Key Inventory Management,ND,Not applicable (no owner),NA,Apply key lifecycle controls to keys in your own environment. +DCS-01.1,DCS-01,Datacenter Security,Physical and Environmental Security Policy and Procedures,AIC-Owned,Customer,NA,"Secure the premises, camera and host physically." +DCS-01.2,DCS-01,Datacenter Security,Physical and Environmental Security Policy and Procedures,AIC-Owned,Customer,NA,"Secure the premises, camera and host physically." +DCS-02.1,DCS-02,Datacenter Security,Off-Site Equipment Disposal Policy and Procedures,AIC-Owned,Customer,NA,Wipe hosts and storage that held event files before disposal. +DCS-02.2,DCS-02,Datacenter Security,Off-Site Equipment Disposal Policy and Procedures,AIC-Owned,Customer,NA,Wipe hosts and storage that held event files before disposal. +DCS-02.3,DCS-02,Datacenter Security,Off-Site Equipment Disposal Policy and Procedures,AIC-Owned,Customer,NA,Wipe hosts and storage that held event files before disposal. +DCS-03.1,DCS-03,Datacenter Security,Off-Site Transfer Authorization Policy and Procedures,AIC-Owned,Customer,NA,Control transfers of your own hosts and event files. +DCS-03.2,DCS-03,Datacenter Security,Off-Site Transfer Authorization Policy and Procedures,AIC-Owned,Customer,NA,Control transfers of your own hosts and event files. +DCS-03.3,DCS-03,Datacenter Security,Off-Site Transfer Authorization Policy and Procedures,AIC-Owned,Customer,NA,Control transfers of your own hosts and event files. +DCS-04.1,DCS-04,Datacenter Security,Secure Area Policy and Procedures,AIC-Owned,Customer,NA,"Secure the premises, camera and host physically." +DCS-04.2,DCS-04,Datacenter Security,Secure Area Policy and Procedures,AIC-Owned,Customer,NA,"Secure the premises, camera and host physically." +DCS-05.1,DCS-05,Datacenter Security,Secure Media Transportation Policy and Procedures,ND,Not applicable (no owner),NA,Apply your own media transport rules. +DCS-05.2,DCS-05,Datacenter Security,Secure Media Transportation Policy and Procedures,ND,Not applicable (no owner),NA,Apply your own media transport rules. +DCS-06.1,DCS-06,Datacenter Security,Assets Classification,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DCS-06.2,DCS-06,Datacenter Security,Assets Classification,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DCS-07.1,DCS-07,Datacenter Security,Assets Cataloguing and Tracking,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DCS-07.2,DCS-07,Datacenter Security,Assets Cataloguing and Tracking,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DCS-08.1,DCS-08,Datacenter Security,Controlled Physical Access Points,AIC-Owned,Customer,NA,"Secure the premises, camera and host physically." +DCS-09.1,DCS-09,Datacenter Security,Equipment Identification,AIC-Owned,Customer,NA,Restrict which devices can reach the camera network. +DCS-10.1,DCS-10,Datacenter Security,Secure Area Authorization,AIC-Owned,Customer,NA,"Secure the premises, camera and host physically." +DCS-10.2,DCS-10,Datacenter Security,Secure Area Authorization,AIC-Owned,Customer,NA,"Secure the premises, camera and host physically." +DCS-11.1,DCS-11,Datacenter Security,Surveillance System,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DCS-12.1,DCS-12,Datacenter Security,Adverse Event Response Training,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DCS-13.1,DCS-13,Datacenter Security,Cabling Security,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DCS-14.1,DCS-14,Datacenter Security,Environmental Systems,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DCS-15.1,DCS-15,Datacenter Security,Secure Utilities,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DCS-16.1,DCS-16,Datacenter Security,Equipment Location,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DCS-17.1,DCS-17,Datacenter Security,Datacenter Metrics,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DCS-18.1,DCS-18,Datacenter Security,Datacenter Operations Resilience,ND,Not applicable (no owner),NA,Apply to your own facilities if relevant. +DSP-01.1,DSP-01,Data Security and Privacy Lifecycle Management,Security and Privacy Policy and Procedures,AP-Owned,CloudLab Works,YES,Apply your data lifecycle policy to event files. +DSP-01.2,DSP-01,Data Security and Privacy Lifecycle Management,Security and Privacy Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DSP-02.1,DSP-02,Data Security and Privacy Lifecycle Management,Secure Disposal,AIC-Owned,Customer,NA,Delete event files securely when retiring storage. +DSP-03.1,DSP-03,Data Security and Privacy Lifecycle Management,Data Inventory,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Inventory where your deployment stores event files. +DSP-03.2,DSP-03,Data Security and Privacy Lifecycle Management,Data Inventory,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DSP-04.1,DSP-04,Data Security and Privacy Lifecycle Management,Data Classification,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Classify event files under your own scheme (sensitive at minimum). +DSP-05.1,DSP-05,Data Security and Privacy Lifecycle Management,Data Flow Documentation,Shared AP-AIC,Shared: CloudLab Works and customer,YES,"Document any further flows you add (webhooks, agent logs)." +DSP-05.2,DSP-05,Data Security and Privacy Lifecycle Management,Data Flow Documentation,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DSP-06.1,DSP-06,Data Security and Privacy Lifecycle Management,Data Ownership and Stewardship,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Name an owner for event data in your organization. +DSP-06.2,DSP-06,Data Security and Privacy Lifecycle Management,Data Ownership and Stewardship,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Review your data ownership annually. +DSP-07.1,DSP-07,Data Security and Privacy Lifecycle Management,Data Protection by Design and Default,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +DSP-08.1,DSP-08,Data Security and Privacy Lifecycle Management,Data Privacy by Design and Default,AP-Owned,CloudLab Works,YES,Keep event files local. +DSP-08.2,DSP-08,Data Security and Privacy Lifecycle Management,Data Privacy by Design and Default,AP-Owned,CloudLab Works,YES,"Meet recording, notice and consent laws where the camera is installed." +DSP-09.1,DSP-09,Data Security and Privacy Lifecycle Management,Data Protection Impact Assessment,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Run your own DPIA where law requires. +DSP-10.1,DSP-10,Data Security and Privacy Lifecycle Management,Sensitive Data Transfer,AIC-Owned,Customer,NA,Protect any forwarding you configure and isolate the camera link. +DSP-11.1,DSP-11,Data Security and Privacy Lifecycle Management,"Personal Data Access, Reversal, Rectification and Deletion",AIC-Owned,Customer,NA,Handle data-subject requests for your event files. +DSP-12.1,DSP-12,Data Security and Privacy Lifecycle Management,Limitation of Purpose in Personal Data Processing,AIC-Owned,Customer,NA,Declare and keep to the purpose of your camera deployment. +DSP-13.1,DSP-13,Data Security and Privacy Lifecycle Management,Personal Data Sub-processing,ND,Not applicable (no owner),NA,"Manage your own sub-processors (e.g. webhook targets, hosted LLMs)." +DSP-14.1,DSP-14,Data Security and Privacy Lifecycle Management,Disclosure of Data Sub-processors,ND,Not applicable (no owner),NA,Disclose your own sub-processors to data subjects. +DSP-15.1,DSP-15,Data Security and Privacy Lifecycle Management,Limitation of Production Data Use,ND,Not applicable (no owner),NA,Do not attach real event data to public issues (see the bug template). +DSP-16.1,DSP-16,Data Security and Privacy Lifecycle Management,Data Retention and Deletion,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Set and enforce a retention period for event files. See DATA_FLOW.md section 4 for a cleanup recipe. +DSP-17.1,DSP-17,Data Security and Privacy Lifecycle Management,Sensitive Data Protection,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Encrypt the host disk and restrict access to the events directory. +DSP-18.1,DSP-18,Data Security and Privacy Lifecycle Management,Disclosure Notification,ND,Not applicable (no owner),NA,Handle authority requests for your own event files. +DSP-19.1,DSP-19,Data Security and Privacy Lifecycle Management,Data Location,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Choose and record where event files are stored. +DSP-20.1,DSP-20,Data Security and Privacy Lifecycle Management,Data Provenance and Transparency,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Record which model file and device you deploy. +DSP-21.1,DSP-21,Data Security and Privacy Lifecycle Management,Data Poisoning Prevention & Detection,MP-Owned,Model provider,NA,Choose detection models from a provider whose training-data practices you accept. +DSP-22.1,DSP-22,Data Security and Privacy Lifecycle Management,Privacy Enhancing Technologies,MP-Owned,Model provider,NA,Choose detection models from a provider whose training-data practices you accept. +DSP-23.1,DSP-23,Data Security and Privacy Lifecycle Management,Data Integrity Check,MP-Owned,Model provider,NA,Choose detection models from a provider whose training-data practices you accept. +DSP-23.2,DSP-23,Data Security and Privacy Lifecycle Management,Data Integrity Check,MP-Owned,Model provider,NA,Choose detection models from a provider whose training-data practices you accept. +DSP-24.1,DSP-24,Data Security and Privacy Lifecycle Management,Data Differentiation and Relevance,MP-Owned,Model provider,NA,Choose detection models from a provider whose training-data practices you accept. +GRC-01.1,GRC-01,"Governance, Risk and Compliance",Governance Program Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-01.2,GRC-01,"Governance, Risk and Compliance",Governance Program Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-02.1,GRC-02,"Governance, Risk and Compliance",Risk Management Program,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-03.1,GRC-03,"Governance, Risk and Compliance",Organizational Policy Reviews,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-04.1,GRC-04,"Governance, Risk and Compliance",Policy Exception Process,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-05.1,GRC-05,"Governance, Risk and Compliance",Information Security Program,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-06.1,GRC-06,"Governance, Risk and Compliance",Governance Responsibility Model,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-07.1,GRC-07,"Governance, Risk and Compliance",Information System Regulatory Mapping,AP-Owned,CloudLab Works,YES,Identify the requirements that apply to your deployment. +GRC-07.2,GRC-07,"Governance, Risk and Compliance",Information System Regulatory Mapping,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-08.1,GRC-08,"Governance, Risk and Compliance",Special Interest Groups,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-09.1,GRC-09,"Governance, Risk and Compliance",Acceptable Use of the AI Service,AP-Owned,CloudLab Works,YES,Use oak-events within the acceptable-use policy and local law. Follow the acceptable use policy (governance policy section 8). +GRC-09.2,GRC-09,"Governance, Risk and Compliance",Acceptable Use of the AI Service,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-10.1,GRC-10,"Governance, Risk and Compliance",AI Impact Assessment,AP-Owned,CloudLab Works,NO,Assess the impact of your own deployment. +GRC-11.1,GRC-11,"Governance, Risk and Compliance",Bias and Fairness Assessment,Shared Across the Supply Chain,Shared across the supply chain,NO,Check detection quality on the people and scenes in your deployment. +GRC-12.1,GRC-12,"Governance, Risk and Compliance",Ethics Committee,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +GRC-13.1,GRC-13,"Governance, Risk and Compliance",Explainability Requirement,AP-Owned,CloudLab Works,YES,Decide the explainability your use case needs. +GRC-14.1,GRC-14,"Governance, Risk and Compliance",Explainability Evaluation,AP-Owned,CloudLab Works,YES,Account for these limits in agent behaviour. +GRC-15.1,GRC-15,"Governance, Risk and Compliance",Human supervision,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Keep a human in control of any actions your agent takes on oak-events data. +HRS-01.1,HRS-01,Human Resources,Background Screening Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-01.2,HRS-01,Human Resources,Background Screening Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-01.3,HRS-01,Human Resources,Background Screening Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-02.1,HRS-02,Human Resources,Acceptable Use of Technology Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-02.2,HRS-02,Human Resources,Acceptable Use of Technology Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-03.1,HRS-03,Human Resources,Clean Desk Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-03.2,HRS-03,Human Resources,Clean Desk Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-04.1,HRS-04,Human Resources,Remote and Home Working Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-04.2,HRS-04,Human Resources,Remote and Home Working Policy and Procedures,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-05.1,HRS-05,Human Resources,Asset returns,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-06.1,HRS-06,Human Resources,Employment Termination,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-07.1,HRS-07,Human Resources,Employment Agreement Process,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-08.1,HRS-08,Human Resources,Employment Agreement Content,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-09.1,HRS-09,Human Resources,Personnel Roles and Responsibilities,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-10.1,HRS-10,Human Resources,Non-Disclosure Agreements,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-11.1,HRS-11,Human Resources,Security Awareness Training,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-11.2,HRS-11,Human Resources,Security Awareness Training,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-12.1,HRS-12,Human Resources,Personal and Sensitive Data Awareness and Training,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-13.1,HRS-13,Human Resources,Compliance User Responsibility,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-14.1,HRS-14,Human Resources,AI Competency Training,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-14.2,HRS-14,Human Resources,AI Competency Training,ND,Not applicable (no owner),NA,No customer action for this control; it concerns CloudLab Works' own practices. +HRS-15.1,HRS-15,Human Resources,AI Acceptable Use,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-01.1,IAM-01,Identity & Access Management,Identity and Access Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-01.2,IAM-01,Identity & Access Management,Identity and Access Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-02.1,IAM-02,Identity & Access Management,Credentials Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-02.2,IAM-02,Identity & Access Management,Credentials Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-03.1,IAM-03,Identity & Access Management,Identity Inventory,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-04.1,IAM-04,Identity & Access Management,Separation of Duties,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-05.1,IAM-05,Identity & Access Management,Least Privilege,AP-Owned,CloudLab Works,YES,Run oak-events under an unprivileged account. +IAM-06.1,IAM-06,Identity & Access Management,Access Provisioning,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-07.1,IAM-07,Identity & Access Management,Access Changes and Revocation,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-08.1,IAM-08,Identity & Access Management,Access Review,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-09.1,IAM-09,Identity & Access Management,Segregation of Privileged Access Roles,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-10.1,IAM-10,Identity & Access Management,Management of Privileged Access Roles,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-10.2,IAM-10,Identity & Access Management,Management of Privileged Access Roles,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-11.1,IAM-11,Identity & Access Management,Service Customers' Approval for Agreed Privileged Access Roles,AIC-Owned,Customer,NA,Control privileged access in your environment. +IAM-12.1,IAM-12,Identity & Access Management,Unique Identities,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-13.1,IAM-13,Identity & Access Management,Strong Authentication,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-13.2,IAM-13,Identity & Access Management,Strong Authentication,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-14.1,IAM-14,Identity & Access Management,Credentials Management,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IAM-15.1,IAM-15,Identity & Access Management,Authorization Mechanisms,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Control which accounts can run oak-events and read the events directory. +IAM-16.1,IAM-16,Identity & Access Management,Knowledge Access Control - Need to Know,AP-Owned,CloudLab Works,YES,Give agents only the oak-events access they need. +IAM-17.1,IAM-17,Identity & Access Management,Output Modification and Special Authorization,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Restrict write access to the events directory. +IAM-18.1,IAM-18,Identity & Access Management,Agent Access Restriction,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Grant agents only the MCP servers they need. +IPY-01.1,IPY-01,Interoperability & Portability,Interoperability and Portability Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IPY-01.2,IPY-01,Interoperability & Portability,Interoperability and Portability Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +IPY-02.1,IPY-02,Interoperability & Portability,Application Interface Availability,AP-Owned,CloudLab Works,YES,Retrieve your data directly from the events directory. +IPY-03.1,IPY-03,Interoperability & Portability,Secure Interoperability and Portability Management,AIC-Owned,Customer,NA,Use secure protocols for any forwarding you add. +IPY-04.1,IPY-04,Interoperability & Portability,Data Portability Contractual Obligations,ND,Not applicable (no owner),NA,None. +I&S-01.1,I&S-01,Infrastructure Security,Infrastructure and Virtualization Security Policy and Procedures,AIC-Owned,Customer,NA,"Apply your own organization's policy for this control to the host, camera and event files of your deployment." +I&S-01.2,I&S-01,Infrastructure Security,Infrastructure and Virtualization Security Policy and Procedures,AIC-Owned,Customer,NA,"Apply your own organization's policy for this control to the host, camera and event files of your deployment." +I&S-02.1,I&S-02,Infrastructure Security,Capacity and Resource Planning,AIC-Owned,Customer,NA,Size the host for the camera pipeline. +I&S-03.1,I&S-03,Infrastructure Security,Network Security,AIC-Owned,Customer,NA,Isolate the PoE camera on a trusted network segment; restrict who can reach it. +I&S-03.2,I&S-03,Infrastructure Security,Network Security,AIC-Owned,Customer,NA,"Apply your own organization's policy for this control to the host, camera and event files of your deployment." +I&S-04.1,I&S-04,Infrastructure Security,OS Hardening and Base Controls,AIC-Owned,Customer,NA,Harden the host OS. +I&S-05.1,I&S-05,Infrastructure Security,Production and Non-Production Environments,ND,Not applicable (no owner),NA,Separate test and production deployments if you have both. +I&S-05.2,I&S-05,Infrastructure Security,Production and Non-Production Environments,ND,Not applicable (no owner),NA,Sanitize event files before non-production use. +I&S-06.1,I&S-06,Infrastructure Security,Segmentation and Segregation,AIC-Owned,Customer,NA,Separate deployments for different parties. +I&S-07.1,I&S-07,Infrastructure Security,Migration to Hosted Environments,ND,Not applicable (no owner),NA,Use encrypted channels if you move event files. +I&S-07.2,I&S-07,Infrastructure Security,Migration to Hosted Environments,ND,Not applicable (no owner),NA,Use current protocols. +I&S-08.1,I&S-08,Infrastructure Security,Network Architecture Documentation,AIC-Owned,Customer,NA,Identify the camera network and event store as sensitive in your environment. +I&S-09.1,I&S-09,Infrastructure Security,Network Defense,AIC-Owned,Customer,NA,Apply network defence to the host and camera network. +LOG-01.1,LOG-01,Logging and Monitoring,Logging and Monitoring Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +LOG-01.2,LOG-01,Logging and Monitoring,Logging and Monitoring Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +LOG-02.1,LOG-02,Logging and Monitoring,Audit Logs Protection,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Back up and retain event files according to your policy. +LOG-03.1,LOG-03,Logging and Monitoring,Security Monitoring and Alerting,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Monitor security events once emitted. +LOG-03.2,LOG-03,Logging and Monitoring,Security Monitoring and Alerting,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Wire security alerts into your monitoring. +LOG-04.1,LOG-04,Logging and Monitoring,Audit Logs Access and Accountability,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Restrict and record access to the events directory. +LOG-05.1,LOG-05,Logging and Monitoring,Audit Logs Monitoring and Response,AIC-Owned,Customer,NA,Correlate oak-events and host logs in your own monitoring. +LOG-05.2,LOG-05,Logging and Monitoring,Audit Logs Monitoring and Response,AIC-Owned,Customer,NA,Define your own anomaly response. +LOG-06.1,LOG-06,Logging and Monitoring,Clock Synchronization,AIC-Owned,Customer,NA,Synchronize the host clock (NTP). +LOG-07.1,LOG-07,Logging and Monitoring,Logging Scope,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Decide which events you keep and forward. +LOG-07.2,LOG-07,Logging and Monitoring,Logging Scope,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +LOG-08.1,LOG-08,Logging and Monitoring,Audit Logs Sanitization,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Redact device ids before sharing event files. Use the DATA_FLOW.md section 5 recipe before sharing event files. +LOG-09.1,LOG-09,Logging and Monitoring,Log Records,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Enable and retain the access log once available. +LOG-10.1,LOG-10,Logging and Monitoring,Audit Records Protection,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Protect the events directory against modification and deletion. +LOG-11.1,LOG-11,Logging and Monitoring,Encryption Monitoring and Reporting,ND,Not applicable (no owner),NA,None. +LOG-12.1,LOG-12,Logging and Monitoring,Transaction/Activity Logging,ND,Not applicable (no owner),NA,None. +LOG-13.1,LOG-13,Logging and Monitoring,Access Control Logs,ND,Not applicable (no owner),NA,Log physical access to your camera and host if needed. +LOG-14.1,LOG-14,Logging and Monitoring,Failures and Anomalies Reporting,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Act on camera_health and camera events. +LOG-14.2,LOG-14,Logging and Monitoring,Failures and Anomalies Reporting,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Wire the notifications to the people accountable. +LOG-15.1,LOG-15,Logging and Monitoring,Input Monitoring,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Log agent tool calls in your MCP client if needed. +LOG-16.1,LOG-16,Logging and Monitoring,Output Monitoring,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Retain the event files you need for audit. +MDS-01.1,MDS-01,Model Security,Training Pipeline Security,MP-Owned,Model provider,NA,Choose models from providers with a secure training pipeline. +MDS-01.2,MDS-01,Model Security,Training Pipeline Security,MP-Owned,Model provider,NA,As MDS-01.1. +MDS-02.1,MDS-02,Model Security,Model Artifact Scanning,Shared Across the Supply Chain,Shared across the supply chain,NO,Verify the model file before use. +MDS-02.2,MDS-02,Model Security,Model Artifact Scanning,Shared Across the Supply Chain,Shared across the supply chain,NO,No customer action for this control; it concerns CloudLab Works' own practices. +MDS-03.1,MDS-03,Model Security,Model Documentation,AP-Owned,CloudLab Works,YES,Document the model you deploy. +MDS-03.2,MDS-03,Model Security,Model Documentation,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +MDS-04.1,MDS-04,Model Security,Model Documentation Requirements,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +MDS-05.1,MDS-05,Model Security,Model Documentation Validation,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +MDS-06.1,MDS-06,Model Security,Adversarial Attack Analysis,Shared Across the Supply Chain,Shared across the supply chain,YES,Assess adversarial risk at your site. +MDS-07.1,MDS-07,Model Security,Robustness against Adversarial Attack / Model Hardening,Shared Across the Supply Chain,Shared across the supply chain,NO,No customer action for this control; it concerns CloudLab Works' own practices. +MDS-08.1,MDS-08,Model Security,Model Integrity Checks,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Pin and verify the model hash. +MDS-08.2,MDS-08,Model Security,Model Integrity Checks,Shared AP-AIC,Shared: CloudLab Works and customer,NO,No customer action for this control; it concerns CloudLab Works' own practices. +MDS-09.1,MDS-09,Model Security,Model Signing/Ownership Verification,Shared Across the Supply Chain,Shared across the supply chain,NO,Load models only from trusted sources. +MDS-10.1,MDS-10,Model Security,Model Continuous Monitoring,Shared AP-AIC,Shared: CloudLab Works and customer,NO,Spot-check detections on your scene. +MDS-11.1,MDS-11,Model Security,Model Failure,AP-Owned,CloudLab Works,YES,Decide what a missed or false event means for your use case. +MDS-11.2,MDS-11,Model Security,Model Failure,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Run under a supervisor and alert on camera_health. +MDS-12.1,MDS-12,Model Security,Open Model Risk Assessment,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Assess the open model you choose. Assess the open model you choose; see MODEL_CARD.md section 5. +MDS-12.2,MDS-12,Model Security,Open Model Risk Assessment,Shared AP-AIC,Shared: CloudLab Works and customer,YES,No customer action for this control; it concerns CloudLab Works' own practices. +MDS-13.1,MDS-13,Model Security,Secure Model Format,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Use NNArchive files from trusted sources. +SEF-01.1,SEF-01,"Security Incident Management, E-Discovery, & Cloud Forensics",Security Incident Management Policy and Procedures,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-01.2,SEF-01,"Security Incident Management, E-Discovery, & Cloud Forensics",Security Incident Management Policy and Procedures,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-02.1,SEF-02,"Security Incident Management, E-Discovery, & Cloud Forensics",Service Management Policy and Procedures,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-02.2,SEF-02,"Security Incident Management, E-Discovery, & Cloud Forensics",Service Management Policy and Procedures,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-03.1,SEF-03,"Security Incident Management, E-Discovery, & Cloud Forensics",Incident Response Plans,AP-Owned,CloudLab Works,YES,Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +SEF-04.1,SEF-04,"Security Incident Management, E-Discovery, & Cloud Forensics",Incident Response Testing,AP-Owned,CloudLab Works,NO,Handle incidents in your own deployment. +SEF-05.1,SEF-05,"Security Incident Management, E-Discovery, & Cloud Forensics",Incident Response Metrics,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-06.1,SEF-06,"Security Incident Management, E-Discovery, & Cloud Forensics",Event Triage Processes,AP-Owned,CloudLab Works,YES,Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +SEF-07.1,SEF-07,"Security Incident Management, E-Discovery, & Cloud Forensics",Incident Management and Response,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-07.2,SEF-07,"Security Incident Management, E-Discovery, & Cloud Forensics",Incident Management and Response,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-08.1,SEF-08,"Security Incident Management, E-Discovery, & Cloud Forensics",Security Breach Notification,AP-Owned,CloudLab Works,YES,Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +SEF-08.2,SEF-08,"Security Incident Management, E-Discovery, & Cloud Forensics",Security Breach Notification,AP-Owned,CloudLab Works,YES,Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +SEF-09.1,SEF-09,"Security Incident Management, E-Discovery, & Cloud Forensics",Incident Records Management,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-09.2,SEF-09,"Security Incident Management, E-Discovery, & Cloud Forensics",Incident Records Management,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-10.1,SEF-10,"Security Incident Management, E-Discovery, & Cloud Forensics",Points of Contact Maintenance,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +SEF-10.2,SEF-10,"Security Incident Management, E-Discovery, & Cloud Forensics",Points of Contact Maintenance,AP-Owned,CloudLab Works,YES,Handle incidents in your own deployment. +STA-01.1,STA-01,"Supply Chain Management, Transparency, and Accountability",Supply Chain Risk Management Policies and Procedures,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +STA-01.2,STA-01,"Supply Chain Management, Transparency, and Accountability",Supply Chain Risk Management Policies and Procedures,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +STA-02.1,STA-02,"Supply Chain Management, Transparency, and Accountability",SSRM Policy and Procedures,AP-Owned,CloudLab Works,NO,Read the shared-responsibility guide and implement the customer-owned controls. +STA-02.2,STA-02,"Supply Chain Management, Transparency, and Accountability",SSRM Policy and Procedures,AP-Owned,CloudLab Works,NO,Read the shared-responsibility guide and implement the customer-owned controls. +STA-03.1,STA-03,"Supply Chain Management, Transparency, and Accountability",SSRM Supply Chain,AP-Owned,CloudLab Works,NO,Read the shared-responsibility guide and implement the customer-owned controls. +STA-04.1,STA-04,"Supply Chain Management, Transparency, and Accountability",SSRM Guidance,AP-Owned,CloudLab Works,NO,Read the shared-responsibility guide and implement the customer-owned controls. +STA-05.1,STA-05,"Supply Chain Management, Transparency, and Accountability",SSRM Control Ownership,AP-Owned,CloudLab Works,NO,Read the shared-responsibility guide and implement the customer-owned controls. +STA-06.1,STA-06,"Supply Chain Management, Transparency, and Accountability",SSRM Documentation Review,AP-Owned,CloudLab Works,NO,Read the shared-responsibility guide and implement the customer-owned controls. +STA-07.1,STA-07,"Supply Chain Management, Transparency, and Accountability",SSRM Control Implementation,AP-Owned,CloudLab Works,NO,Read the shared-responsibility guide and implement the customer-owned controls. +STA-08.1,STA-08,"Supply Chain Management, Transparency, and Accountability",Supply Chain Inventory,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +STA-09.1,STA-09,"Supply Chain Management, Transparency, and Accountability",Service Bill of Material (BOM),AP-Owned,CloudLab Works,YES,Use the SBOM in your own vulnerability management. +STA-09.2,STA-09,"Supply Chain Management, Transparency, and Accountability",Service Bill of Material (BOM),AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +STA-10.1,STA-10,"Supply Chain Management, Transparency, and Accountability",Supply Chain Risk Management,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +STA-11.1,STA-11,"Supply Chain Management, Transparency, and Accountability",Primary Service and Contractual Agreement,ND,Not applicable (no owner),NA,Set your own agreements with any provider you use. +STA-12.1,STA-12,"Supply Chain Management, Transparency, and Accountability",Supply Chain Agreement Review,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +STA-13.1,STA-13,"Supply Chain Management, Transparency, and Accountability",Supply Chain Compliance Assessment,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +STA-14.1,STA-14,"Supply Chain Management, Transparency, and Accountability",Supply Chain Service Agreement Compliance,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +STA-15.1,STA-15,"Supply Chain Management, Transparency, and Accountability",Supply Chain Governance Review,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +STA-16.1,STA-16,"Supply Chain Management, Transparency, and Accountability",Supply Chain Data Security Assessment,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-01.1,TVM-01,Threat & Vulnerability Management,Threat and Vulnerability Management Policy and Procedures,AP-Owned,CloudLab Works,YES,Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +TVM-01.2,TVM-01,Threat & Vulnerability Management,Threat and Vulnerability Management Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-02.1,TVM-02,Threat & Vulnerability Management,Malware and Malicious Instructions Protection Policy and Procedures,AP-Owned,CloudLab Works,YES,"Treat tool output as data, not instructions, in your agent. Tell your agent that oak-events tool output is untrusted data." +TVM-02.2,TVM-02,Threat & Vulnerability Management,Malware and Malicious Instructions Protection Policy and Procedures,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-03.1,TVM-03,Threat & Vulnerability Management,Vulnerability Identification,AP-Owned,CloudLab Works,YES,Scan your own host and installed packages. +TVM-04.1,TVM-04,Threat & Vulnerability Management,Threat Analysis and Modelling,AP-Owned,CloudLab Works,YES,"Threat-model your deployment (camera placement, network, agent)." +TVM-04.2,TVM-04,Threat & Vulnerability Management,Threat Analysis and Modelling,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-05.1,TVM-05,Threat & Vulnerability Management,Detection Updates,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-06.1,TVM-06,Threat & Vulnerability Management,External Library Vulnerabilities,AP-Owned,CloudLab Works,YES,Update your installed copy when a release updates dependencies. +TVM-07.1,TVM-07,Threat & Vulnerability Management,Penetration Testing,AP-Owned,CloudLab Works,NO,Penetration-test your own deployment if required. +TVM-08.1,TVM-08,Threat & Vulnerability Management,Vulnerability Remediation Schedule,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-09.1,TVM-09,Threat & Vulnerability Management,Vulnerability Prioritization,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-10.1,TVM-10,Threat & Vulnerability Management,Threat Response,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-11.1,TVM-11,Threat & Vulnerability Management,Vulnerability Management Reporting,AP-Owned,CloudLab Works,YES,Report suspected vulnerabilities privately as described in SECURITY.md (https://github.com/cloudlabworks/oak-events/blob/1732fbb/SECURITY.md); watch releases and CHANGELOG.md for fixes and upgrade promptly. +TVM-12.1,TVM-12,Threat & Vulnerability Management,Vulnerability Management Metrics,AP-Owned,CloudLab Works,YES,No customer action for this control; it concerns CloudLab Works' own practices. +TVM-13.1,TVM-13,Threat & Vulnerability Management,Guardrails,Shared AP-AIC,Shared: CloudLab Works and customer,YES,Add guardrails in your agent runtime for actions taken on events. +TVM-13.2,TVM-13,Threat & Vulnerability Management,Guardrails,AP-Owned,CloudLab Works,NO,No customer action for this control; it concerns CloudLab Works' own practices. +UEM-01.1,UEM-01,Universal Endpoint Management,Endpoint Devices Policy and Procedures,AP-Owned,CloudLab Works,YES,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-01.2,UEM-01,Universal Endpoint Management,Endpoint Devices Policy and Procedures,AP-Owned,CloudLab Works,YES,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-02.1,UEM-02,Universal Endpoint Management,Application and Service Approval,AP-Owned,CloudLab Works,YES,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-03.1,UEM-03,Universal Endpoint Management,Compatibility,Shared AP-AIC,Shared: CloudLab Works and customer,YES,"Check your OS, Python and camera against the supported list." +UEM-04.1,UEM-04,Universal Endpoint Management,Endpoint Inventory,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-05.1,UEM-05,Universal Endpoint Management,Endpoint Management,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-06.1,UEM-06,Universal Endpoint Management,Automatic Lock Screen,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-07.1,UEM-07,Universal Endpoint Management,Operating Systems,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-08.1,UEM-08,Universal Endpoint Management,Storage Encryption,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-09.1,UEM-09,Universal Endpoint Management,Anti-Malware Detection and Prevention,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-10.1,UEM-10,Universal Endpoint Management,Software Firewall,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-11.1,UEM-11,Universal Endpoint Management,Data Loss Prevention,ND,Not applicable (no owner),NA,Apply DLP to hosts holding event files if your risk assessment requires it. +UEM-12.1,UEM-12,Universal Endpoint Management,Remote Locate,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-13.1,UEM-13,Universal Endpoint Management,Remote Wipe,AP-Owned,CloudLab Works,NO,"Manage your own hosts that store event files (encryption, patching, lock screen)." +UEM-14.1,UEM-14,Universal Endpoint Management,Third-Party Endpoint Security Posture,ND,Not applicable (no owner),NA,None. diff --git a/examples/hardening/oak-events-mcp-sandbox b/examples/hardening/oak-events-mcp-sandbox new file mode 100644 index 0000000..78b4bd9 --- /dev/null +++ b/examples/hardening/oak-events-mcp-sandbox @@ -0,0 +1,42 @@ +#!/bin/sh +# /usr/local/bin/oak-events-mcp-sandbox +# Start the oak-events MCP server as the oak-events user in a transient, sandboxed +# systemd unit. stdin and stdout pass through (--pipe), so an MCP client can use +# "sudo -n /usr/local/bin/oak-events-mcp-sandbox" as its server command. +# Takes no arguments on purpose: the sudoers rule allows exactly this command. +# See docs/HARDENING.md in oak-events. +set -eu +exec /usr/bin/systemd-run --quiet --pipe --wait --collect \ + --uid=oak-events --gid=oak-events \ + -p UMask=0077 \ + -p LogsDirectory=oak-events \ + -p LogsDirectoryMode=0700 \ + -p ProtectSystem=strict \ + -p ReadOnlyPaths=/var/lib/oak-events \ + -p ProtectHome=yes \ + -p PrivateTmp=yes \ + -p PrivateDevices=yes \ + -p PrivateNetwork=yes \ + -p IPAddressDeny=any \ + -p RestrictAddressFamilies=AF_UNIX \ + -p NoNewPrivileges=yes \ + -p CapabilityBoundingSet= \ + -p RestrictSUIDSGID=yes \ + -p LockPersonality=yes \ + -p RestrictRealtime=yes \ + -p RestrictNamespaces=yes \ + -p ProtectKernelTunables=yes \ + -p ProtectKernelModules=yes \ + -p ProtectKernelLogs=yes \ + -p ProtectControlGroups=yes \ + -p ProtectClock=yes \ + -p ProtectHostname=yes \ + -p ProtectProc=invisible \ + -p ProcSubset=pid \ + -p SystemCallArchitectures=native \ + -p SystemCallFilter=@system-service \ + -p MemoryMax=512M \ + -p TasksMax=32 \ + /opt/oak-events/venv/bin/oak-events mcp \ + --events-dir /var/lib/oak-events/events \ + --access-log /var/log/oak-events/mcp-access.jsonl diff --git a/examples/hardening/oak-events-run.service b/examples/hardening/oak-events-run.service new file mode 100644 index 0000000..3d04e98 --- /dev/null +++ b/examples/hardening/oak-events-run.service @@ -0,0 +1,60 @@ +# /etc/systemd/system/oak-events-run.service +# oak-events camera runner as a dedicated, sandboxed system user. +# See docs/HARDENING.md in oak-events. Replace the model file name and hash with yours. + +[Unit] +Description=oak-events camera runner (privacy-first events, no pictures) +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +User=oak-events +Group=oak-events +ExecStart=/opt/oak-events/venv/bin/oak-events run --quiet \ + --model /etc/oak-events/yolov6n-r2-288x512.rvc2.tar.xz \ + --model-sha256 8372e2dec2d5e192e6ad9555b9412c3e31101b06e68121cfd08e92d4a4641122 \ + --out-dir /var/lib/oak-events/events +Restart=always +RestartSec=10 + +# Files: only the events directory is writable; everything else is read-only or hidden. +UMask=0077 +StateDirectory=oak-events oak-events/events +StateDirectoryMode=0700 +ProtectSystem=strict +ProtectHome=yes +PrivateTmp=yes + +# Privileges +NoNewPrivileges=yes +CapabilityBoundingSet= +AmbientCapabilities= +RestrictSUIDSGID=yes +LockPersonality=yes +RestrictRealtime=yes +RestrictNamespaces=yes + +# Kernel and system interfaces +ProtectKernelTunables=yes +ProtectKernelModules=yes +ProtectKernelLogs=yes +ProtectControlGroups=yes +ProtectClock=yes +ProtectHostname=yes +ProtectProc=invisible +ProcSubset=pid +SystemCallArchitectures=native +SystemCallFilter=@system-service +SystemCallErrorNumber=EPERM + +# Network: a PoE camera needs IPv4 (discovery uses UDP broadcast). DepthAI also uses netlink. +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +# USB camera instead of PoE: replace the line above with the three lines below. +# PrivateNetwork=yes +# RestrictAddressFamilies=AF_UNIX AF_NETLINK +# DeviceAllow=char-usb_device rw +DevicePolicy=closed + +[Install] +WantedBy=multi-user.target diff --git a/examples/hardening/test/Dockerfile b/examples/hardening/test/Dockerfile new file mode 100644 index 0000000..effa617 --- /dev/null +++ b/examples/hardening/test/Dockerfile @@ -0,0 +1,22 @@ +# Test bed for docs/HARDENING.md: Debian 13 (trixie) with systemd as PID 1. +# Not a deployment image. Build context: this directory, with the oak-events wheel and +# the files under test copied in by test.sh. +FROM debian:trixie +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends systemd systemd-sysv dbus sudo \ + python3 python3-venv ca-certificates jq && rm -rf /var/lib/apt/lists/* +COPY oak_events-*.whl /tmp/ +RUN python3 -m venv /opt/oak-events/venv \ + && /opt/oak-events/venv/bin/pip install -q /tmp/oak_events-*.whl numpy 'mcp>=1.0' +COPY oak-events-run.service /etc/systemd/system/oak-events-run.service +COPY oak-events-mcp-sandbox /usr/local/bin/oak-events-mcp-sandbox +COPY in-container.sh /root/in-container.sh +COPY model.tar.xz /etc/oak-events/yolov6n-r2-288x512.rvc2.tar.xz +RUN chmod 0755 /usr/local/bin/oak-events-mcp-sandbox /root/in-container.sh \ + && useradd --system --home-dir /var/lib/oak-events --shell /usr/sbin/nologin oak-events \ + && useradd --create-home alice \ + && printf 'alice ALL=(root) NOPASSWD: /usr/local/bin/oak-events-mcp-sandbox\n' > /etc/sudoers.d/oak-events-mcp \ + && chmod 0440 /etc/sudoers.d/oak-events-mcp \ + && chmod 0644 /etc/oak-events/yolov6n-r2-288x512.rvc2.tar.xz +STOPSIGNAL SIGRTMIN+3 +CMD ["/lib/systemd/systemd"] diff --git a/examples/hardening/test/in-container.sh b/examples/hardening/test/in-container.sh new file mode 100644 index 0000000..cbb1b29 --- /dev/null +++ b/examples/hardening/test/in-container.sh @@ -0,0 +1,84 @@ +#!/bin/bash +# Runs inside the test container (systemd is PID 1). Prints PASS/FAIL lines. +set -u +fail=0 +pass() { echo "PASS: $*"; } +bad() { echo "FAIL: $*"; fail=1; } +EV=/var/lib/oak-events/events + +echo "== systemd $(systemctl --version | head -1)" +systemd-analyze verify /etc/systemd/system/oak-events-run.service 2>&1 | grep -v 'Unit configured to use KillMode' || true + +echo "== 1. runner service: hash check passes, events written as oak-events, mode 0600" +systemctl daemon-reload +systemctl start oak-events-run.service +sleep 4 +systemctl stop oak-events-run.service +f=$(ls "$EV"/*.jsonl 2>/dev/null | head -1) +if [ -n "$f" ] && grep -q '"kind": "privacy"' "$f"; then pass "privacy event written to $f"; else bad "no privacy event"; fi +grep -q '"private": true' "$f" && pass "privacy state private=true" || bad "private not true" +[ "$(stat -c '%U %a' "$f")" = "oak-events 600" ] && pass "event file owner oak-events, mode 600" || bad "file owner/mode $(stat -c '%U %a' "$f")" +[ "$(stat -c '%U %a' "$EV")" = "oak-events 700" ] && pass "events dir owner oak-events, mode 700" || bad "dir $(stat -c '%U %a' "$EV")" +journalctl -u oak-events-run.service --no-pager -o cat | grep -q 'depthai is not installed' \ + && pass "runner got past the model hash check (stopped at missing depthai, expected in this test bed)" \ + || bad "runner did not reach depthai import" + +echo "== 2. runner sandbox probe: same [Service] sandbox options, as oak-events" +props=() +while IFS= read -r line; do props+=(-p "$line"); done < <( + awk '/^\[Service\]/{s=1;next} /^\[/{s=0} s && /^[A-Z][A-Za-z]*=/' /etc/systemd/system/oak-events-run.service | + grep -vE '^(ExecStart|Type|Restart|RestartSec|User|Group)=') +probe='touch /var/lib/oak-events/events/probe && echo W_EVENTS_OK; touch /etc/probe 2>/dev/null && echo W_ETC_OK; ls /home/alice >/dev/null 2>&1 && echo R_HOME_OK; touch /tmp/probe && echo W_TMP_OK; /opt/oak-events/venv/bin/python -c "import os; os.setuid(0)" 2>/dev/null && echo SETUID_OK; true' +out=$(systemd-run --quiet --pipe --wait --collect --uid=oak-events --gid=oak-events "${props[@]}" /bin/sh -c "$probe" 2>&1) +echo "$out" | grep -q W_EVENTS_OK && pass "runner can write the events directory" || bad "runner cannot write events: $out" +echo "$out" | grep -q W_ETC_OK && bad "runner can write /etc" || pass "runner cannot write /etc" +echo "$out" | grep -q R_HOME_OK && bad "runner can read /home" || pass "runner cannot read /home" +echo "$out" | grep -q SETUID_OK && bad "runner can setuid(0)" || pass "runner cannot gain root" +rm -f /var/lib/oak-events/events/probe + +echo "== 3. runner refuses a wrong model hash" +cp /etc/systemd/system/oak-events-run.service /tmp/bad.service +sed -i 's/--model-sha256 [0-9a-f]*/--model-sha256 0000000000000000000000000000000000000000000000000000000000000000/' /tmp/bad.service +cp /tmp/bad.service /etc/systemd/system/oak-events-badhash.service +systemctl daemon-reload; systemctl start oak-events-badhash.service; sleep 3; systemctl stop oak-events-badhash.service +grep -h 'SHA-256 mismatch' "$EV"/*.jsonl >/dev/null && pass "mismatch event written, camera not opened" || bad "no mismatch event" +rm /etc/systemd/system/oak-events-badhash.service; systemctl daemon-reload + +echo "== 4. MCP server through the sandbox wrapper, started by desktop user alice with sudo" +req='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"0"}}} +{"jsonrpc":"2.0","method":"notifications/initialized"} +{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"camera_health","arguments":{}}} +{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"recent_events","arguments":{"limit":5}}}' +resp=$( (printf '%s\n' "$req"; sleep 4) | timeout 30 sudo -u alice sudo -n /usr/local/bin/oak-events-mcp-sandbox 2>&1) +echo "$resp" | grep -q '\\"private\\": true' && pass "camera_health over MCP reports private=true" || bad "MCP response: $resp" +echo "$resp" | grep -q '"id":3' && pass "recent_events answered" || bad "no recent_events answer" +log=/var/log/oak-events/mcp-access.jsonl +[ -f "$log" ] && [ "$(wc -l < "$log")" -ge 2 ] && pass "access log has $(wc -l < "$log") lines" || bad "access log missing" +[ "$(stat -c '%U %a' "$log")" = "oak-events 600" ] && pass "access log owner oak-events, mode 600" || bad "log $(stat -c '%U %a' "$log")" +jq -e 'select(.tool=="recent_events") | .args.limit == 1 and .result_count >= 1' "$log" >/dev/null \ + && pass "access log: argument size and result count, no values" || bad "access log content: $(cat "$log")" +sudo -u alice cat "$EV"/*.jsonl >/dev/null 2>&1 && bad "alice can read event files directly" || pass "alice cannot read event files directly" + +echo "== 5. MCP sandbox probe: same properties as the wrapper" +sed -n '1,/oak-events\/venv\/bin\/oak-events mcp/p' /usr/local/bin/oak-events-mcp-sandbox | sed '$d' > /tmp/probe.sh +probe2='touch /var/lib/oak-events/events/x 2>/dev/null && echo W_EVENTS_OK; cat /var/lib/oak-events/events/*.jsonl >/dev/null && echo R_EVENTS_OK; touch /var/log/oak-events/x && echo W_LOG_OK; ls /home/alice >/dev/null 2>&1 && echo R_HOME_OK; /opt/oak-events/venv/bin/python -c "import socket; s=socket.socket(); s.settimeout(2); s.connect((\"1.1.1.1\", 443))" 2>/dev/null && echo NET_OK; ls /dev | wc -l | sed "s/^/DEVCOUNT=/"; true' +printf ' /bin/sh -c %q\n' "$probe2" >> /tmp/probe.sh +out=$(bash /tmp/probe.sh 2>&1) +echo "$out" | grep -q R_EVENTS_OK && pass "MCP sandbox can read events" || bad "cannot read events: $out" +echo "$out" | grep -q W_EVENTS_OK && bad "MCP sandbox can write events" || pass "MCP sandbox cannot write the events directory (read-only)" +echo "$out" | grep -q W_LOG_OK && pass "MCP sandbox can write its access log directory" || bad "cannot write log dir" +echo "$out" | grep -q R_HOME_OK && bad "MCP sandbox can read /home" || pass "MCP sandbox cannot read /home" +echo "$out" | grep -q NET_OK && bad "MCP sandbox has network" || pass "MCP sandbox has no network" +if runuser -u oak-events -- /opt/oak-events/venv/bin/python -c 'import socket; s=socket.socket(); s.settimeout(3); s.connect(("1.1.1.1", 443))' 2>/dev/null; then + pass "control: the same connect works outside the sandbox, so the network result above is the sandbox's doing" +else + echo "NOTE: control connect failed outside the sandbox too; the network result above proves nothing in this test bed" +fi +echo "$out" | grep DEVCOUNT +rm -f /var/log/oak-events/x + +echo "== 6. exposure scores (systemd-analyze security; lower is better)" +systemd-analyze security oak-events-run.service --no-pager 2>/dev/null | tail -1 + +echo "== RESULT: $([ $fail = 0 ] && echo ALL PASS || echo FAILURES)" +exit $fail diff --git a/examples/hardening/test/test-run-20261102.log b/examples/hardening/test/test-run-20261102.log new file mode 100644 index 0000000..f565282 --- /dev/null +++ b/examples/hardening/test/test-run-20261102.log @@ -0,0 +1,32 @@ +== systemd systemd 257 (257.13-1~deb13u1) +== 1. runner service: hash check passes, events written as oak-events, mode 0600 +PASS: privacy event written to /var/lib/oak-events/events/2026-11-02.jsonl +PASS: privacy state private=true +PASS: event file owner oak-events, mode 600 +PASS: events dir owner oak-events, mode 700 +PASS: runner got past the model hash check (stopped at missing depthai, expected in this test bed) +== 2. runner sandbox probe: same [Service] sandbox options, as oak-events +PASS: runner can write the events directory +PASS: runner cannot write /etc +PASS: runner cannot read /home +PASS: runner cannot gain root +== 3. runner refuses a wrong model hash +PASS: mismatch event written, camera not opened +== 4. MCP server through the sandbox wrapper, started by desktop user alice with sudo +PASS: camera_health over MCP reports private=true +PASS: recent_events answered +PASS: access log has 2 lines +PASS: access log owner oak-events, mode 600 +PASS: access log: argument size and result count, no values +PASS: alice cannot read event files directly +== 5. MCP sandbox probe: same properties as the wrapper +PASS: MCP sandbox can read events +PASS: MCP sandbox cannot write the events directory (read-only) +PASS: MCP sandbox can write its access log directory +PASS: MCP sandbox cannot read /home +PASS: MCP sandbox has no network +PASS: control: the same connect works outside the sandbox, so the network result above is the sandbox's doing +DEVCOUNT=17 +== 6. exposure scores (systemd-analyze security; lower is better) +→ Overall exposure level for oak-events-run.service: 1.7 OK :-) +== RESULT: ALL PASS diff --git a/examples/hardening/test/test.sh b/examples/hardening/test/test.sh new file mode 100644 index 0000000..8ab13e1 --- /dev/null +++ b/examples/hardening/test/test.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Build the test bed and run in-container.sh under systemd. Usage: +# test.sh WHEEL MODEL_ARCHIVE +# WHEEL: an oak-events wheel built from the csa/logging-integrity branch (needs --model-sha256 +# and --access-log). MODEL_ARCHIVE: the reference archive from docs/MODEL_CARD.md. +set -euo pipefail +here=$(cd "$(dirname "$0")" && pwd) +ctx=$(mktemp -d) +cp "$here/Dockerfile" "$here/in-container.sh" "$here/../oak-events-run.service" "$here/../oak-events-mcp-sandbox" "$ctx/" +cp "$1" "$ctx/" +cp "$2" "$ctx/model.tar.xz" +docker build -q -t oak-events-hardening-test "$ctx" >/dev/null +cid=$(docker run -d --privileged --cgroupns=host -v /sys/fs/cgroup:/sys/fs/cgroup:rw --tmpfs /run --tmpfs /run/lock \ + oak-events-hardening-test) +trap 'docker rm -f "$cid" >/dev/null; rm -rf "$ctx"' EXIT +for _ in $(seq 1 30); do + state=$(docker exec "$cid" systemctl is-system-running 2>/dev/null || true) + case "$state" in running|degraded) break ;; esac + sleep 1 +done +docker exec "$cid" /root/in-container.sh