Skip to content

Commit 8a6806b

Browse files
committed
Document guarded local-agent quarantine
1 parent 7d96db4 commit 8a6806b

1 file changed

Lines changed: 40 additions & 4 deletions

File tree

docs/local-agent-runtime.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Canonical policy lives in `SourceOS-Linux/sourceos-spec/specs/local-agent-runtime.md`.
66

7-
This repository owns the CLI implementation surface: preflight, doctor, status, logs, and guarded mutation plans for install/start/stop/restart/quarantine/uninstall.
7+
This repository owns the CLI implementation surface: preflight, doctor, status, logs, guarded quarantine, and guarded mutation plans for install/start/stop/restart/uninstall.
88

99
## Why this exists
1010

@@ -23,6 +23,7 @@ python3 bin/sourceos-agent doctor node-commander
2323
python3 bin/sourceos-agent status node-commander
2424
python3 bin/sourceos-agent logs node-commander
2525
python3 bin/sourceos-agent quarantine node-commander
26+
python3 bin/sourceos-agent quarantine node-commander --execute --policy-ok
2627
python3 bin/sourceos-agent install node-commander
2728
python3 bin/sourceos-agent start node-commander
2829
python3 bin/sourceos-agent stop node-commander
@@ -54,13 +55,48 @@ Mutation commands are guarded. Without both flags, they print a plan only:
5455
python3 bin/sourceos-agent quarantine node-commander
5556
```
5657

57-
To permit a future guarded mutation implementation:
58+
Guarded quarantine is implemented:
5859

5960
```bash
6061
python3 bin/sourceos-agent quarantine node-commander --execute --policy-ok
6162
```
6263

63-
The scaffold currently refuses partial mutation even with both flags until the full quarantine/install/start/stop implementations are added.
64+
By default, quarantine writes to:
65+
66+
```text
67+
~/Desktop/sourceos-quarantine/<agent>-<timestamp>/
68+
```
69+
70+
Override the target directory with:
71+
72+
```bash
73+
python3 bin/sourceos-agent quarantine node-commander --execute --policy-ok --output-dir ./quarantine
74+
```
75+
76+
Other mutating verbs still refuse partial mutation even with both flags until their full implementations are added.
77+
78+
## Quarantine evidence
79+
80+
Guarded quarantine captures:
81+
82+
- `checks.json` with current doctor/preflight check results;
83+
- `launchd-print.json` on macOS when launchctl is available;
84+
- `launchd-disabled.json` on macOS when launchctl is available;
85+
- `launchd-bootout.json` and `launchd-disable.json` command results;
86+
- `podman-connections.json`;
87+
- `podman-machines.json`;
88+
- `podman-info.json`;
89+
- `podman-ps.json`;
90+
- `image-inspect.json`;
91+
- `container-inspect.json`;
92+
- redacted auth files for runtime, Docker, and containers auth;
93+
- app logs and related agent logs;
94+
- moved writable user plist as `<plist>.disabled`;
95+
- moved legacy system plist as `<plist>.disabled` when permissions allow;
96+
- `manifest.json`;
97+
- `remediation.md`.
98+
99+
System-wide files such as `/Library/LaunchAgents/...` may require elevated privileges. When the CLI cannot move them, it records a warning in `manifest.json` and leaves an explicit remediation path rather than silently failing.
64100

65101
## Checks performed
66102

@@ -116,4 +152,4 @@ Future mutating implementations must:
116152
make validate
117153
```
118154

119-
This runs the unittest suite, including the local-agent scaffold tests.
155+
This runs the unittest suite, including the local-agent tests.

0 commit comments

Comments
 (0)