@@ -7,22 +7,24 @@ TEE is the one they audited.
77## Quick path (default mode, 4 steps)
88
99In default mode the workload repo provides its own ` tee-launch.sh ` at the
10- pinned commit, so the trust-bearing config is just ` REPO_URL + COMMIT_SHA `
11- and the install/run command chain disappears from the verifier's checklist.
10+ pinned commit, so the trust-bearing config is ` REPO_URL + COMMIT_SHA `
11+ (plus ` REPO_SUBDIR ` when used, since it selects which ` tee-launch.sh `
12+ runs) and the install/run command chain disappears from the verifier's
13+ checklist. ` WORK_DIR ` is local plumbing and is not trust-bearing.
1214The whole chain is:
1315
1416``` mermaid
1517flowchart LR
16- A[dstack attestation] --> B[launcher image digest<br/>+ REPO_URL<br/>+ COMMIT_SHA]
18+ A[dstack attestation] --> B[launcher image digest<br/>+ REPO_URL<br/>+ COMMIT_SHA<br/>+ REPO_SUBDIR if used ]
1719 B --> C[Sigstore attestation<br/>for launcher image digest<br/>= dstack-examples@ref/SHA]
18- B --> D[upstream repo at COMMIT_SHA<br/>incl. tee-launch.sh]
20+ B --> D[upstream repo at COMMIT_SHA<br/>incl. tee-launch.sh under REPO_SUBDIR ]
1921```
2022
21231 . ** Verify the dstack attestation.**
2224 ` phala cvms attestation --cvm-id <id> --json ` and feed the TDX quote
2325 into the dstack verifier (or trust the Phala Cloud verifier as a lite
2426 path). Read out the deployed launcher image digest and the attested
25- ` REPO_URL ` + ` COMMIT_SHA ` .
27+ ` REPO_URL ` + ` COMMIT_SHA ` (and ` REPO_SUBDIR ` if present) .
26282 . ** Verify launcher image provenance via Sigstore.** Confirm the image
2729 digest from step 1 carries a build-provenance attestation signed by
2830 the expected ` Dstack-TEE/dstack-examples ` GitHub Actions workflow at
@@ -40,10 +42,11 @@ upstream commit you audited, produced by an audited launcher.
4042
4143> ** Advanced mode adds one step.** If the launcher config sets ` RUN_CMD `
4244> (and optionally ` INSTALL_CMD ` ) instead of relying on ` tee-launch.sh ` ,
43- > those strings are trust-bearing config: read them from the attested
44- > compose in step 1 and audit them as if they were source code at the
45- > pinned commit. The simplification of the default mode is exactly that
46- > this extra step does not exist.
45+ > those strings are trust-bearing deployment config: read them from the
46+ > attested compose in step 1 and audit them like any other deployment
47+ > code — they are not part of the upstream repo at ` COMMIT_SHA ` and so
48+ > are not covered by its source provenance. The simplification of the
49+ > default mode is exactly that this extra step does not exist.
4750
4851The rest of this document explains how the chain works and what to do at
4952each step.
@@ -176,39 +179,49 @@ evidence of tampering.
176179### 4. Extract and audit the workload pin
177180
178181Parse the ` configs: ` content from step 2 and read ` REPO_URL ` and
179- ` COMMIT_SHA ` (plus optional ` REPO_SUBDIR ` / ` CHILD_ENV_FILE ` ). In default
180- mode there are no ` INSTALL_CMD ` / ` RUN_CMD ` strings to audit — the entry
181- point is the fixed-path ` tee-launch.sh ` in the workload repo, which is
182- covered by source provenance of the pinned commit. In advanced mode
183- (` RUN_CMD ` present) also read ` RUN_CMD ` and any ` INSTALL_CMD ` and treat
184- them as trust-bearing config.
182+ ` COMMIT_SHA ` (plus ` REPO_SUBDIR ` if present — it selects which
183+ ` tee-launch.sh ` is used). ` WORK_DIR ` is local plumbing only and is not
184+ part of the trust-bearing config. ` CHILD_ENV_FILE ` (and any env it
185+ supplies) does not change the bytes that run; if used, audit it as
186+ runtime deployment configuration, not as source.
187+
188+ In default mode there are no ` INSTALL_CMD ` / ` RUN_CMD ` strings to audit —
189+ the entry point is the fixed-path ` tee-launch.sh ` in the workload repo,
190+ which is covered by source provenance of the pinned commit. In advanced
191+ mode (` RUN_CMD ` present), also read ` RUN_CMD ` and any ` INSTALL_CMD ` and
192+ audit them as trust-bearing deployment config: they are not part of the
193+ upstream repo at ` COMMIT_SHA ` and so are not covered by its source
194+ provenance.
185195
186196``` sh
187197git -C < workload-checkout> rev-parse --verify < COMMIT_SHA>
188198```
189199
190200Confirm the upstream repo at ` REPO_URL ` contains ` COMMIT_SHA ` , and review
191- the workload at that commit, including ` tee-launch.sh ` in default mode.
192- This is the code that actually serves traffic.
201+ the workload at that commit, including ` <REPO_SUBDIR>/ tee-launch.sh` in
202+ default mode. This is the code that actually serves traffic.
193203
194204### 5. Spot-check runtime logs
195205
196206``` sh
197207phala logs --cvm-id < id> -n 200
198208```
199209
200- Default mode expected:
210+ Default-mode output should include these lines (the launcher logs ` mode `
211+ during config summary, then the checkout/verify lines, then the ` exec `
212+ line, so they appear in this order):
201213
202214```
215+ [trusted-workload-launcher] mode: default (workload repo tee-launch.sh)
203216[trusted-workload-launcher] checking out <COMMIT_SHA>
204217[trusted-workload-launcher] HEAD verified: <COMMIT_SHA>
205- [trusted-workload-launcher] mode: default (workload repo tee-launch.sh)
206218[trusted-workload-launcher] exec in <WORK_DIR>[/<REPO_SUBDIR>]: bash tee-launch.sh
207219```
208220
209- Advanced mode shows the explicit ` RUN_CMD ` instead of ` bash tee-launch.sh `
210- on the last line. Either way these lines show the launcher reached the
211- post-checkout state. They are not signed, so they don't replace
221+ Advanced mode logs ` mode: advanced (RUN_CMD) ` early on, and the last
222+ ` exec in ...: ` line shows the explicit ` RUN_CMD ` instead of
223+ ` bash tee-launch.sh ` . Either way these lines show the launcher reached
224+ the post-checkout state. They are not signed, so they don't replace
212225steps 1–4 — they corroborate.
213226
214227A workload that needs signed runtime evidence should produce its own
0 commit comments