Skip to content

RAN-59: rewrite .bestpractices.json to canonical per-criterion schema#3

Merged
aksOps merged 1 commit intomainfrom
feat/ran-59-canonical-bestpractices
Apr 26, 2026
Merged

RAN-59: rewrite .bestpractices.json to canonical per-criterion schema#3
aksOps merged 1 commit intomainfrom
feat/ran-59-canonical-bestpractices

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented Apr 26, 2026

Summary

Replaces the custom status / evidence / audit group structure (which bestpractices.dev autofill ignores) with the canonical flat per-criterion key/value schema from upstream coreinfrastructure/best-practices-badge criteria.yml '0' block (passing badge): 43 MUST + 10 SHOULD + 14 SUGGESTED = 67 criteria, each populated with <key>_status + <key>_justification, plus <key>_url for the eight criteria where upstream sets met_url_required: true.

This unblocks the bestpractices.dev autofill so the board does not have to hand-type 67 criterion answers when flipping project 12647 to passing.

Status distribution

Tier Met N/A ? Total
MUST 33 10 43
SHOULD 6 4 10
SUGGESTED 7 2 5 14

Honest N/A on na_allowed: true MUSTs

The 10 N/A MUST statuses are upstream-allowed (na_allowed: true in criteria.yml) and reflect honest non-applicability for a single-script PowerShell desktop tool — board reviewer can confirm each on the autofilled form:

  • crypto_published, crypto_floss, crypto_keylength, crypto_working, crypto_password_storage, crypto_random — snipIT does not implement or invoke cryptography.
  • build — snipIT is a single .ps1; pwsh -NoProfile -File ./SnipIT.ps1 is the run path; the .ps1 is the deliverable.
  • release_notes, release_notes_vulns — head-of-main delivery via git clone; no tagged-release flow today (Scorecard Packaging is documented as a known not-a-pass in CLAUDE.md until tagged releases land).
  • dynamic_analysis_fixed — no dynamic-analysis tool integrated; PowerShell on .NET is memory-safe so the criterion's targets (valgrind / ASAN / MSAN) do not apply.

Evidence sources reused from PR #1 (RAN-54)

  • .github/workflows/security.yml — Trivy / Semgrep (p/security-audit + p/owasp-top-ten) / PSScriptAnalyzer (Error severity gate) / Gitleaks (full git history) / jscpd / anchore/sbom-action
  • .github/workflows/scorecard.yml, .github/workflows/test.yml, .github/dependabot.yml
  • SECURITY.md — private GHSA reporting + email + 72h ack / 7d triage / 90d disclosure SLA
  • shared/runbooks/engineering-standards.md §1 (quality gates), §3 (branch/commit/PR rules), §4 (testing tiers), §5 (security)
  • scripts/setup-git-signed.sh — signed-commit setup for branch protection on main
  • LICENSE (MIT, Amit Kumar)

Test plan

  • JSON parses cleanly (python3 -c "import json; json.load(open('.bestpractices.json'))")
  • Key set matches the canonical 67 criteria from criteria.yml '0' block (no missing, no extra) — verified programmatically
  • Every Met criterion with upstream met_url_required: true has a <key>_url field
  • No N/A status used on a criterion where upstream na_allowed is false
  • No empty <key>_justification strings
  • CI: test, parse, trivy, semgrep, psscriptanalyzer, gitleaks, jscpd, sbom, scorecard all green on this PR
  • After merge: board visits https://www.bestpractices.dev/en/projects/12647/edit, confirms autofill populated each criterion with the per-key status + justification + url, flips badge to passing

🤖 Generated with Claude Code

…schema

Strip the custom group structure (status/evidence/audit) — bestpractices.dev
autofill ignores it — and replace with the canonical flat per-criterion
key/value schema from coreinfrastructure/best-practices-badge `criteria.yml`
'0' block (passing badge): 43 MUST + 10 SHOULD + 14 SUGGESTED, each with
`<key>_status` ("Met" / "Unmet" / "N/A" / "?") and `<key>_justification`,
plus `<key>_url` for the eight criteria where upstream sets
`met_url_required: true`.

Per-criterion evidence reuses what shipped in PR #1 (RAN-54): security.yml
gates (Trivy / Semgrep / PSScriptAnalyzer / Gitleaks / jscpd / SBOM),
scorecard.yml, dependabot.yml, signed-commit branch protection,
SECURITY.md disclosure SLA, engineering-standards.md quality gates.

Honest N/A statuses on `na_allowed: true` MUSTs where the criterion does
not apply to a single-script PowerShell tool: crypto_* (project does not
use cryptography), build_* (no compile/build step — .ps1 is the
deliverable), release_notes / release_notes_vulns (no tagged release
flow yet — head-of-main delivery via `git clone`),
dynamic_analysis_fixed (no dynamic analysis tool integrated; PowerShell
on .NET is memory-safe so valgrind/ASAN-class tools do not apply).

This unblocks bestpractices.dev autofill on the project edit page for
project 12647 — board admin OAuth login still required to flip the
badge to passing.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@aksOps aksOps enabled auto-merge (squash) April 26, 2026 03:28
@aksOps aksOps merged commit 31a5bc0 into main Apr 26, 2026
12 checks passed
@aksOps aksOps deleted the feat/ran-59-canonical-bestpractices branch April 26, 2026 03:29
aksOps added a commit that referenced this pull request Apr 26, 2026
…ersioning evidence (#8)

CHANGELOG.md
- [Unreleased] → [v0.1.0] - 2026-04-26 with full Added / Changed / Fixed / Security
  subsections covering PR #1 (RAN-54 baseline + Scorecard hardening), PR #3 (RAN-59
  canonical-schema rewrite), PRs #4/#5 (RAN-64 CHANGELOG + docs/ index), PR #6
  (5 SUGGESTED criteria flips), PR #7 (CONTRIBUTING.md + conventional-URL retargets).
- Fresh empty [Unreleased] section opened at top per Keep-a-Changelog 1.1.0.
- Link refs now point at compare/v0.1.0...HEAD and releases/tag/v0.1.0.

.bestpractices.json
- version_unique_url + release_notes_vulns_url added (both pointing at the v0.1.0
  GitHub Release) so the bestpractices.dev autofill bot has a concrete URL to
  verify alongside _status: Met.
- 5 versioning justifications refreshed to cite the concrete v0.1.0 tag instead of
  forward-looking commitments: version_unique, version_semver, version_tags,
  release_notes, release_notes_vulns. These are the criteria the autofill bot
  verifies by checking actual GitHub Releases / git tags exist.

Once the v0.1.0 signed tag + GitHub Release land post-merge, autofill should flip
release_notes to Met (currently Unmet pending evidence) and the 4 SUGGESTED
versioning criteria stay Met with concrete tag-backed URLs.

Co-authored-by: Paperclip <noreply@paperclip.ing>
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