adopt OpenSSF Scorecard (https://scorecard.dev/)#24792
Conversation
|
|
Greptile SummaryThis PR adds a new GitHub Actions workflow ( Positive aspects:
Issues found:
Confidence Score: 3/5The workflow will likely run with degraded or no results due to missing required permissions; needs a one-line fix before it works correctly. There is a clear P1 defect: the job-level permissions override
|
| Filename | Overview |
|---|---|
| .github/workflows/scorecard.yml | New OpenSSF Scorecard workflow with properly pinned actions and persist-credentials: false, but job-level permissions omit contents: read and actions: read which are required even for public repos when explicit permissions override the top-level read-all. |
Sequence Diagram
sequenceDiagram
participant GH as GitHub Events
participant Runner as ubuntu-latest Runner
participant Checkout as actions/checkout
participant Scorecard as ossf/scorecard-action
participant Artifact as actions/upload-artifact
participant CodeScanning as github/codeql-action/upload-sarif
GH->>Runner: Trigger workflow
Runner->>Checkout: Checkout code (persist-credentials: false)
Checkout-->>Runner: Repository contents
Runner->>Scorecard: Run scorecard analysis
Scorecard-->>Runner: results.sarif
Runner->>Artifact: Upload results.sarif (retention: 5 days)
Runner->>CodeScanning: Upload results.sarif to Code Scanning
Reviews (1): Last reviewed commit: "Create scorecard.yml" | Re-trigger Greptile
| permissions: | ||
| security-events: write | ||
| id-token: write | ||
| # Uncomment for private repos if needed: | ||
| # contents: read | ||
| # actions: read |
There was a problem hiding this comment.
Missing
contents: read and actions: read permissions
The job-level permissions block fully overrides the top-level permissions: read-all for this job. When job-level permissions are explicitly set, every unspecified scope is set to none. This means contents and actions are both none for this job.
contents: readis required even for public repositories because theossf/scorecard-actionmust read repository contents to evaluate checks likeBranch-Protection,Pinned-Dependencies, and others.actions: readis required bygithub/codeql-action/upload-sarifto upload SARIF results to Code Scanning.
The comment # Uncomment for private repos if needed is misleading — the official ossf/scorecard-action template includes both contents: read and actions: read for all repositories (public and private). Without them, the scorecard run will either silently skip checks or fail to upload results.
| permissions: | |
| security-events: write | |
| id-token: write | |
| # Uncomment for private repos if needed: | |
| # contents: read | |
| # actions: read | |
| permissions: | |
| security-events: write | |
| id-token: write | |
| contents: read | |
| actions: read |
There was a problem hiding this comment.
i disagree - the openssf yaml makes it quite clear this is for private repos only
Allows us to monitor and harden our repo to ensure no future impact
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/test_litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
CI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test
Changes