Skip to content

Revert "chore(agents): enforce OSS isolation with a mechanical pre-push guard (#369)" - #372

Merged
ThePlenkov merged 1 commit into
mainfrom
revert-oss-guard
Nov 20, 2026
Merged

ThePlenkov merged 1 commit into
mainfrom
revert-oss-guard

Conversation

@ThePlenkov

@ThePlenkov ThePlenkov commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Reverts commit cb6705f / PR #369. The OSS isolation guard and rule are private workflow logic and must not live in the public repository. Local copies are retained outside the repo.

Reverts the previous changes that enforced OSS isolation via a mechanical pre-push guard, removing the corresponding documentation from AGENTS.md and the pattern exclusion entry from .gitignore.

@netlify

netlify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for adt-cli canceled.

Name Link
🔨 Latest commit 5661525
🔍 Latest deploy log https://app.netlify.com/projects/adt-cli/deploys/6b006f3aa6e1913b26cb2f5a

@amazon-q-developer

Copy link
Copy Markdown
Contributor

Warning

Amazon Q Developer for GitHub: end of support

On January 30, 2027, AWS will discontinue support for the Amazon Q Developer for GitHub App. New app installations will no longer be available starting November 18, 2026.

For capabilities similar to the Amazon Q Developer for GitHub App, explore Kiro and the Kiro GitHub App. For more information about the end of support, see Amazon Q Developer end-of-support announcement on the AWS DevOps Blog.

@codeant-ai

codeant-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Skipping CodeAnt AI review — this PR is a revert. The diff is the inverse of code that was previously reviewed and merged, so a fresh review typically adds no signal.

If you want CodeAnt to double-check the revert, comment @codeant-ai : review and CodeAnt will start a review.

@sourcery-ai

sourcery-ai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Remove the OSS GitHub guard script as part of reverting the public-repository enforcement mechanism.

  • scripts/oss-github-guard.sh (deleted)

Configuration

Remove the ignore configuration associated with the reverted OSS isolation workflow.

  • .gitignore L193 (removed lines)

Documentation

Remove the OSS isolation rule and its mandatory guidance from the repository because this workflow is retained outside the public repo.

  • .agents/rules/git/oss-isolation.md (deleted)
  • AGENTS.md L117 (removed lines)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@kody-ai

kody-ai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR removes the OSS isolation rule from the agent guidance, deletes the scripts/oss-github-guard.sh script, and removes the .gitignore entry for its local patterns file.

Changes: OSS isolation guard removal

Layer / File(s) Summary
Remove OSS isolation guidance and guard
.agents/rules/git/oss-isolation.md, AGENTS.md, scripts/oss-github-guard.sh, .gitignore
The OSS isolation rule and its guidance in AGENTS.md are removed. The guard script and the ignore entry for its local patterns file are also removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: kody-ai

Merge Risk: Minimal · up to 56615

This change removes internal-workflow guidance and a helper script, and nothing else in the repository depends on them. It has no runtime effect, so merging carries little risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states that the PR reverts PR #369, which added the OSS isolation mechanical pre-push guard. The raw summary confirms the changes delete the OSS isolation rule file, the guard script, the AG…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states that the PR reverts PR #369, which added the OSS isolation mechanical pre-push guard. The raw summary confirms the changes delete the OSS isolation rule file, the guard script, the AGENTS.md guidance, and the .gitignore entry. The title names the main change and its scope, so it matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5aad8bce-b053-47fd-932d-24162f7cbbd3
Commits

Reviewing files that changed from the base of the PR and between 63b7725 and 5661525.

Files selected for processing: 4

  • .agents/rules/git/oss-isolation.md
  • .gitignore
  • AGENTS.md
  • scripts/oss-github-guard.sh
Files with no reviewable changes: 4

  • .agents/rules/git/oss-isolation.md
  • .gitignore
  • AGENTS.md
  • scripts/oss-github-guard.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@baz-reviewer

baz-reviewer Bot commented Nov 20, 2026

Copy link
Copy Markdown

Review this PR on Baz

Merger

Waiting for CI and review to complete.


@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

This PR reverts PR #369, removing the OSS isolation pre-push guard and its associated .gitignore rule. The changes are deletion-only across two files.

Critical finding:

The removal of scripts/.oss-guard-local.patterns from .gitignore creates a latent security risk: if the sensitive patterns file (containing organization-specific forbidden strings) is ever placed back under scripts/ locally, nothing now prevents it from being accidentally committed and pushed to this public repository. A broader ignore pattern should be added to close this gap before merging.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

Comment thread .gitignore
.beads-credential-key
.beads/proxieddb/
*.gate.lock*
scripts/.oss-guard-local.patterns

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛑 Security Vulnerability: Removing scripts/.oss-guard-local.patterns from .gitignore means the local patterns file (which contains organization-specific forbidden strings) can now be accidentally committed to this public repository. The PR description says local copies are retained outside the repo, but nothing prevents the file from living inside scripts/ and being staged. Add a broader ignore rule (e.g., scripts/*.patterns or *.oss-guard*) to ensure the sensitive patterns file can never be committed even if accidentally placed back under scripts/.1

Footnotes

  1. CWE-312: Cleartext Storage of Sensitive Information - https://cwe.mitre.org/data/definitions/312.html ↩

@gitar-bot

gitar-bot Bot commented Nov 20, 2026

Copy link
Copy Markdown

Code review skipped: this PR only reverts an earlier commit. Push anything beyond the revert and Gitar reviews the PR.

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@sonarqubecloud

Copy link
Copy Markdown

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sourcery-ai sourcery-ai 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.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="AGENTS.md" line_range="130" />
<code_context>
-`.agents/rules/git/oss-isolation.md`).
-
-Before any `git push` to a public remote or `gh pr create/edit/comment`:
-run `scripts/oss-github-guard.sh` (the pre-push hook enforces this; a
-non-zero exit is a hard stop). Full rule:
-`.agents/rules/git/oss-isolation.md`.
</code_context>
<issue_to_address>
**Internal context reaches public remotes**

When a public contribution contains internal context, including text matching a locally configured forbidden pattern, `scripts/oss-github-guard.sh` is missing, so the public-contribution checks do not run and the content reaches the public remote.

Restore the guard script and ensure it runs before public pushes and GitHub contribution actions.
</issue_to_address>

### Comment 2
<location path="AGENTS.md" line_range="127" />
<code_context>
-
-The concrete forbidden patterns are organization-specific and live in
-`scripts/.oss-guard-local.patterns` (local, untracked; see
-`.agents/rules/git/oss-isolation.md`).
-
-Before any `git push` to a public remote or `gh pr create/edit/comment`:
</code_context>
<issue_to_address>
**OSS rule source disappears**

When contributors rely on the repository’s guidance for public contributions, aGENTS.md no longer points to the full rule, and `.agents/rules/git/oss-isolation.md` is deleted, so contributors lack the repository’s specified source for the zero-internal-context requirement.

Keep the required rule available at the canonical path or update the applicable repository guidance to point to an available source.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 2 findings to address first, and without the pre-push guard and mandatory instructions, internal context can be included in public GitHub pushes or PR activity and remain publicly exposed even if this revert is reversed. The removed boundary applies broadly to future contributions, with no automatic signal that a disclosure occurred.

Blocking findings: AGENTS.md:130, AGENTS.md:127


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread AGENTS.md
`.agents/rules/git/oss-isolation.md`).

Before any `git push` to a public remote or `gh pr create/edit/comment`:
run `scripts/oss-github-guard.sh` (the pre-push hook enforces this; a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High · Internal context reaches public remotes

When a public contribution contains internal context, including text matching a locally configured forbidden pattern, scripts/oss-github-guard.sh is missing, so the public-contribution checks do not run and the content reaches the public remote.

Restore the guard script and ensure it runs before public pushes and GitHub contribution actions.

Prompt for AI agents
In `AGENTS.md` at line 130:

**Internal context reaches public remotes**

When a public contribution contains internal context, including text matching a locally configured forbidden pattern, `scripts/oss-github-guard.sh` is missing, so the public-contribution checks do not run and the content reaches the public remote.

Restore the guard script and ensure it runs before public pushes and GitHub contribution actions.

From .agents/rules/git/oss-isolation.md L35-37:

The concrete patterns for this organization live in
`scripts/.oss-guard-local.patterns` (local, untracked — never commit it). The
mechanical guard reads that file and adds its patterns to the generic scan.

Comment thread AGENTS.md

The concrete forbidden patterns are organization-specific and live in
`scripts/.oss-guard-local.patterns` (local, untracked; see
`.agents/rules/git/oss-isolation.md`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · OSS rule source disappears

When contributors rely on the repository’s guidance for public contributions, aGENTS.md no longer points to the full rule, and .agents/rules/git/oss-isolation.md is deleted, so contributors lack the repository’s specified source for the zero-internal-context requirement.

Keep the required rule available at the canonical path or update the applicable repository guidance to point to an available source.

Prompt for AI agents
In `AGENTS.md` at line 127:

**OSS rule source disappears**

When contributors rely on the repository’s guidance for public contributions, aGENTS.md no longer points to the full rule, and `.agents/rules/git/oss-isolation.md` is deleted, so contributors lack the repository’s specified source for the zero-internal-context requirement.

Keep the required rule available at the canonical path or update the applicable repository guidance to point to an available source.

From AGENTS.md L120-127, AGENTS.md L131-132:

Public GitHub remotes and internal development remotes are separate worlds.
**Zero internal context in any public contribution** — titles, bodies,
comments, reviews, issues, branch names, commit messages, author/committer
emails, code comments and docs.

The concrete forbidden patterns are organization-specific and live in
`scripts/.oss-guard-local.patterns` (local, untracked; see
`.agents/rules/git/oss-isolation.md`).

@ThePlenkov
ThePlenkov merged commit 5661525 into main Nov 20, 2026
26 of 27 checks passed
@ThePlenkov
ThePlenkov deleted the revert-oss-guard branch November 20, 2026 16:10
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