Skip to content

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

Open
cristim wants to merge 1 commit into
feat/multicloud-web-frontendfrom
fix/386-cleanup-staging-branch-param
Open

sec(iac/aws): drop hardcoded branch ref from cleanup-staging.yml#565
cristim wants to merge 1 commit into
feat/multicloud-web-frontendfrom
fix/386-cleanup-staging-branch-param

Conversation

@cristim
Copy link
Copy Markdown
Member

@cristim cristim commented May 20, 2026

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

 #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 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
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85974e17-712d-425d-abe6-252666c5b6c9

📥 Commits

Reviewing files that changed from the base of the PR and between bc7bf0f and 7e6cc84.

📒 Files selected for processing (1)
  • .github/workflows/cleanup-staging.yml
💤 Files with no reviewable changes (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
Copy link
Copy Markdown
Member Author

cristim commented May 20, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

✅ 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
Copy link
Copy Markdown
Member Author

cristim commented May 20, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

✅ 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
Copy link
Copy Markdown
Member Author

cristim commented May 22, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

✅ 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
Copy link
Copy Markdown
Member Author

cristim commented May 22, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

✅ 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.

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