Skip to content

fix(policy): remove stale ruleset imports shadowed by new repos - #49

Merged
donbeave merged 1 commit into
mainfrom
fix/ruleset-import-collisions
Oct 11, 2026
Merged

donbeave merged 1 commit into
mainfrom
fix/ruleset-import-collisions

Conversation

@donbeave

Copy link
Copy Markdown
Contributor

Follow-up to #48, found by security review.

tui-snap and tailrocks-open-source-skills carry import blocks pointing at ruleset IDs owned by other repos (source/source_type verified live): tui-snap -> tuiscotti's 23746094/23746052, open-source-skills -> contribution-skills' 23746090/23746068. Neither repo has its own rulesets — the API resolves the foreign IDs to the owning repo's objects.

Removes the 4 stale blocks; the module's for_each creates both rulesets for these repos on next apply. New repos' entries (contribution-skills, tuiscotti) are the correct owners and stay.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T10:51:45.019546Z cb2a7a5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

tui-snap and tailrocks-open-source-skills have no own rulesets; their
imports.tf entries pointed at IDs owned by tuiscotti (23746094/23746052)
and tailrocks-contribution-skills (23746090/23746068) — verified via
source/source_type on the live ruleset objects. Removing the 4 stale
blocks; module creates both rulesets for the two repos on apply.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@donbeave
donbeave force-pushed the fix/ruleset-import-collisions branch from cb2a7a5 to 3dc5198 Compare October 11, 2026 10:49
@donbeave
donbeave merged commit 9a1ac08 into main Oct 11, 2026
6 checks passed
@donbeave
donbeave deleted the fix/ruleset-import-collisions branch October 11, 2026 10:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb2a7a57d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread imports.tf
}

import {
to = module.repository_policy.github_repository_ruleset.protect_main["tailrocks-pull-request-skills"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear stale state bindings before dropping imports

When any workspace applied these import blocks before this commit, deleting them does not unbind the foreign rulesets: OpenTofu continues tracking the contribution-skills/tuiscotti objects at the tailrocks-open-source-skills and tui-snap addresses, so the next apply will not create the missing protections as intended. The OpenTofu import documentation confirms that imported objects remain in state after their import blocks are removed; migrate or remove all four stale bindings and verify the subsequent plan before dropping the blocks.

AGENTS.md reference: AGENTS.md:L3-L3

Useful? React with 👍 / 👎.

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