docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN#248
Conversation
|
Warning Review limit reached
More reviews will be available in 25 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates token scope requirements for the OpenSSF Scorecard integration across two coordinated locations: the compliance audit script's error message now directs operators to verify ChangesORG_SCORECARD_TOKEN scope requirements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the compliance audit script and documentation to clarify the requirements for the ORG_SCORECARD_TOKEN when using Fine-Grained Personal Access Tokens. The reviewer suggested including the necessary Organization-level 'Metadata: Read-only' scope in both the script's error message and the documentation to ensure repository discovery works correctly. Additionally, it was recommended to specify 'Read and write' access for Issues since the script manages them.
There was a problem hiding this comment.
Pull request overview
This PR updates the org standards documentation and audit-script messaging to clarify required Fine-Grained PAT permissions for ORG_SCORECARD_TOKEN, intended to prevent false-positive compliance findings when reading repository settings such as delete_branch_on_merge.
Changes:
- Document Fine-Grained PAT requirements for
ORG_SCORECARD_TOKENinstandards/ci-standards.md. - Update the
gh auth statusfailure message inscripts/compliance-audit.shto reference Fine-Grained PAT permissions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| standards/ci-standards.md | Adds documentation for the Fine-Grained PAT permissions needed by ORG_SCORECARD_TOKEN. |
| scripts/compliance-audit.sh | Adjusts authentication failure guidance to mention Fine-Grained PAT permissions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
593ed67 to
4c75d2a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/compliance-audit.sh`:
- Line 1319: Update the error message string that currently says "Check that
ORG_SCORECARD_TOKEN is valid. If using a Fine-Grained token, ensure it has
'Administration: Read-only' and 'Metadata: Read-only' repository scopes." to
either enumerate all five required Fine-Grained token scopes (Administration:
Read-only; Metadata: Read-only; Contents: Read-only; Issues: Read and write;
Organization: Metadata (Read-only)) or replace the inline scope list with a
short pointer to the full documentation (e.g., "see standards/ci-standards.md
lines 964-968") so operators receive complete remediation guidance; locate and
edit the exact message literal in scripts/compliance-audit.sh that emits the
ORG_SCORECARD_TOKEN guidance.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4167fc72-e5e4-414e-aa59-bfece5cca38b
📒 Files selected for processing (2)
scripts/compliance-audit.shstandards/ci-standards.md
|
Auto-rebase failed — merge conflict — this branch has conflicts with Please resolve the conflicts and push: |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
a4ca4f8 to
4b87b36
Compare
Superseded by automated re-review at
|
Superseded by automated re-review at
|
|
@dev-lead please process and advance this PR — fix any failing CI, resolve outstanding review threads, and enable auto-merge once it's green and approvable. |
|
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 0016f040c4b5bd328a1690b4e030df3b43dbe75e
Review mode: triage-approved (single reviewer)
Summary
Documentation-only changes (plus a one-line error-message tweak) clarifying the Fine-Grained PAT permissions required for ORG_SCORECARD_TOKEN. Triage classification (LOW) confirmed: no auth/secret/migration/CI-security surface beyond a clearer permissions list. All five prior reviewer threads (gemini, copilot, coderabbit) are resolved on the current SHA and the substantive feedback (Organization Metadata Read-only, fine-grained vs OAuth phrasing, completing the permission list) has been incorporated.
Linked issue analysis
No closing issue references on this PR. The PR description ties the change to false-positive compliance findings on delete_branch_on_merge; the new documentation in standards/ci-standards.md and the updated preflight error message in scripts/compliance-audit.sh directly address that motivation by spelling out the Administration: Read-only permission (and the rest) operators need on the token.
Findings
Nit — duplicate .gitignore entry (non-blocking): .dev-lead/ is now listed twice at the bottom of .gitignore (lines 392 and 393). Git treats duplicates as a no-op, so this has zero functional effect, but it is a minor cleanup worth folding into the next touch of this file.
No other issues identified. The expanded error message in scripts/compliance-audit.sh:1722 matches the permission list documented in standards/ci-standards.md:1063-1067, and the org-level Metadata permission is called out in both places as flagged by earlier reviewers.
CI status
All 19 status checks completed: 13 SUCCESS (AgentShield, Lint, ShellCheck, Secret scan (gitleaks), Agent Security Scan, CodeQL (actions + meta), SonarCloud x3, CodeRabbit, pr-auto-review check-and-dispatch, Detect ecosystems, Dependency audit dispatcher) and 6 SKIPPED (dependabot-automerge, ecosystem-specific audits with no manifests). No failures, no pending checks.
Reviewed automatically by the PR-review agent (single-reviewer mode: opus 4.7). Reply if you need a human review.
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix(docs): wrap long line to fix markdownlint error --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>



Documents the required Fine-Grained Personal Access Token scopes (specifically
Administration: Read-only) for theORG_SCORECARD_TOKENto resolve false-positive compliance audit issues regarding repository settings likedelete_branch_on_merge.Summary by CodeRabbit
Documentation
Bug Fixes