Skip to content

ci(scratch-aws-access): cut assume-role session from 12h to 2h#36638

Draft
jasonhernandez wants to merge 1 commit into
mainfrom
sec-573-cut-scratch-assume-role-duration
Draft

ci(scratch-aws-access): cut assume-role session from 12h to 2h#36638
jasonhernandez wants to merge 1 commit into
mainfrom
sec-573-cut-scratch-assume-role-duration

Conversation

@jasonhernandez
Copy link
Copy Markdown
Contributor

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

  • Trigger a representative CI job after merge; confirm it succeeds with a 2 h session
  • If any pipeline genuinely runs >2 h end-to-end (release pipeline?), confirm we know which ones and have a plan (re-assume mid-run, or bump the cap up slightly)

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant