Skip to content

chore(security): land OpenSSF Scorecard hardening recipe (RAN-51)#82

Merged
aksOps merged 1 commit intomainfrom
ran-51-scorecard-hardening
Apr 26, 2026
Merged

chore(security): land OpenSSF Scorecard hardening recipe (RAN-51)#82
aksOps merged 1 commit intomainfrom
ran-51-scorecard-hardening

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented Apr 26, 2026

Summary

Recipe-validation lane for RAN-51 (parent: RAN-50) — lands the per-project supply-chain hardening kit on docsiq before it fans out mechanically to otelcontext, snipIT, and vigil. Mirrors the codeiq RAN-46 recipe.

  • .github/workflows/security.yml (new) — OSS-CLI stack (Semgrep + osv-scanner + Trivy + Gitleaks + jscpd + anchore/sbom-action), language-adapted for Go + React/TS, all actions SHA-pinned, top-level permissions: read-all.
  • .github/workflows/scorecard.yml — realigned to the codeiq RAN-46 recipe: push: [main] + weekly cron + workflow_dispatch, step-security/harden-runner audit egress, SARIF → Security tab, all actions SHA-pinned. (Previous bespoke workflow_run/branch_protection_rule triggers dropped so the four pending repos can take this file verbatim.)
  • SECURITY.md — adds a "Hardening references" section linking scorecard.yml, security.yml, codeql.yml, dependabot.yml, and .bestpractices.json (project 12628, badge: passing).
  • CLAUDE.md — adds a "Security & Supply-Chain" section documenting the Scorecard baseline + target (Best Practices passing is the hard gate; Scorecard observational with stretch ≥ 8.0/10 per the RAN-50 board ruling).
  • .bestpractices.json — adds the OpenSSF schema header (project_id: 12628, level: passing, evidence map, audit metadata) on top of the existing per-criterion answers.

Out-of-band repo settings (already applied via gh api)

These satisfy the AC but live outside the diff:

  • Branch protection on mainrequired_signatures.enabled = true (was false).
  • Repo Dependabot security updates → enabled (was disabled).
  • Paperclip Project Docs IQcodebase.repoUrl = https://github.com/RandomCodeSpace/docsiq.git, defaultRef = main (was both null).

Per-language deltas vs codeiq RAN-46

Tool docsiq adaptation
osv-scanner --lockfile=go.mod + --lockfile=ui/package-lock.json (codeiq is npm-only because pomxml plugin hits deps.dev).
semgrep p/security-audit + p/owasp-top-ten + p/golang + p/typescript (drops p/java).
jscpd targets cmd internal ui/src, --format go,javascript,typescript, ignores *_test.go, e2e/, vendor/.
trivy / gitleaks / sbom unchanged.

Will fold these per-language deltas back into shared/runbooks/engineering-standards.md after the four-repo fan-out so the runbook captures the validated matrix.

Test plan

  • CI green: ci.yml, codeql.yml, the new security.yml jobs (osv-scanner, trivy, semgrep, gitleaks, jscpd, sbom).
  • scorecard.yml triggers on this PR's main push and uploads SARIF to the Security tab.
  • OpenSSF Best Practices badge in README.md continues to render passing against project 12628.
  • Branch protection on main enforces signed commits — verified before opening this PR (gh api .../required_signaturesenabled: true).

🤖 Generated with Claude Code

- Add .github/workflows/security.yml — OSS-CLI stack (Semgrep, osv-scanner,
  Trivy, Gitleaks, jscpd, anchore/sbom-action), language-adapted for Go +
  React/TS, all actions SHA-pinned.
- Realign scorecard.yml with the codeiq RAN-46 recipe: push-to-main +
  weekly cron + workflow_dispatch, step-security/harden-runner audit,
  SARIF -> Security tab, all actions SHA-pinned.
- SECURITY.md gains a "Hardening references" section linking the
  scorecard, security, codeql, and dependabot configs plus
  .bestpractices.json (project 12628 — passing).
- CLAUDE.md gains a "Security & Supply-Chain" section documenting the
  Scorecard baseline + target (Best Practices passing = hard gate;
  Scorecard observational with stretch >= 8.0/10 per board ruling).
- .bestpractices.json gains the OpenSSF schema header (project_id 12628,
  level=passing, evidence map, audit metadata) on top of the existing
  per-criterion answers.

Out-of-band repo settings flipped to satisfy the AC:
- Branch protection on main: required_signatures enabled.
- Repo-level Dependabot security updates: enabled.

Recipe-validation lane for RAN-50 — replicates next to otelcontext,
snipIT, vigil. Per-language deltas vs codeiq:
- osv-scanner runs against go.mod + ui/package-lock.json.
- semgrep adds p/golang and p/typescript; drops p/java.
- jscpd targets cmd/ + internal/ + ui/src; format go,javascript,typescript.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@aksOps aksOps enabled auto-merge (squash) April 26, 2026 02:22
@aksOps aksOps merged commit a36996e into main Apr 26, 2026
16 of 17 checks passed
@aksOps aksOps deleted the ran-51-scorecard-hardening branch April 26, 2026 02:26
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