ci(scratch-aws-access): cut assume-role session from 12h to 2h#36638
Draft
jasonhernandez wants to merge 1 commit into
Draft
ci(scratch-aws-access): cut assume-role session from 12h to 2h#36638jasonhernandez wants to merge 1 commit into
jasonhernandez wants to merge 1 commit into
Conversation
CI jobs rarely run longer than ~2h, but the scratch-aws-access plugin requests a 12h STS session. Any credential leak (test logs, printenv in a malicious step, exfil from the agent host) stays valid for half a day. Paired with a matching change in i2 to cut max_session_duration on the underlying `mz-scratch-ci-role`. Land this PR first; the role-side cap in i2 won't matter until this client-side request is also reduced. Tracking: i2 SEC-573 / SEC-566 audit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The `scratch-aws-access` Buildkite plugin requests a 12 h STS session when assuming the `ci` role in the scratch account. CI jobs rarely exceed ~2 h. If those creds leak (test logs, `printenv` in a malicious test step, exfil from the agent host, …) they stay valid for half a day.
This PR cuts `--duration-seconds 43200` → `7200`.
Coordination
Pair with `MaterializeInc/i2#3267`, which cuts `max_session_duration` on `mz-scratch-ci-role` to match. Land this PR first — otherwise this client keeps asking for 12 h and the role-side cap in i2 rejects it.
Tracking: i2 SEC-573 / SEC-566 audit.
Test plan
🤖 Generated with Claude Code