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
trusted-workload-launcher: default to repo-owned tee-launch.sh
Make INSTALL_CMD and RUN_CMD optional and add a recommended default mode:
when neither is set the launcher runs 'bash tee-launch.sh' from the
pinned commit (under REPO_SUBDIR if set, else repo root). The script's
bytes are covered by source provenance of COMMIT_SHA, so the trust-
bearing config in default mode collapses to REPO_URL + COMMIT_SHA. The
existing RUN_CMD path is preserved as an advanced mode for repos that
cannot host their own entry script; INSTALL_CMD remains optional and
must accompany RUN_CMD.
Aligned changes:
- bin/trusted-workload-launcher: validate INSTALL_CMD requires RUN_CMD,
drop "INSTALL_CMD must be set" and "RUN_CMD required" gates, add the
default-mode branch that requires ./tee-launch.sh in target. No exec
bit required (we invoke 'bash tee-launch.sh'). Refreshed top comment
and parse_config comment to reflect the new model.
- tests/run-tests.sh: extended fixture repo with c3 (adds
sub/tee-launch.sh, intentionally non-executable), added
default_mode_happy, default_mode_missing_script_fails, and
install_cmd_without_run_cmd_fails.
- README.md, examples/web-app.conf: lead with default mode; advanced
mode explicitly scoped to "workload repo cannot host its own entry
script"; clarified that no executable bit is required.
- VERIFY.md: quick path shortened to 4 steps for default mode, with an
explicit one-line note that advanced mode adds the command audit;
step 4 covers tee-launch.sh under source provenance and step 5 shows
the default-mode log lines. Updated the recommended-path Mermaid
diagram. Smoke transcript annotated that the prior production run
used advanced mode because Hello-World ships no tee-launch.sh, and
that the compose-hash binding it demonstrates is identical.
- Root README: Details-table description compressed to a true one-liner
("Run a pinned Git commit in a TEE.").
| [trusted-workload-launcher](./trusted-workload-launcher) | Auditable launcher that pins a workload to a full upstream Git commit SHA (no auto-update). |
234
+
| [trusted-workload-launcher](./trusted-workload-launcher) | Run a pinned Git commit in a TEE. |
The launcher is a single bash script (`bin/trusted-workload-launcher`). It
106
-
depends only on `bash`, `git`, and POSIX coreutils. It is **not** sourced and
107
-
**does not source** the config; the only values executed as shell are
108
-
`INSTALL_CMD` and `RUN_CMD`, which are documented to be intentionally
109
-
executed.
115
+
depends only on `bash`, `git`, and POSIX coreutils. It is **not** sourced
116
+
and **does not source** the config. In default mode, the only bytes it
117
+
executes are those of the workload repo's `tee-launch.sh` at the pinned
118
+
`COMMIT_SHA`. In advanced mode (see below), it additionally executes the
119
+
configured `INSTALL_CMD` / `RUN_CMD` via `bash -c`.
110
120
111
121
## Config contract
112
122
113
123
An env-file with `KEY=VALUE` lines. Comments start with `#`. Surrounding
114
124
matching single or double quotes are stripped (one layer). Unknown keys are
115
-
rejected. The config is parsed, not sourced — no command substitution and no
116
-
shell expansion in the parse step.
125
+
rejected. The config is parsed, not sourced — no command substitution and
126
+
no shell expansion in the parse step.
117
127
118
128
### Required
119
129
@@ -122,32 +132,39 @@ shell expansion in the parse step.
122
132
|`REPO_URL`| Git URL of the upstream workload repo (`https://…` or `git@…`). |
123
133
|`COMMIT_SHA`|**Full** 40-hex SHA-1 or 64-hex SHA-256. Branches, tags, and short SHAs are rejected. |
124
134
|`WORK_DIR`| Local directory used as the checkout. Created if missing. Reused on subsequent runs as long as the existing clone's `origin` URL matches `REPO_URL`. |
125
-
|`INSTALL_CMD`| Shell command run inside the checkout (in `REPO_SUBDIR` if set). Pass `INSTALL_CMD=` to explicitly skip the install step. The key must still be present. |
126
-
|`RUN_CMD`| Shell command `exec`d after the install step. Because `exec` is used, signals reach the child program directly. |
127
135
128
136
### Optional
129
137
130
138
| Key | Meaning |
131
139
| --- | --- |
132
-
|`REPO_SUBDIR`| Relative directory inside the repo to `cd` into before `INSTALL_CMD` and `RUN_CMD`. Must not be absolute and must not contain `..`. |
133
-
|`CHILD_ENV_FILE`| Path to a separate env file. Each `KEY=VALUE` line is `export`ed into the environment seen by `INSTALL_CMD` and `RUN_CMD`. The file is parsed line-by-line just like the main config (not sourced). |
134
-
135
-
### Multi-line install or run logic
136
-
137
-
`INSTALL_CMD` and `RUN_CMD` are single-line shell strings — the config is
138
-
line-oriented and the launcher does not implement multi-line value parsing.
139
-
This is intentional: a config that "almost" parses a multi-line script is a
140
-
trust hazard. If you need more than one command, put a script in the
141
-
workload repo at the pinned commit (e.g. `scripts/install.sh`,
142
-
`scripts/run.sh`) and call it:
143
-
144
-
```
145
-
INSTALL_CMD=./scripts/install.sh
146
-
RUN_CMD=./scripts/run.sh
147
-
```
148
-
149
-
The script then lives at the same pinned `COMMIT_SHA` as the workload, so
150
-
its bytes are covered by the same audit.
140
+
|`REPO_SUBDIR`| Relative directory inside the repo to `cd` into before running the entry point or `RUN_CMD`. Must not be absolute and must not contain `..`. |
141
+
|`CHILD_ENV_FILE`| Path to a separate env file. Each `KEY=VALUE` line is `export`ed into the environment seen by `tee-launch.sh` / `INSTALL_CMD` / `RUN_CMD`. The file is parsed line-by-line just like the main config (not sourced). |
142
+
|`RUN_CMD`|**Advanced.** Shell command to exec instead of the default `tee-launch.sh`. Use only when the workload repo cannot host its own entry script. |
143
+
|`INSTALL_CMD`|**Advanced.** Shell command to run before `RUN_CMD`. Only valid alongside `RUN_CMD`. |
144
+
145
+
### Default mode: `tee-launch.sh` in the workload repo
146
+
147
+
Recommended for every workload you control. The workload repo provides a
148
+
bash script at the fixed path `tee-launch.sh` (at the repo root, or at
149
+
`REPO_SUBDIR/tee-launch.sh` if `REPO_SUBDIR` is set). The launcher runs it
150
+
with `bash tee-launch.sh` after checkout — **no executable bit is
151
+
required**. All install/build/run logic lives in that script; the launcher
152
+
config carries only `REPO_URL` + `COMMIT_SHA` (+ local `WORK_DIR`).
153
+
154
+
Because the script's bytes are pinned by `COMMIT_SHA` and stored in the
155
+
workload repo, they are covered by source provenance of the pinned commit.
156
+
The verifier does not need to extract or audit any command string out of
0 commit comments