You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,15 @@ A specimen run spins up a fresh `PWRunner.xpc` process. The runner begins unsand
12
12
13
13
Collection is made possible by executing each probe as a small, explicit attempt and recording its direct rc plus errno/kr. For each step, the runner also runs `sandbox_check` using the same operation and filter so you can compare the kernel’s prediction to the attempted outcome. When the policy uses deterministic side effects like `send-signal`, the runner installs a handler and records before/after signal counts so denials can be observed without relying on logs. The runner emits a single structured JSON report for the specimen—run metadata and per-step results—and exits immediately after replying. The result is a per-step record that favors witnessed facts over inferred explanations.
14
14
15
+
## Instrumentation Port (Opt-in)
16
+
17
+
PolicyWitness includes an optional instrumentation port that exposes the runner’s hardened‑runtime entitlements in a controlled, auditable way: specimens may include an `instrumentation` object with ports executed `pre_sandbox` or `post_sandbox`, and results are reported in the run JSON without changing the run outcome; for quick experimentation you can inject instrumentation at runtime with `policy-witness run <request.json> --instrumentation <json|@path>` and keep existing callers unchanged.
18
+
19
+
-`dyld_env`: report expected `DYLD_*` env vars (`com.apple.security.cs.allow-dyld-environment-variables`); to set these, use an external runner with `policy-witness runner install --env KEY=VALUE`.
20
+
-`dylib_load`: load a dylib and optionally call a symbol (`com.apple.security.cs.disable-library-validation`).
21
+
-`debug_wait`: pause before sandbox apply for debugger attach (`com.apple.security.get-task-allow`).
22
+
-`execmem_probe`: attempt RWX `mmap` and report success/failure (`com.apple.security.cs.allow-unsigned-executable-memory`).
Copy file name to clipboardExpand all lines: SIGNING.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,17 @@ Preferred entrypoint:
9
9
```sh
10
10
make build
11
11
# or:
12
+
make build YOLO=1
13
+
# or:
12
14
IDENTITY='Developer ID Application: YOUR NAME (TEAMID)' ./build.sh
15
+
# or:
16
+
./build.sh --yolo
13
17
```
14
18
15
19
Key requirements:
16
20
17
-
-`IDENTITY` must be set to a **Developer ID Application** identity present in your keychain.
21
+
-`IDENTITY` must be set to a **Developer ID Application** identity present in your keychain, or
22
+
pass `--yolo` / `YOLO=1` to auto-select the first matching identity.
18
23
- Xcode Command Line Tools are required (`swiftc` is discovered via `xcrun`).
19
24
20
25
## What `build.sh` signs
@@ -38,5 +43,26 @@ These are derived from the **actual signed binaries on disk** (hashes and entitl
38
43
39
44
## Notarization (zip artifact)
40
45
41
-
The build also produces `PolicyWitness.zip` suitable for notarization submission. Notarytool invocation and stapling are intentionally not automated in this repo; keep those steps in your release checklist.
46
+
The build produces `PolicyWitness.zip` suitable for notarization submission. The
47
+
required order is: sign and zip, submit the zip to notarytool, then staple the
48
+
app bundle. This is what Gatekeeper expects.
49
+
50
+
Preferred entrypoint:
42
51
52
+
```sh
53
+
make notarize NOTARY_KEYCHAIN_PROFILE=dev-profile
54
+
# or:
55
+
NOTARY_KEYCHAIN_PROFILE=dev-profile make notarize
56
+
# or (auto-select codesign identity):
57
+
make notarize NOTARY_KEYCHAIN_PROFILE=dev-profile YOLO=1
0 commit comments