Skip to content

sec(iac/aws): drop hardcoded branch ref from cleanup-staging.yml - #565

Merged
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/386-cleanup-staging-branch-param
May 28, 2026
Merged

cristim merged 1 commit into
feat/multicloud-web-frontendfrom
fix/386-cleanup-staging-branch-param

Conversation

@cristim

@cristim cristim commented May 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Removes ref: feat/multicloud-web-frontend from all four actions/checkout steps in .github/workflows/cleanup-staging.yml
  • Checkout now uses the ref selected at workflow_dispatch time (the branch/tag the operator chooses), closing the supply-chain risk where commits to the feature branch automatically became the Terraform config used by the destroy workflow
  • Regression: no hardcoded ref: key remains in cleanup-staging.yml

Closes #386

Summary by CodeRabbit

  • Chores
    • Updated cleanup staging workflow to use default Git checkout behavior across destroy jobs for AWS Lambda, AWS Fargate, Azure, and GCP environments.

Review Change Stack

@cristim cristim added bug Something isn't working triaged Item has been triaged priority/p2 Backlog-worthy severity/medium Moderate harm urgency/this-sprint Within the current sprint impact/internal Team-internal only labels May 20, 2026
@coderabbitai

coderabbitai Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@cristim, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 44 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b6e280bf-c83e-4ddb-9884-9d87e68c0dd0

📥 Commits

Reviewing files that changed from the base of the PR and between 423e87c and 0bc0762.

📒 Files selected for processing (1)
  • .github/workflows/cleanup-staging.yml
📝 Walkthrough

Walkthrough

The cleanup-staging workflow removes hardcoded branch references from checkout steps across all cloud provider destroy jobs, enabling the workflow to use default ref resolution behavior instead of a specific feature branch.

Changes

Cleanup Workflow Security Fix

Layer / File(s) Summary
Remove hardcoded branch refs from destroy jobs
.github/workflows/cleanup-staging.yml
AWS Lambda, AWS Fargate, Azure, and GCP destroy job checkout steps no longer override the ref to feat/multicloud-web-frontend, allowing default checkout behavior to apply.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

type/security, effort/xs

Poem

🐰 A hardcoded branch, once locked in place,
Now freed to checkout with grace,
Feature refs removed with care,
Cleanup workflows stay fair and square!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'sec(iac/aws): drop hardcoded branch ref from cleanup-staging.yml' accurately summarizes the main change—removing hardcoded branch references from the cleanup workflow.
Linked Issues check ✅ Passed The PR removes hardcoded ref from all four actions/checkout steps as required by issue #386, resolving the supply-chain risk and functional dependency on a feature branch.
Out of Scope Changes check ✅ Passed All changes in the PR are scoped to removing hardcoded branch refs from cleanup-staging.yml; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/386-cleanup-staging-branch-param

Comment @coderabbitai help to get the list of available commands and usage tips.

@cristim

cristim commented May 20, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim cristim added the type/security Security finding label May 20, 2026
@cristim

cristim commented May 20, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented May 22, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented May 22, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

 #386)

Remove the `ref: feat/multicloud-web-frontend` override from all four
actions/checkout steps in cleanup-staging.yml. Without the override,
each checkout uses the ref selected at workflow_dispatch time (the branch
or tag the operator chooses when triggering the workflow), which is the
correct behaviour for a destroy workflow: it runs against whatever ref
the operator has chosen and approved, not a hard-wired development branch
that may not exist after the feature branch is merged.

This closes the supply-chain risk where any commit pushed to the feature
branch would automatically become the Terraform configuration used by the
destroy workflow.
@cristim
cristim force-pushed the fix/386-cleanup-staging-branch-param branch from 7e6cc84 to 0bc0762 Compare May 25, 2026 16:38
@cristim

cristim commented May 25, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented May 27, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented May 27, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@cristim

cristim commented May 27, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@cristim

cristim commented May 28, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@cristim
cristim merged commit 16462db into feat/multicloud-web-frontend May 28, 2026
4 of 5 checks passed
@cristim
cristim deleted the fix/386-cleanup-staging-branch-param branch June 3, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact/internal Team-internal only priority/p2 Backlog-worthy severity/medium Moderate harm triaged Item has been triaged type/security Security finding urgency/this-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant