Advanced payloads: Trace: see what your payload touches (1 of 5)
The advanced payloads series: trace: see what your payload touches.
The Tebako team
github.com/tamatebako|
Note
|
Post 1 of 5 in the series Advanced payloads. ● ○ ○ ○ ○
|
|
Note
|
Reference guide: Trace a packaged app. |
The advanced series picks up where the basics ended. Its first
subject is the question every packaged application eventually raises:
what does my payload actually touch on this machine? The tebako
trace commands answer it with evidence, not guesses.
Figure 1 — trace cover compares an outside capture with the inside stream; a payload check declares its own acceptance test (the publish post of the basics series).
Arm the stream
One environment variable records every decision the runtime makes — each mount, open, dlopen, exec, and jail verdict — as structured JSON, identically on Linux, macOS, and Windows:
$ TEBAKO_TRACE=/tmp/capture.jsonl ./myapp build
Tracing can never change how your application runs: if the capture channel fails, tebako prints a warning and nothing else happens.
Draft a policy from a real run
tebako trace run records a run and drafts the manifest fragment for
you — the host paths touched, the files read through raw descriptors,
the libraries loaded:
$ tebako trace run ./myapp --capture run.jsonl --out draft.yaml -- build
$ cat draft.yaml
needs:
host:
- path: $HOME/.fontist
access: rw
why: ""
The draft is commented YAML. You review it, adjust read and write, and
fill in every why — exactly the grant grammar the next post binds.
Name the failing step
When a run misbehaves, tebako trace explain replays the capture
through the chain of steps a file access passes — mount, manifest
read, resolve, materialize, OS bind — and names the first step that
failed. Exit 0 is a clean chain; exit 1 names the step.
What you can do now
You can see what a payload touches, draft its policy from a real run, and diagnose a failure to a named step. The next post binds that policy.
|
Note
|
Continue with part 2 of 5: Jails and profiles: decide what it may touch. |