carlos / platform Public

review: scoped check passed, aws-followups-1143

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 749b27a4bc8e1dd2eb68ef7202c388d89cf76640 parent ee93b00
1 file changed, +48 −0
  • docs/superpowers/reviews/CHECK-aws-followups-1143-R1-fix.md +48 −0
diff --git a/docs/superpowers/reviews/CHECK-aws-followups-1143-R1-fix.md b/docs/superpowers/reviews/CHECK-aws-followups-1143-R1-fix.md
new file mode 100644
index 000000000..0729cb891
--- /dev/null
+++ b/docs/superpowers/reviews/CHECK-aws-followups-1143-R1-fix.md
@@ -0,0 +1,48 @@
+Reviewed `ee93b00131bb59ca98a3ee6e58a801b7bee3ee45`, limited to fix `e140ec55` and its census card. This is the required scoped check after round 1, not another review round.
+
+**No P1 or P2 findings.**
+
+1. **Round-1 P2s — OK, all resolved.**
+
+ - Container credential exchanges now receive the bounded transport; owned loads refuse login-session credentials.
+ - The fence writer’s STS and S3 clients receive the bounded transport. Non-group host-env now loads through rootaws. Both obsolete allowlist entries are removed.
+ - Credential tests explicitly honor configured endpoints and enforce loopback-only connections without a proxy.
+
+2. **Credential bounds and login-session refusal — OK.**
+
+ [stall.go:124](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/internal/rootaws/stall.go:124) installs credential hooks only when the loading client remains rootaws’s own. The endpoint hook at line 186 supplies a bounded client when none exists, then runs the caller’s hook, preserving its override.
+
+ [boundConfig:310](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/internal/rootaws/stall.go:310) detects a cached login-session provider and returns `errLoginSession` before credential retrieval. The pinned SDK constructs the provider during loading but reads its token and performs refresh during `Retrieve`. It already rejects login-session source profiles for assumed roles.
+
+ This deliberately removes a previously available credential mode for non-root callers. Real affected entry points include `system host-env seed` and direct S3-backed CLI operations through [openStore:2347](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/cli.go:2347), **if their selected profile uses `login_session`**. I found no configured or documented platform dependency on that mode. Root excludes shared profiles already; grouprollaws already rejects login-session profiles. SSO credentials remain supported. Repository inspection cannot establish whether an individual operator uses this profile type.
+
+3. **Host-env root read and census classification — OK.**
+
+ [awsssm.go:58](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/internal/hostenv/awsssm.go:58) changes credential selection as well as timeouts: non-group root invocations now consult `/etc/carlos/credentials` when complete environment keys are absent. A valid file takes precedence over IMDS; an unsafe file causes credential retrieval to fail instead of falling through.
+
+ The path is fixed in [config.go:17](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/internal/rootaws/config.go:17). Callers cannot select it through host-env flags or shared-profile variables. The existing reader rejects symlinks and special files, requires a single-link root-owned regular file without group/other write permission, and parses only literal credential keys. These checks prevent tenant-, app-, or box-agent-authored credentials from being accepted.
+
+ **Envelope-only classification is correct.** `openSSMParamsMode` adds no direct census read site; it reaches an existing reader whose implementation and disposition are unchanged. The scanner explicitly uses envelopes to cover wrapper and indirect-call changes. The new reachability is assessed and approved here; no additional unit claim is owed.
+
+4. **OpenRootFenceStore — OK.**
+
+ [writer.go:31](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/internal/hostfence/writer.go:31) retains the root check, protected credential-file open, 0400/0600 checks, installation-receipt requirement for 0600, credential decoding and bucket validation.
+
+ The literal config now supplies `rootaws.BoundedHTTPClient()` before constructing STS and S3. Credential selection remains exclusively the dedicated fence identity. No default credential loader, environment credentials, shared profiles or IMDS path is introduced. The transport’s bounds remain effective when the credential cache suppresses caller cancellation.
+
+5. **Test isolation and `withoutWriterTo` — OK for this scope.**
+
+ [localStallLoad:228](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/internal/rootaws/stall_test.go:228) disables proxies and rejects non-loopback destination addresses after resolution, before connection. The control survives the SDK’s dialer copies. Credential fixtures disable endpoint ignoring, isolate shared files and clear competing credential sources. I found no remaining HTTP route to real AWS in these tests.
+
+ [withoutWriterTo:137](/home/paulca/amadan.net/carlos/platform-aws-followups-1143/internal/rootaws/stall_credentials_test.go:137) does suppress a real SDK/net/http request-body close race that could also occur in production. It does not bypass the response transport or timeout implementation under test: it hides an optional request-stream optimization so an unrelated early connection failure cannot prevent reaching the intended stalled-response condition. These tests establish timeout behavior; they do not establish freedom from that dependency race.
+
+6. **Census verdicts — approve all four.**
+
+ - **`OpenRootFenceStore`: approve.** Existing authority disposition and protected-installation basis remain valid.
+ - **`internal/hostfence`: approve.** Dedicated credential authority is unchanged.
+ - **`internal/hostenv`: approve.** The additional root credential read uses the existing protected, fixed-path reader described above.
+ - **`internal/rootaws`: approve.** Changes bound existing exchanges or refuse unsupported credentials; they introduce no new root-selected input and weaken no root validation.
+
+`git diff --check` passed. Targeted tests could not start: Go attempted to update `go.mod`, which the read-only sandbox refused. No runtime or census-test pass is claimed. No files were changed, reviewers spawned, or full suites run.
+
+CHECK PASSED
\ No newline at end of file