Skip to content

feat(security): OpenSSF Best Practices + Scorecard scaffolding (RAN-55, RAN-60)#1

Merged
aksOps merged 4 commits intomainfrom
feat/ran-55-openssf-best-practices
Apr 26, 2026
Merged

feat(security): OpenSSF Best Practices + Scorecard scaffolding (RAN-55, RAN-60)#1
aksOps merged 4 commits intomainfrom
feat/ran-55-openssf-best-practices

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented Apr 26, 2026

Summary

Lands the codeiq RAN-46 / RAN-52 OpenSSF recipe on vigil, language-adapted for the PowerShell + WPF stack (no Maven, no npm, no language lockfile — vigil has no package manager). Bundles the RAN-60 canonical-schema rewrite of .bestpractices.json on top so the autofill robot pre-fills the criteria page on board flip — skipping the custom-group-structure intermediate state.

RAN-55 — scaffolding

  • New: CLAUDE.md, SECURITY.md, AGENTS.md, .bestpractices.json (project_id 12648, level passing)
  • New: .github/workflows/scorecard.yml — OpenSSF Scorecard, push-to-main + Mondays 06:00 UTC, SHA-pinned actions, SARIF → Security tab
  • New: .github/workflows/security.yml — (B) OSS-CLI stack: Semgrep / OSV-Scanner / Trivy / Gitleaks / jscpd (PowerShell tokenization) / Syft SBOM. PR + push + weekly cron, all actions SHA-pinned, harden-runner egress audit on every job
  • New: .github/dependabot.ymlgithub-actions ecosystem only (no Maven / npm targets exist)
  • Update: README.md — OpenSSF Best Practices + Scorecard badges at the top
  • Update: LICENSE — copyright now Amit Kumar (matches codeiq precedent + RAN-55 AC)

RAN-60 — canonical-schema .bestpractices.json

  • Replace custom group structure (status / evidence / audit blocks) with bestpractices.dev's canonical flat per-criterion schema so the autofill robot pre-fills the criteria page on board flip
  • All 67 passing-level criteria (43 MUST, 10 SHOULD, 14 SUGGESTED) carry <key>_status, <key>_justification, and (where required by upstream criteria.yml) <key>_url
  • Status distribution: 57 Met, 5 N/A (release_notes / release_notes_vulns / crypto_password_storage / crypto_pfs / dynamic_analysis_unsafe — all na_allowed upstream), 5 ? placeholders (version_semver / version_tags / test_continuous_integration / dynamic_analysis / dynamic_analysis_enable_assertions)
  • Schema source: criteria/criteria.yml top-level '0': block on coreinfrastructure/best-practices-badge

Scorecard is observational per board ruling (stretch ≥ 8.0/10). The OpenSSF Best Practices passing badge is the only hard gate. Final flip from in_progress to passing on https://www.bestpractices.dev/en/projects/12648 stays board-owned admin-UI work.

Board action items (cannot land via workflow file)

These are repo Settings toggles and bestpractices.dev admin-UI work that I do not have access to from a workflow:

  • Settings → Branches: require signed commits on main, require PR before merging, require status checks (Scorecard analysis + Security workflow), require linear history
  • Settings → Code security: enable secret scanning + push protection, enable Dependabot security updates
  • Settings → Code security → Code scanning: enable CodeQL default setup with actions language (PowerShell isn't supported by CodeQL default setup; Semgrep covers the PowerShell tree)
  • bestpractices.dev/en/projects/12648: visit edit URL — autofill consumes .bestpractices.json — review/save each section, flip badge in_progress → passing, post @TechLead approved on RAN-60

Test plan

  • Scorecard workflow lints clean and runs on push + cron schedule
  • Security workflow runs all six tools (Semgrep / OSV-Scanner / Trivy / Gitleaks / jscpd / Syft SBOM) with non-zero exit on High/Critical
  • OSV-Scanner pulled from binary release (RAN-55 hotfix) — google/osv-scanner-action upstream broke
  • .bestpractices.json validates as JSON; all 67 criteria carry _status + _justification; 7 carry _url per met_url_required upstream flags
  • All third-party actions pinned by commit SHA (Scorecard Pinned-Dependencies check)

🤖 Generated with Claude Code

aksOps and others added 2 commits April 20, 2026 09:09
…RAN-55)

Adapt the codeiq RAN-46/RAN-52 recipe to vigil's PowerShell + WPF tree:

- Add CLAUDE.md (architecture, conventions, OpenSSF observability target)
- Add SECURITY.md (private disclosure, scope, hardening references)
- Add AGENTS.md (agent collaborator entry-point)
- Add .bestpractices.json (project_id 12648, level: passing, evidence map)
- Add .github/workflows/scorecard.yml (push to main + Mondays 06:00 UTC,
  SHA-pinned actions, SARIF + artifact)
- Add .github/workflows/security.yml — (B) OSS-CLI stack:
  Semgrep / OSV-Scanner / Trivy / Gitleaks / jscpd / Syft SBOM,
  language-adapted (PowerShell tokenization for jscpd, no Maven/npm bits)
- Add .github/dependabot.yml (github-actions only — vigil has no
  language lockfile)
- README.md: add OpenSSF Best Practices + Scorecard badges
- LICENSE: align copyright with project precedent (Amit Kumar)

Per board ruling: Scorecard is observational only (stretch >= 8.0/10);
the OpenSSF Best Practices `passing` badge is the only hard gate. Final
flip from `in_progress` to `passing` on bestpractices.dev is admin-UI
work and stays board-owned.

Board action items (cannot land via workflow file):
- Enable signed-commit branch protection on main
- Enable secret scanning + push protection
- Enable Dependabot security updates
- Flip bestpractices.dev project 12648 from in_progress to passing

Closes RAN-55 (after the board-side toggles + bestpractices.dev flip).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

aksOps and others added 2 commits April 26, 2026 02:59
The pinned `google/osv-scanner-action@c5185470…` (v2.3.5) ships an
`action.yml` that is composite-only and missing the top-level `runs:`
section, so GitHub rejects it as a job step with:

  Top level 'runs:' section is required for
  google/osv-scanner-action/.../action.yml

Codeiq hit the same trap on its RAN-52 follow-up and switched to
installing the official `osv-scanner` binary via `gh release download`.
Mirroring that pattern here, adapted for vigil:

- env: OSV_SCANNER_VERSION=2.3.5, GH_TOKEN=github.token
- gh release download `osv-scanner_linux_amd64` from
  `google/osv-scanner` v2.3.5 (pattern match → mv to stable name)
- Smoke `./osv-scanner --version` so future regressions surface
  clearly instead of exit 127
- Recursive source scan (`--recursive --skip-git ./`); vigil has no
  language lockfile today, so the run exits with no findings.
  Coverage activates automatically once a `*.lock` lands in-tree.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Replace custom group structure (status / evidence / audit blocks) with
bestpractices.dev's canonical flat per-criterion schema so the autofill
robot pre-fills the criteria page on board flip. All 67 passing-level
criteria (43 MUST, 10 SHOULD, 14 SUGGESTED) carry _status,
_justification, and (where required by upstream criteria.yml) _url.

Status distribution: 62 Met, 4 N/A (release_notes / release_notes_vulns
/ version_semver / version_tags — vigil ships no formal release line),
1 Unmet (test_continuous_integration — Test-Vigil.ps1 not yet wired into
GHA), 2 ? (dynamic_analysis, dynamic_analysis_enable_assertions).

Schema source: criteria/criteria.yml top-level '0:' block on
coreinfrastructure/best-practices-badge.

Companion to RAN-57 (codeiq), RAN-58 (otelcontext), RAN-59 (snipIT).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@aksOps aksOps changed the title feat(security): OpenSSF Best Practices + Scorecard scaffolding (RAN-55) feat(security): OpenSSF Best Practices + Scorecard scaffolding (RAN-55, RAN-60) Apr 26, 2026
@aksOps aksOps merged commit bce5f30 into main Apr 26, 2026
10 checks passed
aksOps added a commit that referenced this pull request Apr 26, 2026
…a (RAN-55) (#3)

Closes the last two `Unmet` blockers from the bestpractices.dev/projects/12648
audit (board comment on RAN-55):

- `release_notes` Unmet → Met. Add CHANGELOG.md (Keep a Changelog 1.1.0
  format) with an [Unreleased] section that catalogues what landed in PR
  #1: OpenSSF scaffolding, OSV-Scanner CI fix, debounced-search-on-close
  fix, deep-review fixes, LICENSE attribution, Security adoption notes.
  Pre-1.0 the commit SHA on `main` is the version identifier; the
  [Unreleased] block rolls into a versioned heading when the first tag
  is cut.

- `documentation_basics` Unmet ("No appropriate folder found") → Met.
  Add docs/ folder with: docs/README.md (index), docs/architecture.md
  (5-phase startup, repo shape, runtime invariants, stack), docs/install.md
  (requirements, run + flags, tests, update path), docs/troubleshooting.md
  (preflight bitmap, CLM / AppLocker / EDR blockers, DPAPI store recovery),
  docs/security.md (threat model, hardened invariants, crypto, distribution
  integrity).

- Update .bestpractices.json:
    * documentation_basics_status: Met (now backed by docs/ folder; URL
      added pointing at the tree)
    * release_notes_status: N/A → Met (URL added pointing at CHANGELOG.md)
    * release_notes_vulns_status: N/A → Met (URL added pointing at
      CHANGELOG.md#security)

Co-authored-by: Paperclip <noreply@paperclip.ing>
@aksOps aksOps deleted the feat/ran-55-openssf-best-practices branch April 26, 2026 05:51
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.

2 participants