carlos / platform Public

review: Astra code round 3 findings, not merged

One P1 in the session policy change: the deny families leave annotation
and encryption-update actions open to a direct session grant. Stopped
per the round budget; held for Paul.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev f01f0eb20d5884b0fdf6c16e8fc284e4a3555d9d parent bf8ecf2
1 file changed, +21 −0
  • docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-code-R3.md +21 −0

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-HBUVrS
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1

amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-code-R3.md b/docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-code-R3.md
new file mode 100644
index 000000000..a3a8275ef
--- /dev/null
+++ b/docs/superpowers/reviews/REVIEW-FINDINGS-store-write-credential-code-R3.md
@@ -0,0 +1,21 @@
+Reviewed `e0f582ef6e0d096bb383523a84aee170da85fa82`, limited to `bf7273de` and the brief’s specified tests and design section.
+
+1. **P1 — C: The deny families leave additional object operations open to direct session grants.**
+
+ **Evidence:** [writecred.go:263](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential/internal/objstore/writecred.go:263) covers neither `s3:ListObjectAnnotations`, `s3:PutObjectAnnotation`, nor `s3:UpdateObjectEncryption`. For an object inside the prefix, the `NotResource` deny at line 289 also does not apply.
+
+ These are documented in the locally cached, pinned AWS SDK. [ListObjectAnnotations:15](/home/paulca/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/s3@v1.105.0/api_op_ListObjectAnnotations.go:15) lists annotations using `s3:ListObjectAnnotations`; [PutObjectAnnotation:16](/home/paulca/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/s3@v1.105.0/api_op_PutObjectAnnotation.go:16) attaches payloads to objects or specific versions using `s3:PutObjectAnnotation`.
+
+ **Failure scenario:** A same-account bucket policy grants `s3:*` directly to the federated session—the scenario already modeled by the test. The credential can then list and write annotations within its prefix. Neither operation requires enabling ACLs or configuring replication. The writer’s and boundary’s implicit denials do not constrain that direct grant. Encryption updates are another uncovered permission, although completing that operation also requires KMS permissions.
+
+ **Test gap:** [writecred_policy_test.go:275](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/store-write-credential/internal/objstore/writecred_policy_test.go:275) checks a manually selected request list that omits these actions. It therefore cannot establish that only the three documented exceptions remain. An offline policy calculation confirmed all three additional permissions become allowed with the direct grant.
+
+ **Fix:** Restore the AWS production policy’s explicit `NotAction` restriction to the three permitted actions. Keep any necessary MinIO compatibility handling separate. Add regression cases for these omitted actions under a direct session grant.
+
+ **Fault family:** The write-only credential boundary must survive resource policies granting directly to its session.
+
+The deny families do not match the three intended write actions. The maximum policy size calculates to 1,082 bytes, within the STS limit. Targeted Go tests could not start because the sandbox refused creation of Go’s work directory. No files changed, network calls, subagents, or full suites.
+
+This is round 3 of 3. Cutting the MinIO-driven weakening from the AWS production policy removes this P1. Keeping issuance refused also prevents exposure, but does not establish that this policy is safe to enable. The deferred rollback finding remains closed for this review.
+
+**NOT READY**
\ No newline at end of file