Skip to content

Updated GH token flow#930

Open
mdo wants to merge 1 commit into
beta-1.3from
mdo/gh-pat
Open

Updated GH token flow#930
mdo wants to merge 1 commit into
beta-1.3from
mdo/gh-pat

Conversation

@mdo

@mdo mdo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mdo mdo requested a review from amadeus July 1, 2026 16:26
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-docs-diffshub Ready Ready Preview Jul 1, 2026 4:26pm
pierre-docs-trees Ready Ready Preview Jul 1, 2026 4:26pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
pierre-docs-diffs Skipped Skipped Jul 1, 2026 4:26pm
pierrejs-diff-demo Skipped Skipped Jul 1, 2026 4:26pm

Request Review

@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: 7323495920

ℹ️ 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".

import { cn } from '@/lib/cn';

export const CREATE_TOKEN_URL =
'https://github.com/settings/personal-access-tokens/new?name=DiffsHub&description=Read+private+diffs+and+post+review+comments+from+DiffsHub&expires_in=90&contents=read&pull_requests=write&issues=write';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid templating write-scoped PATs for read-only flows

For users who follow this link only to view private diffs, the generated fine-grained PAT now requests pull_requests=write and issues=write, while the inspected DiffsHub GitHub integration only performs read/GET requests (/api/diff fetches pull, compare, and diagnostics, and github-diff-file exposes only GET). This leaves users storing a localStorage token with unnecessary PR/issue write authority, increasing the blast radius if the browser token is compromised; keep these permissions at read until a posting flow actually uses them.

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