Skip to content

PKG-1421: Verify init.groovy.d downloads against committed sha256 - #390

Open
nogueiraanderson wants to merge 2 commits into
mainfrom
PKG-1421-ps80-init-groovy-sha256
Open

PKG-1421: Verify init.groovy.d downloads against committed sha256#390
nogueiraanderson wants to merge 2 commits into
mainfrom
PKG-1421-ps80-init-groovy-sha256

Conversation

@nogueiraanderson

Copy link
Copy Markdown
Collaborator

Bug

  • Masters install S3-fetched init.groovy.d files without any integrity check. A tampered object would execute as admin-level Groovy at boot or on the next SSM sync.

Fix

  • Terraform computes a sha256 per uploaded file and renders it into user-data and the SSM drift-gate commands, so only content matching the reviewed repo state gets installed
  • Boot path stages via mktemp, verifies, installs per file, warns and skips on mismatch (boot is never blocked)
  • SSM sync is two-phase: verify the whole set, then install, so a mismatch aborts without leaving a mixed init.groovy.d. The association now depends on the S3 objects so its immediate re-apply never races the uploads

Tickets

…d sha256

- Terraform computes sha256 per uploaded file and renders it into
  user-data and the SSM drift-gate commands
- Boot path stages each file, verifies, installs only on match,
  warns and skips on mismatch (never blocks boot)
- SSM sync fails the association run on mismatch, live files untouched
@nogueiraanderson
nogueiraanderson requested a review from vorsel August 4, 2026 08:45
- Shared igd_fetch function + one line per file instead of an
  unrolled block; renders smaller than the pre-sha256 template
- CreateLaunchTemplateVersion failed with InvalidUserData.Malformed
  (16384-byte cap) on masters near the ceiling
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