Skip to content

fix(agent): keep public commands repo-scoped - #77

Merged
JSONbored merged 2 commits into
mainfrom
codex/propose-fix-for-github-command-vulnerability
May 29, 2026
Merged

fix(agent): keep public commands repo-scoped#77
JSONbored merged 2 commits into
mainfrom
codex/propose-fix-for-github-command-vulnerability

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Public GitHub comment commands could fall back to the contributor's full private decision pack and surface a private cross-repo recommendation in a public comment, violating the public-safe requirement.
  • The orchestrator needs to restrict fallback behavior for github_comment surface runs so public responses never expose unrelated private repo rankings.

Description

  • Preserve the request surface when creating blocker runs by setting surface from the incoming input instead of always using "api" in explainBlockersWithAgent (src/services/agent-orchestrator.ts).
  • Prevent public github_comment runs from falling back to the full pack.repoDecisions when the requested repoFullName has no matching decision by computing allowCrossRepoFallback and using scopedDecisionActions for decision selection (src/services/agent-orchestrator.ts).
  • Add an options.allowFallback flag to buildBlockerActions so blocker responses for public surfaces return no actions when there is no repo-specific decision, avoiding selecting unrelated private blockers (src/services/agent-orchestrator.ts).
  • Add a regression unit test that seeds a private repo decision, invokes planNextWork/explainBlockersWithAgent with surface: "github_comment" for a missing public repo, and asserts the public comment and returned actions do not reveal the private repo or recommendation (test/unit/agent-orchestrator.test.ts).

Testing

  • Ran npm exec vitest -- run test/unit/agent-orchestrator.test.ts --reporter=verbose and the unit test suite passed (all tests in the file succeeded).
  • Ran npm run typecheck (tsc --noEmit) and the TypeScript typecheck passed without errors.
  • Ran git diff --check to ensure no whitespace/diff issues surfaced and no automated checks failed.

Codex Task

@JSONbored
JSONbored merged commit 678c9c5 into main May 29, 2026
5 checks passed
@JSONbored
JSONbored deleted the codex/propose-fix-for-github-command-vulnerability branch May 29, 2026 23:07
@JSONbored JSONbored added the bug label May 30, 2026
jony376 pushed a commit to jony376/gittensory that referenced this pull request May 31, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant