Skip to content

fix(api): scope app command feedback by repo access - #492

Merged
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-feedback-endpoint-vulnerability
Jun 10, 2026
Merged

fix(api): scope app command feedback by repo access#492
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-feedback-endpoint-vulnerability

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • The app feedback endpoint accepted any authenticated identity and recorded feedback for arbitrary answer IDs, allowing non-maintainers to vote on answers and exposing repo/issue metadata for known answer IDs.
  • The intent is to require repository-scoped access for session-based browser users before recording app-surface feedback or returning answer metadata, aligning the app path with the stricter GitHub reaction authorization policy.

Description

  • Add a repository lookup and session-scoped guard before recording app command feedback by calling getRepository and requireSessionRepoAccess when identity.kind === "session" in the /v1/app/commands/feedback handler in src/api/routes.ts.
  • Preserve the existing requireAppRole guard for control-panel roles and only enforce repo-scoped access for session identities to avoid widening static-token behavior.
  • Add integration coverage in test/integration/api.test.ts to verify that an in-scope repo owner can submit feedback for their repository's answer while the same user is denied when using a known answer ID from an out-of-scope private repo.

Testing

  • Ran the targeted integration suite with npx vitest run test/integration/api.test.ts --reporter verbose, and the integration file completed successfully (all tests passed).
  • Ran static type checks with npm run typecheck (tsc --noEmit) and the typecheck completed without errors.

Codex Task

@ghost

ghost commented Jun 9, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #492 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@ghost ghost added the gittensory:reviewed label Jun 9, 2026
@github-actions github-actions Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 9, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui ed43677 Commit Preview URL

Branch Preview URL
Jun 10 2026, 06:38 AM

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored
JSONbored force-pushed the codex/propose-fix-for-feedback-endpoint-vulnerability branch from b88ddce to ed43677 Compare June 10, 2026 06:36
@JSONbored
JSONbored merged commit 0aff725 into main Jun 10, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/propose-fix-for-feedback-endpoint-vulnerability branch June 10, 2026 06:39
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 10, 2026
@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x 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. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant