Skip to content

Docs: Correct Scorecard private-repo permissions - #152

Merged
ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-151
Oct 15, 2026
Merged

ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-151

Conversation

@lf-releng-code-monkey-bot

Copy link
Copy Markdown
Contributor

Closes #151

Authored by an AI agent; human review required
Command Exit
bash tests/workflow-steps.sh 0
prek run --files examples/openssf-scorecard/github.yaml .github/workflows/openssf-scorecard.yaml 0
aislop scan --changes --json 0
git commit -s (pre-commit and commit-msg hooks) 0

The github-code-monkey-bot workflow opened this pull request.
Nobody has merged it; a maintainer must review it first.
This pipeline cannot yet revise its own pull requests, so a maintainer must act on any review findings.


What changed

The OpenSSF Scorecard example and lane told callers that a private repository recovers Scorecard's commit and SAST signals by granting issues: read, pull-requests: read and checks: read in the caller. That cannot work: a called job that declares permissions: receives exactly what it declares, capped by the caller, and the lane's scan job declares none of those scopes.

This PR corrects the comments only. No permissions: key or value changes.

  • examples/openssf-scorecard/github.yaml: the six lines after actions: read become the wording the migrated callers already use (CI: Move Scorecard to security-workflows lane actions-template#268, CI: Move Scorecard to security-workflows lane cbom-action#16). The DEPLOYMENT NOTES bullet also claimed private repositories need "the extra read permissions noted below"; it now states the limitation instead.
  • .github/workflows/openssf-scorecard.yaml: the scan job comment now says the job does not request issues, pull-requests or checks, so Scorecard loses the signals that need them on a private repository, and a caller grant cannot change that.

README.md and docs/ make no such claim, so they are unchanged.

Validation

  • bash tests/workflow-steps.sh: exit 0, all 112 cases passed.
  • prek run --files on both changed files: exit 0 (yamllint, actionlint, zizmor, codespell, reuse all passed). The commit hooks, gitlint included, also passed.
  • aislop scan --changes --json: exit 0, empty diagnostics array.

For reviewers

  • The DEPLOYMENT NOTES edit goes slightly beyond the two locations the issue names. The issue's step 3 asks for it: the old text pointed readers to the removed advice.
  • The commented-out issues / pull-requests / checks lines are removed from the example rather than kept. Uncommenting them in a caller has no effect, so keeping them would mislead.
  • This pipeline cannot revise its own pull requests, so a human must handle any Copilot review findings.

The Scorecard example and lane told callers that a private repository
recovers the commit and SAST signals by granting issues, pull-requests
and checks read in the caller. That cannot work: a called job that
declares permissions receives exactly what it declares, capped by the
caller, and the scan job declares none of those scopes.

Replace the advice with an accurate statement of the limitation in
the example's permissions block and DEPLOYMENT NOTES and in the scan
job. Comments only; no permission changes.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copilot AI 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.

🟢 Approval recommended

The comment-only changes match the issue’s requirements and leave all permission keys and values unchanged.

0 open findings

What changed in this PR

Corrects misleading private-repository permission advice for the OpenSSF Scorecard workflow, addressing #151 without changing workflow behavior.

Changes:

  • Clarifies that extra caller permissions cannot expand the scan job’s declared permissions.
  • Updates deployment notes and removes ineffective commented-out permission suggestions.
File Description
examples/​openssf-scorecard/​github.yaml Corrects deployment notes and caller permission guidance.
.github/​workflows/​openssf-scorecard.yaml Documents the scan job’s private-repository permission limitations.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit 5513fde into lfreleng-actions:main Oct 15, 2026
11 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the code-monkey/issue-151 branch October 15, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Correct Scorecard private-repository permission advice

2 participants