Skip to content

fix(aws): record the pending endpoint update id and count every EKS tag - #87

Closed
tim-thacker-nullify wants to merge 2 commits into
feat/cfn-managed-eks-scan-review-r3from
feat/cfn-managed-eks-scan-review-r4
Closed

tim-thacker-nullify wants to merge 2 commits into
feat/cfn-managed-eks-scan-review-r3from
feat/cfn-managed-eks-scan-review-r4

Conversation

@tim-thacker-nullify

@tim-thacker-nullify tim-thacker-nullify commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Claude

Round-4 review fixes for #79: R4-79-1, R4-79-2 and R4-79-3 on setup-eks-managed-scan.sh.

  • R4-79-3 apply records the id update-cluster-config returns in a nullify-pending-update cluster tag, straight after the call. The in-progress guard describes that one update instead of trusting ListUpdates, whose consistency AWS does not document. The tag is dropped with the pending CIDR record.
  • R4-79-1 Only a record written without an id falls back to describing every update ListUpdates returns, so the common path is one call, not one per historical update. A describe-update failing with ResourceNotFoundException is skipped with a warning; every other failure still dies.
  • R4-79-2 The tag-slot precheck counts every tag key, aws: ones included, and reads them through the same keys(cluster.tags) query load_cidr_records uses. That drops the length(keys(...)[?!starts_with(@, 'aws:')]) expression no test executed, and the assumption that aws: tags are exempt from the 50-tag quota. The records now need three free slots.

Tests: four new bats cases (the id is recorded between the update and the wait; a recorded InProgress update stops apply without calling list-updates; a forgotten id does not; remove drops a stale id tag), plus one pinning that aws: tags count. The two tag-limit cases move from two free slots to three. The fake CLI now describes update-1, the id it hands out, so the recovery cases take the real path.

Still open from round 3: R3-74-3, the fallback RBAC manifest is still fetched from the mutable tag nullify-k8s-readonly-access-v0.1.0 with no commit pin and no RBAC_MANIFEST_SHA256, so a moved tag makes remove delete a different object set than apply created. The tag still does not exist; pinning needs it created, which needs PR #84.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

tim-thacker-nullify and others added 2 commits September 15, 2026 10:20
Three round-4 review lows on the managed EKS scan script.

- apply records the id update-cluster-config returns in nullify-pending-update,
  and the in-progress guard describes that one update instead of trusting
  list-updates to already show an update accepted seconds earlier
- a describe-update that fails with ResourceNotFoundException is skipped rather
  than aborting the run; other failures still die
- only a record written without an update id falls back to describing every
  update list-updates returns
- the tag-slot precheck counts every tag key, aws: ones included, through the
  same keys() query load_cidr_records uses instead of an untested JMESPath
  filter; the records now need three free slots

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…lcheck

SC2178/SC2128: keys is an array elsewhere in the script.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tim-thacker-nullify

Copy link
Copy Markdown
Member Author

Claude

Collapsed into #64 at f9903ac after passing adversarial review; all of this PR's commits are now in #64.

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