Skip to content

feat(ci): OpenSSF Scorecard analysis with published results - #42

Merged
meedoomostafa merged 3 commits into
mainfrom
feat/scorecard
Jul 27, 2026
Merged

feat(ci): OpenSSF Scorecard analysis with published results#42
meedoomostafa merged 3 commits into
mainfrom
feat/scorecard

Conversation

@meedoomostafa

@meedoomostafa meedoomostafa commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Batch H PR 2 — OpenSSF Scorecard, done after H5 (secret scanning, push protection, Dependabot security updates were enabled first per Sol architect's ordering, so the first badge reflects the real posture).

  • scorecard.yml: mirrors the official ossf/scorecard reference workflow — permissions: read-all at top, job-scoped security-events: write + id-token: write, only allowlisted actions in the job (checkout / scorecard-action / upload-artifact / upload-sarif), all SHA-pinned, weekly cron + on-main-push. publish_results: true feeds the badge, the public Scorecard API, and the repo's code-scanning dashboard. Docs-first: workflow-restriction rules and the reference workflow were fetched from the current ossf sources, not trained memory.
  • README badges: Scorecard, CI, latest release, Go Report Card.
  • Sol review fix: checkout SHA comments across all workflows said # v6 while the Dependabot-bumped SHA is actually v7.0.1 — misleading annotation corrected everywhere (the contract tests assert SHA-pinning itself, so this is comment-only).

Sol secops verdict: NEEDS-CHANGES on the annotation only → fixed; all other checks OK (publish-restriction compliance, pin validity, badge URLs, no confidentiality delta for a public repo).

Real-environment validation plan (post-merge)

The scorecard job triggers on the merge push to main — I'll watch that run live, confirm SARIF lands in code-scanning and the badge endpoint returns a score.

Summary by CodeRabbit

  • New Features

    • Added automated OpenSSF Scorecard security analysis running on the main branch and on a weekly schedule.
    • Uploads Scorecard results to code scanning for review.
  • Documentation

    • Added new GitHub badges for CI status, OpenSSF Scorecard, and the latest release version.
  • Chores

    • Updated repository automation workflows to use a newer pinned version of the checkout action across CI and release-related jobs.

Weekly + on-main-push Scorecard runs (official ossf workflow shape:
read-all default, job-scoped security-events/id-token writes, only
allowlisted actions in the job, all SHA-pinned). Results publish to
the Scorecard API (badge) and the repo code-scanning dashboard.
README gains Scorecard, CI, release, and Go Report Card badges.
Sol review: the checkout SHA is v7.0.1 (Dependabot bump) but comments
still said v6, hiding a major-version change from reviewers. Fixed in
all workflows.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 87261524-8b45-4275-bc40-721b8fa3b5ca

📥 Commits

Reviewing files that changed from the base of the PR and between 5083f72 and 64e8738.

📒 Files selected for processing (2)
  • .github/workflows/scorecard.yml
  • README.md
💤 Files with no reviewable changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/scorecard.yml

📝 Walkthrough

Walkthrough

The pull request updates pinned actions/checkout revisions across existing workflows, adds a scheduled OpenSSF Scorecard workflow with SARIF reporting, and adds CI, security, and release badges to the README.

Changes

CI and security updates

Layer / File(s) Summary
Update checkout action pins
.github/workflows/action-live-signoff.yml, .github/workflows/action-smoke.yml, .github/workflows/ci.yml, .github/workflows/release.yml
Existing workflow jobs switch their pinned actions/checkout revision from v6 to v7.0.1.
Add Scorecard analysis workflow
.github/workflows/scorecard.yml
Adds push and weekly schedule triggers, scoped permissions, Scorecard SARIF generation, artifact retention, and code-scanning upload.
Add repository status badges
README.md
Adds CI, OpenSSF Scorecard, and latest release badges.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow
  participant Repository
  participant Scorecard
  participant CodeScanning
  Workflow->>Repository: checkout source
  Workflow->>Scorecard: analyze repository and write results.sarif
  Workflow->>CodeScanning: upload SARIF results
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: adding OpenSSF Scorecard analysis and publishing its results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/scorecard

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/action-smoke.yml (1)

23-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Disable unnecessary checkout credential persistence in read-only jobs.

These jobs do not need authenticated Git operations. Set persist-credentials: false at every affected checkout step to reduce token exposure; retain persistence only where a later authenticated operation, such as the tag push in .github/workflows/release.yml, requires it. (github.com)

  • .github/workflows/action-smoke.yml#L23-L23: add with.persist-credentials: false.
  • .github/workflows/action-smoke.yml#L46-L46: add with.persist-credentials: false.
  • .github/workflows/action-smoke.yml#L69-L69: add with.persist-credentials: false.
  • .github/workflows/action-smoke.yml#L160-L160: add with.persist-credentials: false.
  • .github/workflows/action-live-signoff.yml#L19-L19: add with.persist-credentials: false.
🤖 Prompt for 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.

In @.github/workflows/action-smoke.yml at line 23, Disable checkout credential
persistence at all five affected steps: add with.persist-credentials: false to
the checkout steps at .github/workflows/action-smoke.yml lines 23, 46, 69, and
160, and .github/workflows/action-live-signoff.yml line 19. Do not alter
checkout persistence for workflows requiring authenticated operations.

Source: Linters/SAST tools

🤖 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 @.github/workflows/scorecard.yml:
- Around line 16-18: Update the job-level permissions block in the Scorecard
workflow to include contents: read alongside security-events and id-token,
preserving the existing permissions so checkout and Scorecard retain the
required repository access.

In `@README.md`:
- Line 6: Remove the Go Report Card badge and its link from the README.md badges
section; do not replace it unless an existing active Go quality-checking
pipeline is already available.

---

Nitpick comments:
In @.github/workflows/action-smoke.yml:
- Line 23: Disable checkout credential persistence at all five affected steps:
add with.persist-credentials: false to the checkout steps at
.github/workflows/action-smoke.yml lines 23, 46, 69, and 160, and
.github/workflows/action-live-signoff.yml line 19. Do not alter checkout
persistence for workflows requiring authenticated operations.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d981dfd-6710-472e-8877-d0d106d36c23

📥 Commits

Reviewing files that changed from the base of the PR and between 5df0be5 and 5083f72.

📒 Files selected for processing (6)
  • .github/workflows/action-live-signoff.yml
  • .github/workflows/action-smoke.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .github/workflows/scorecard.yml
  • README.md

Comment thread .github/workflows/scorecard.yml
Comment thread README.md Outdated
…adge

CodeRabbit review: job-level permissions replace top-level read-all,
so contents was none - checkout needs it explicitly. goreportcard.com
is discontinued (verified unreachable); badge removed.
@meedoomostafa

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@meedoomostafa
meedoomostafa merged commit baf0f37 into main Jul 27, 2026
13 checks passed
@meedoomostafa
meedoomostafa deleted the feat/scorecard branch July 27, 2026 12:18
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