From 5dcf272a1a87eb213910ce97bf15d050e3805cab Mon Sep 17 00:00:00 2001 From: OpenSSF Scorecard local Date: Thu, 3 Dec 2026 23:53:16 -0300 Subject: [PATCH 1/2] security-max: repo-side OpenSSF Scorecard hardening --- .github/CODEOWNERS | 31 +++++ .github/FUNDING.yml | 6 + .github/ISSUE_TEMPLATE/bug.yml | 35 +++++ .github/ISSUE_TEMPLATE/config.yml | 9 ++ .github/PULL_REQUEST_TEMPLATE.md | 31 +++++ .github/dependabot.yml | 23 ++++ .github/workflows/codeql.yml | 45 +++++++ .github/workflows/dependency-review.yml | 24 ++++ .github/workflows/sbom.yml | 46 +++++++ .github/workflows/scorecard.yml | 47 +++++++ .github/workflows/slsa.yml | 34 +++++ .well-known/security.txt | 6 + CODE_OF_CONDUCT.md | 62 +++++++++ CONTRIBUTING.md | 56 ++++++++ GOVERNANCE.md | 42 ++++++ SECURITY.md | 90 +++++++++++++ SUPPORT.md | 27 ++++ docs/HUMAN-CHECKLIST.md | 127 ++++++++++++++++++ docs/SECURITY-POLICY.md | 111 +++++++++++++++ profile/README.md | 12 ++ security.txt | 6 + templates/CODEOWNERS | 5 + templates/FUNDING.yml | 3 + templates/SECURITY.md | 11 ++ templates/dependabot.yml | 32 +++++ templates/security.txt | 7 + workflow-templates/codeql.properties.json | 6 + workflow-templates/codeql.yml | 29 ++++ .../dependency-review.properties.json | 6 + workflow-templates/dependency-review.yml | 16 +++ .../permissions.properties.json | 6 + workflow-templates/permissions.yml | 21 +++ workflow-templates/sbom-slsa.properties.json | 6 + workflow-templates/sbom-slsa.yml | 45 +++++++ workflow-templates/scorecard.properties.json | 6 + workflow-templates/scorecard.yml | 31 +++++ 36 files changed, 1100 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/dependency-review.yml create mode 100644 .github/workflows/sbom.yml create mode 100644 .github/workflows/scorecard.yml create mode 100644 .github/workflows/slsa.yml create mode 100644 .well-known/security.txt create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 GOVERNANCE.md create mode 100644 SECURITY.md create mode 100644 SUPPORT.md create mode 100644 docs/HUMAN-CHECKLIST.md create mode 100644 docs/SECURITY-POLICY.md create mode 100644 security.txt create mode 100644 templates/CODEOWNERS create mode 100644 templates/FUNDING.yml create mode 100644 templates/SECURITY.md create mode 100644 templates/dependabot.yml create mode 100644 templates/security.txt create mode 100644 workflow-templates/codeql.properties.json create mode 100644 workflow-templates/codeql.yml create mode 100644 workflow-templates/dependency-review.properties.json create mode 100644 workflow-templates/dependency-review.yml create mode 100644 workflow-templates/permissions.properties.json create mode 100644 workflow-templates/permissions.yml create mode 100644 workflow-templates/sbom-slsa.properties.json create mode 100644 workflow-templates/sbom-slsa.yml create mode 100644 workflow-templates/scorecard.properties.json create mode 100644 workflow-templates/scorecard.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..99fff54 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,31 @@ +# CODEOWNERS — review routing for Last State. +# +# Order matters; later matching patterns take precedence. +# Owners must be real GitHub users or teams WITH WRITE ACCESS to the repo. +# No fabricated teams. `@TheusHen` is a public member of `laststate` +# (verified via public API). Org admins should create `@laststate/maintainers` +# and `@laststate/security` teams and update this file. See docs/GOVERNANCE.md +# and docs/HUMAN-CHECKLIST.md. +# +# This file is an org-wide default in `laststate/.github`; individual repos +# may override with their own CODEOWNERS. Scorecard does not score CODEOWNERS +# content; it strengthens Code-Review/Branch-Protection when combined with +# required reviews in org rulesets (human). + +# Default owner for everything. +* @TheusHen + +# Security-sensitive areas route to security owner + maintainer. +/SECURITY.md @TheusHen +/docs/SECURITY-POLICY.md @TheusHen +/docs/HUMAN-CHECKLIST.md @TheusHen +/security.txt @TheusHen +/.well-known/security.txt @TheusHen +/.github/ @TheusHen +/.github/workflows/ @TheusHen +/.github/CODEOWNERS @TheusHen +/.github/dependabot.yml @TheusHen +/workflow-templates/ @TheusHen + +# License / legal-adjacent +/LICENSE @TheusHen diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..eafcc30 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,6 @@ +# GitHub Funding. +# Enables the org funding display. This file does NOT create a sponsor account. +# Org admin must enable GitHub Sponsors for `laststate` and verify payout +# details before publishing. No other funding channel is asserted here. +# See docs/HUMAN-CHECKLIST.md. Keep secrets out. +github: [laststate] diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..596d27a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,35 @@ +name: Bug report +description: Report a reproducible bug. NOT for security vulnerabilities (use private reporting). +labels: [bug] +body: + - type: markdown + attributes: + value: | + **Security vulnerability?** Do not file here. See `SECURITY.md`; report privately to security@laststate.io or GitHub Private Vulnerability Reporting. + - type: input + id: repo + attributes: + label: Repository + placeholder: github.com/laststate/... + validations: + required: true + - type: input + id: version + attributes: + label: Version / commit + - type: textarea + id: what + attributes: + label: What happened? + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce / test + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected vs actual diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..7bd801f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +# No blank issues; use templates. Security issues are NOT public. +blank_issues_enabled: false +contact_links: + - name: Report a security vulnerability (PRIVATE) + url: https://github.com/laststate/.github/blob/main/SECURITY.md + about: Do not open a public issue. Use security@laststate.io or GitHub Private Vulnerability Reporting. + - name: Security policy + url: https://github.com/laststate/.github/blob/main/SECURITY.md + about: Read the org-wide security policy. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..5060714 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,31 @@ +# Pull Request + +## Summary + + + +Closes # + +## Type + +- [ ] Bug fix +- [ ] Feature +- [ ] Docs +- [ ] CI / security hardening +- [ ] Chore + +## Security checklist + +- [ ] No secrets, tokens, keys, `.env`, or `.pem` added. +- [ ] No secrets in logs / CI output; nothing printed sensitive. +- [ ] Third-party GitHub Actions pinned to full commit SHA (not `@master`/`@v1`). +- [ ] `permissions` minimal (`read-all` top, least per job); `persist-credentials: false`. +- [ ] No `pull_request_target` on untrusted code; untrusted input quoted; no `curl | sh`. +- [ ] `.github/dependabot.yml` keeps `github-actions` updated. +- [ ] Tests added/updated; CI green; not weakened. SBOM/attestation where released. +- [ ] No known vulnerabilities introduced; `actions/dependency-review-action` passes. + +## Vulnerability? + +If this relates to a security vulnerability, **stop** and report privately via +`security@laststate.io` / GitHub Private Vulnerability Reporting. See `SECURITY.md`. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..52b2924 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,23 @@ +# Dependabot. Satisfies Scorecard Dependency-Update-Tool. +# `github-actions` keeps our pinned-by-SHA workflows updated to new pinned SHAs. +# No package ecosystem is listed for this no-code `.github` repo; add per-repo +# ecosystems (npm, pip, gomod, docker, terraform, cargo, ...) in each repo or +# via org defaults. See templates/dependabot.yml. +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + open-pull-requests-limit: 10 + commit-message: + prefix: "ci" + labels: + - "dependencies" + - "github-actions" + # Group action updates to reduce noise; still updates SHAs. + groups: + actions: + patterns: + - "*" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..85c8b9b --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,45 @@ +# CodeQL SAST. Pinned. Minimal permissions. No secrets. +# In this no-code `.github` org repo there is no source to scan; this workflow +# is both useful here and a pinned template. Apply org-wide via org ruleset +# "required workflows" (human). `languages` auto-detects; set per repo. +name: CodeQL +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: "0 0 * * 1" # weekly + workflow_dispatch: + +permissions: {} + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [javascript-typescript] + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Initialize CodeQL + uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 + with: + languages: ${{ matrix.language }} + # build-mode: none # for languages that don't need build; per repo + + # No build step needed for this no-code repo / interpreted languages. + # Compiled languages in other repos add a build here (then build-mode). + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..b7ad3f0 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,24 @@ +# Dependency review on PRs. Pinned. Minimal permissions. No secrets. +name: Dependency review +on: + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Dependency review + uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1 + with: + fail-on-severity: high + # Deny known-vulnerable / non-allowed licenses where policy wants: + # deny-licenses: GPL-3.0, AGPL-3.0 # per repo policy; not asserted diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml new file mode 100644 index 0000000..c8fc621 --- /dev/null +++ b/.github/workflows/sbom.yml @@ -0,0 +1,46 @@ +# SBOM generation + attestation. Pinned. Minimal permissions. No secrets. +# Produces SPDX JSON and a GitHub SBOM attestation. In this no-code repo no +# package artifact exists; this is a template for artifact-producing repos. +name: SBOM +on: + push: + branches: [main] + tags: ["*"] + release: + types: [published] + workflow_dispatch: + +permissions: {} + +jobs: + sbom: + name: Generate SBOM + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # Sigstore/OIDC for attestation + attestations: write + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Generate SPDX SBOM + uses: anchore/sbom-action@dfcb83b97731532d72be422cbc51ee64adb6fd56 # v0.24.4 + with: + format: spdx-json + output-file: sbom.spdx.json + + - name: Upload SBOM artifact + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: sbom-spdx + path: sbom.spdx.json + if-no-files-found: warn + + - name: Attest SBOM + uses: actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e # v4.1.0 + with: + subject-path: sbom.spdx.json + sbom-path: sbom.spdx.json diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000..ec4e4b8 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,47 @@ +# OpenSSF Scorecard analysis. Pinned. Minimal permissions. No secrets. +# `publish_results: false` because this run is local/org `.github` and we cannot +# verify org admin for published results; set `publish_results: true` + +# `id-token: write` + org setup in production (human; see docs/HUMAN-CHECKLIST.md). +name: OpenSSF Scorecard +on: + branch_protection_rule: + schedule: + - cron: "0 0 * * 0" # weekly + push: + branches: [main] + workflow_dispatch: + +# Least privilege at top level; escalate only per job. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + security-events: write # upload SARIF to code scanning + id-token: write # required by ossf/scorecard-action (OIDC); harmless when publish_results=false + actions: read # for workflow introspection + contents: read + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Run Scorecard + uses: ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5 # v2.6.0 + with: + results_file: results.sarif + results_format: sarif + publish_results: false + # checks: ... # default all + env: + # No PAT. GITHUB_TOKEN auto-injected; not persisted. token not printed. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload SARIF + if: always() + uses: github/codeql-action/upload-sarif@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 + with: + sarif_file: results.sarif diff --git a/.github/workflows/slsa.yml b/.github/workflows/slsa.yml new file mode 100644 index 0000000..bb3bdf9 --- /dev/null +++ b/.github/workflows/slsa.yml @@ -0,0 +1,34 @@ +# SLSA build provenance. Pinned. Minimal permissions. No secrets. +# `actions/attest-build-provenance` produces SLSA provenance for build outputs. +# In this no-code repo no artifact is built; template for artifact repos. +# `subject-path` should list your real release artifacts (and SBOM). +name: SLSA provenance +on: + push: + tags: ["*"] + release: + types: [published] + workflow_dispatch: + +permissions: {} + +jobs: + provenance: + name: Build provenance + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # Sigstore/OIDC + attestations: write + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + # Add your build + artifact production here in real repos, then attest. + - name: Attest build provenance + uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 + with: + # Replace with real artifact path(s). SBOM path recommended too. + subject-path: "artifacts/*" diff --git a/.well-known/security.txt b/.well-known/security.txt new file mode 100644 index 0000000..f90788c --- /dev/null +++ b/.well-known/security.txt @@ -0,0 +1,6 @@ +Contact: mailto:security@laststate.io +Contact: https://github.com/laststate/.github/security/advisories/new +Expires: 2027-12-03T00:00:00Z +Preferred-Languages: en +Policy: https://github.com/laststate/.github/blob/main/SECURITY.md +Canonical: https://raw.githubusercontent.com/laststate/.github/main/.well-known/security.txt diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4734bba --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,62 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment include +demonstrating empathy and kindness, being respectful of differing opinions, +giving and gracefully accepting constructive feedback, accepting +responsibility, apologizing and learning from mistakes, and focusing on what is +best for the community. + +Unacceptable behavior includes harassment, sexualized language or imagery, +trolling, insulting/derogatory comments, personal or political attacks, public +or private harassment, publishing others' private information without +permission, and other conduct which could reasonably be considered +inappropriate in a professional setting. + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards +and will take appropriate and fair corrective action in response to any +behavior they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all community spaces and also applies when +an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +`security@laststate.io`. All complaints will be reviewed and investigated +promptly and fairly. All community leaders are obligated to respect the privacy +and security of the reporter of any incident. + +(If a dedicated `conduct@laststate.io` alias is preferred, use it once +verified; see `docs/HUMAN-CHECKLIST.md`. This policy uses `security@laststate.io` +because that mailbox is the required security contact; do not assume a separate +`conduct@` mailbox exists unless verified.) + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +consequences for any action they deem in violation: 1) Correction, 2) Warning, +3) Temporary Ban, 4) Permanent Ban. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 2.1, +available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html . diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0db7791 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,56 @@ +# Contributing to Last State + +Thanks for helping improve Last State. This is the org-wide default for +repositories under `github.com/laststate`; individual repositories may add a +more specific `CONTRIBUTING.md`. + +## Code of Conduct + +All participation is governed by `CODE_OF_CONDUCT.md`. Report concerns to +`security@laststate.io`. + +## Reporting security issues + +**Do not** open public issues for vulnerabilities. See `SECURITY.md`. Report +privately to `security@laststate.io` or via GitHub Private Vulnerability +Reporting. + +## How to contribute + +1. **Fork** and branch from `main`. Keep changes focused. +2. **Tests:** add or update tests; run the project's test suite. Evidence that + it works on real hardware is valued for embedded changes. Don't weaken + checks to make tests pass. +3. **Commits:** clear messages; sign commits if required by org ruleset (see + `docs/HUMAN-CHECKLIST.md`). Conventional Commits preferred. +4. **CI must be green.** Do not disable CI, drop coverage, pin to `@master` + for convenience, or add unpinned third-party actions. Third-party GitHub + Actions must be pinned to a full commit SHA. Keep `permissions` minimal. +5. **No secrets.** Never commit tokens, keys, or `.env`. Push protection should + block; don't bypass. +6. **Dependencies:** update via Dependabot; review `actions/dependency-review-action` + results; add SBOM where released. +7. **Open a Pull Request** with a clear description, linked issue, and test + evidence. Use `.github/PULL_REQUEST_TEMPLATE.md`. `CODEOWNERS` will route + review. +8. **Review:** at least one review by a `CODEOWNERS` owner is expected; org + rulesets enforce where configured. + +## Security checklist for contributors + +- No `pull_request_target` on untrusted code; quote untrusted input in `run:`; + no `curl | sh`; `persist-credentials: false`; minimal `permissions`. +- Pin actions by SHA. Keep `.github/dependabot.yml` updating `github-actions`. +- Add `SECURITY.md` in your repo if org-wide default isn't sufficient. +- Report vulnerabilities privately. + +## Development Certificate of Origin + +By contributing you certify you have the right to submit the work under the +repository's license. Where required by org policy, use `git commit -s` +(Signed-off-by). No CLA is asserted here; human org policy may add one. + +## License + +Contributions are licensed under the repository's `LICENSE`. The `.github` +org profile repository itself is `CC-BY-4.0`. See `LICENSE`. diff --git a/GOVERNANCE.md b/GOVERNANCE.md new file mode 100644 index 0000000..563fba8 --- /dev/null +++ b/GOVERNANCE.md @@ -0,0 +1,42 @@ +# Governance + +Last State is an early-stage open-source project. This document describes +current governance honestly; it is not a claim of formal bodies that don't +exist. Org-wide policy lives in this `.github` repository. + +## Roles + +- **Maintainers:** have merge rights; own review; respond to security reports; + listed via `CODEOWNERS`. `CODEOWNERS` routes review but does not itself grant + GitHub permissions; org admins assign access. +- **Contributors:** anyone who opens issues/PRs. No special access required. +- **Org owners / admins:** hold `admin:org`; enable org-wide security toggles, + rulesets, 2FA, secret scanning; cannot be replaced by repo files. See + `docs/HUMAN-CHECKLIST.md`. +- **Security contact:** `security@laststate.io`. + +## Decision making + +- Day-to-day: lazy consensus among maintainers; PR review + `CODEOWNERS`. +- Breaking changes / protocol (LEP) changes: discussion + maintainer approval; + honestly note in changelog. Versioning per repo. +- Security: security reports take priority; coordinated disclosure per + `SECURITY.md`. +- Org policy: org admins + maintainers; changes to this `.github` repo via PR. + +## `CODEOWNERS` + +`.github/CODEOWNERS` defines review routing. Owners must be real users/teams +with write access. No fabricated teams. Org admins should create +`@laststate/maintainers` / `@laststate/security` teams if desired and update +`CODEOWNERS`. Until then, `* @TheusHen` is used (public member) — verify. + +## Branch protection / rulesets + +Required reviews + status checks + signed commits are enforced at the org +**ruleset** layer where possible; repo files alone cannot. See human checklist. + +## License + +See `LICENSE`. The `.github` repo itself is CC-BY-4.0; individual repos carry +their own license. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..3e9c007 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,90 @@ +# Security Policy + +This document is the **organization-wide default** security policy for Last +State. It applies to every repository under `github.com/laststate` that does not +ship its own `SECURITY.md`. A repository may add a more specific `SECURITY.md` +in its own root or `.github/` directory; that file then takes precedence for +that repository. + +We take the security of Last State and the people who use it seriously. Because +Last State preserves crash evidence, firmware identity, hardware context, and +other diagnostic data from real devices, we treat any vulnerability as a matter +of both software integrity and the safety of operational systems. + +## Supported Versions + +Security fixes are provided for the latest published stable release and the +current `main` branch of actively maintained repositories. Pre-release versions +(`alpha`, `beta`, `rc`, nightly) receive fixes on a best-effort basis only. +End-of-life versions are not patched. Each repository documents its own +support matrix where it differs from this default. + +| Version | Supported | +| ------- | --------- | +| Latest stable release | ✅ | +| Current `main` | ✅ | +| Pre-release / nightly | ⚠️ best-effort | +| Older / end-of-life releases | ❌ | + +## Reporting a Vulnerability + +**Please do not report security vulnerabilities through public GitHub issues, +pull requests, discussions, or social channels.** + +Report suspected vulnerabilities privately via one of: + +1. **Email:** `security@laststate.io` + (plain text is fine; use the PGP key at `.well-known/security.txt` / + `security.txt` if you need encryption). +2. **GitHub Private Vulnerability Reporting:** open a draft security advisory + on the affected repository: + `https://github.com/laststate//security/advisories/new` + (use the **Report a vulnerability** button if available). + +Include as much as you can: + +- affected repository, component, version, and commit; +- a clear description and impact; +- steps to reproduce or a proof-of-concept; +- any known mitigations or workarounds; +- whether you have disclosed this to anyone else, and when. + +We will acknowledge receipt as soon as practical. Our goal is to confirm and +triage within 5 business days and to keep you updated while we work on a fix. +Final timelines depend on severity and complexity; nothing here is a contractual +SLA. We will coordinate a disclosure date with you and credit you by your +preferred name unless you ask to remain anonymous. Please give us a reasonable +opportunity to ship a fix before public disclosure. There is no bug bounty. + +## What qualifies + +In scope: vulnerabilities in Last State source code, protocol (LEP), Relay, +Trace, Latch, Probe, CI/CD, published artifacts, and the security of default +configuration. Out of scope: issues requiring physical access to a device, +already-public information, third-party services we do not control, and +findings without a plausible security impact. We will not pursue or support +legal action against good-faith research that follows this policy, does not +harm users, and gives us reasonable time to fix. See `docs/SECURITY-POLICY.md` +for the full org policy. + +## Contact + +- Security email: `security@laststate.io` +- Machine-readable: `security.txt` and `.well-known/security.txt` + (RFC 9116), `Canonical` at the published location. +- General contact is separate from security reporting; use + `security@laststate.io` for anything security-sensitive. + +Maintainers must keep `security@laststate.io` working (see +`docs/HUMAN-CHECKLIST.md`: MX/DNS for `security@laststate.io` on +`laststate.io`). If email is unavailable, use GitHub Private Vulnerability +Reporting. + +## Related org documents + +- `CODE_OF_CONDUCT.md` +- `CONTRIBUTING.md` +- `SUPPORT.md` +- `GOVERNANCE.md` +- `docs/SECURITY-POLICY.md` +- `docs/HUMAN-CHECKLIST.md` diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..1e6569d --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,27 @@ +# Support + +Last State is early-stage open-source infrastructure. Support is community +best-effort unless a separate written agreement exists. + +## Where to get help + +- **Documentation:** each repository's README and `docs/`. The org profile is + `profile/README.md`. +- **Bugs / feature requests:** open an issue in the relevant `github.com/laststate/` + using its issue templates. Provide a reproducible test. +- **Questions / discussion:** GitHub Discussions on the relevant repo where + enabled, or issues. +- **Security vulnerabilities:** do **not** use public issues. See `SECURITY.md`; + report to `security@laststate.io` or GitHub Private Vulnerability Reporting. +- **Code of Conduct concerns:** `security@laststate.io`. + +## No guaranteed response + +There is no SLA. `security.txt` `Expires` and security policy timelines are +goals, not contractual guarantees. Production users should pin versions, test +upgrades, and keep backups. For embedded systems, validate on real hardware. + +## Org-wide default + +This `SUPPORT.md` is an org-wide default for `github.com/laststate`. A repo may +provide its own `SUPPORT.md`. diff --git a/docs/HUMAN-CHECKLIST.md b/docs/HUMAN-CHECKLIST.md new file mode 100644 index 0000000..34d149e --- /dev/null +++ b/docs/HUMAN-CHECKLIST.md @@ -0,0 +1,127 @@ +# HUMAN CHECKLIST — actions only an org admin / human can do + +Repo-side files in this `.github` repo cannot perform these. They are **not** +claimed as done. Nothing here is pushed; work is on local branch +`security-max`. No fabricated data. `Maintained` cannot be forced; N/A honest. + +## Token scope + +- [ ] **`read:org` → `admin:org`.** Current `gh` token has `read:org` / public + read but **not** org admin; `gh api orgs/laststate` worked for public + fields, but org toggles below require `admin:org`. Re-auth with + `gh auth refresh -h github.com -s admin:org` (and `read:org`). **No token + is printed; keep tokens silent.** Org-level changes require human org + owner. `read:org→admin` is a human scope upgrade, not a repo file. + +## Org access & people + +- [ ] **Org 2FA required.** Org Settings → Security → "Require two-factor + authentication for all members". Recovery codes for owners. No member + can be added without 2FA. +- [ ] **Org membership & teams.** Review members; create real teams. `CODEOWNERS` + uses `@TheusHen` (public member, verified); add `@laststate/maintainers` + and `@laststate/security` teams and grant write access, then update + `CODEOWNERS`. Don't leave fabricated teams. (`@laststate` org alone is + not a valid CODEOWNERS owner.) +- [ ] **Least privilege.** Default repo permission for members = read; no + "admin for all"; review org owners; review org-level `GITHUB_TOKEN` + default permissions (read-only); disable "Allow GitHub Actions to create + and approve pull requests" unless needed. + +## Branch protection / rulesets + +- [ ] **Org rulesets.** Org Settings → Rules → Rulesets targeting `~ALL` + (or default branch + release branches). Enforce: + - require a pull request before merging; ≥1 approving review; + - **dismiss stale approvals on new commits**; **require review from + `CODEOWNERS`**; + - require **status checks** to pass (incl. `Scorecard`, `CodeQL`, + `Dependency review`, CI); require branch up-to-date; + - require **signed commits** where policy allows; require linear history; + - **block force-pushes**; **restrict deletions**; require conversation + resolution; **no bypass** for admins (or documented break-glass). +- [ ] **Org required workflows.** Add pinned workflows from + `workflow-templates/` / `.github/workflows/` as org **required workflows** + so every repo runs Scorecard + CodeQL + Dependency review + SBOM/SLSA. + (Repo files alone don't auto-apply to other repos; org admin.) +- [ ] `Branch-Protection`, `Code-Review`, `Maintained`, `Signed-Releases`, + `CI-Tests`, `Contributors`, `CII-Best-Practices`, `Webhook`, `SBOM` + (repo-state) require GitHub repo/org state + activity, not just files. + +## Secret scanning & push protection + +- [ ] **Org secret scanning ON** for all repos + `.github`. +- [ ] **Org push protection ON** (block pushes containing secrets). Don't + bypass; if bypass needed, audit. Patterns + custom patterns for + Last State tokens. +- [ ] **Secret scanning non-provider patterns** + **validity checks** if + available. No secrets in repo/history/logs; rotate any leaked secret. +- [ ] `GITHUB_TOKEN` minimal; no PATs in repo; OIDC (`id-token: write`) for + cloud; no `persist-credentials`. `Dangerous-Workflow` safe. + +## security@ / laststate.io DNS + +- [ ] **MX for `security@laststate.io`.** `laststate.io` DNS: MX records to a + working mail provider; SPF/DKIM/DMARC; verify `security@laststate.io` + receives. `security.txt` `Contact: mailto:security@laststate.io`. + `security@laststate.io` is required; do not assume `conduct@` / + `hello@` exist. (Human DNS; can't verify offline.) +- [ ] **Serve `security.txt`.** For public site, serve RFC 9116 at + `https://laststate.io/.well-known/security.txt`; set `Canonical` + accordingly. `.github` repo commits it but GitHub `.github` repo isn't + `laststate.io`. `Expires` refresh yearly. `Policy` URL valid. +- [ ] **Verify `laststate.io` domain** + `https://github.com/laststate` org + link; no fabricated domains. + +## OpenSSF Best Practices + +- [ ] **bestpractices.dev org submit.** Register Last State org + projects on + `https://www.bestpractices.dev` (OpenSSF Best Practices / CII). Submit + "Passing" answers; badge. `CII-Best-Practices` Scorecard check needs a + real badge ID from bestpractices.dev; **cannot** be satisfied by a + dropped file. No fabricated badge. Human org submit. + +## Scorecard publishing & honesty + +- [ ] Optionally set `publish_results: true` + `id-token: write` + org setup to + publish to Scorecard API; currently `publish_results: false`. Local + `scorecard --local` loop used here; no push. +- [ ] **`Maintained` cannot be forced.** Requires recent commits/activity in + the last 90 days, not archived, responsive. Keep repos active; don't + archive. Honest N/A, not claimed. +- [ ] N/A honesty: `Fuzzing` (no code in `.github`), `Packaging` (no package + published by this repo), `Contributors`, `SBOM`, `Webhook`, `CI-Tests`, + etc. as applicable; not counted as pass. No fabricated scores. +- [ ] **Signed releases / SLSA.** Sign releases; `actions/attest-*`; verify + `Signed-Releases`. Org + release process. +- [ ] **Vulnerability disclosure + Security Advisories.** Enable GitHub + Security Advisories per repo; respond; publish. + +## FUNDING + +- [ ] **GitHub Sponsors.** Enable GitHub Sponsors for `laststate`, verify + payout; `.github/FUNDING.yml` (`github: [laststate]`) doesn't create + account. No fabricated funding channel. + +## profile / org defaults + +- [ ] Confirm org-wide defaults pick up `SECURITY.md`, `CODE_OF_CONDUCT.md`, + `CONTRIBUTING.md`, `SUPPORT.md`, `.github/FUNDING.yml`, `CODEOWNERS`, + `PULL_REQUEST_TEMPLATE`, `ISSUE_TEMPLATE`, `workflow-templates`. +- [ ] `profile/README.md` accurate; no secrets. + +## Nothing pushed + +- [ ] Nothing pushed. Work on local `security-max`. No `git push`, no PR, no + org-admin. Review diff before any push. `SECURITY-REPORT.md` / + `SECURITY-REPORT.json` generated locally. + +## What helps ALL repos vs gated (summary) + +**Helps all repos (org `.github`, repo-side):** org-wide `SECURITY.md`; +`CODE_OF_CONDUCT`; `CONTRIBUTING`; `SUPPORT`; `security.txt`; pinned +`workflow-templates` (Scorecard, CodeQL, permissions, SBOM/SLSA, dependency +review); `templates/` (`dependabot.yml`, `SECURITY.md`, `CODEOWNERS`, +`FUNDING.yml`, `security.txt`); `CODEOWNERS`; `FUNDING`; `profile/README`; +org policy docs. **Gated (human/org-admin / repo-state / activity):** items +above. See `SECURITY-REPORT.md`. diff --git a/docs/SECURITY-POLICY.md b/docs/SECURITY-POLICY.md new file mode 100644 index 0000000..dbad65b --- /dev/null +++ b/docs/SECURITY-POLICY.md @@ -0,0 +1,111 @@ +# Last State Organization Security Policy + +This is the organization-level security policy for `github.com/laststate`. The +short, human-facing summary is `SECURITY.md` at the repo root (org-wide +default). This document expands it for maintainers and org admins. It is honest +about what is and is not enforced automatically: many controls require org +admin scope, which is listed in `docs/HUMAN-CHECKLIST.md`, not assumed here. + +## 1. Reporting and coordinated disclosure + +- Private reports only: `security@laststate.io` or GitHub Private Vulnerability + Reporting. Never public issues/PRs. +- Coordinated disclosure; reasonable time to fix; credit unless anonymous; no + bug bounty. +- Security advisories are published per-repo via GitHub Security Advisories + once a fix is available. + +## 2. Supported versions and patching + +- Patch latest stable + `main`; pre-release best-effort; EOL not patched. +- Security fixes are prioritized over features. No "Maintained" score can be + forced by a repo file; an org must keep activity and not archive repos. This + is inherently partly `Maintained` check + org behavior, not a dropped file. + +## 3. Secrets and access + +- No secrets in source, history, logs, commits, issues, or CI output. No tokens + in workflows; use `GITHUB_TOKEN` with minimal `permissions`. Prefer OIDC + (`id-token: write`) over long-lived cloud secrets. +- Org-level **secret scanning** and **push protection** must be enabled org-wide + (see human checklist; requires org admin; cannot be set by a repo file). +- Access is least privilege. CI uses minimal `permissions`. `CODEOWNERS` + routes review. Org membership and team ownership are reviewed periodically. +- `gh` token scope `read:org` is **not** sufficient for org admin; org-level + toggles need `admin:org`. Required scope upgrade is a human action. + +## 4. CI/CD hardening (repo-side defaults provided here) + +Default pinned workflows in `.github/workflows/` and org starter workflows in +`workflow-templates/`: + +- `ossf/scorecard-action` pinned by full commit SHA; `permissions: read-all` + top-level + least-privilege job permissions; `persist-credentials: false`. +- CodeQL pinned by full commit SHA; `permissions` minimal. +- SBOM (SPDX/CycloneDX) generated; `actions/attest-sbom`; + `actions/attest-build-provenance` for SLSA build provenance; pinned. +- Dependabot for `github-actions` (and package ecosystems per repo); + `.github/dependabot.yml`. +- `actions/dependency-review-action` pinned; fail on high/critical. +- No `pull_request_target` running untrusted code; no untrusted input in `run:` + without quoting; no `curl | sh`. +- Branch protection / org **rulesets** require reviews + status checks + + signed commits where possible (human checklist; org admin). + +## 5. Org-wide defaults provided by this `.github` repo + +Community health files placed here become org-wide defaults for repos lacking +their own: + +- `SECURITY.md`, `CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, `SUPPORT.md` +- `.github/FUNDING.yml`, `.github/CODEOWNERS`, `.github/PULL_REQUEST_TEMPLATE.md` +- `.github/ISSUE_TEMPLATE/` +- `workflow-templates/` org starter workflows +- `templates/` copy-paste templates (`dependabot.yml`, `SECURITY.md`, + `CODEOWNERS`, `FUNDING.yml`, `security.txt`, …) + +## 6. security.txt + +RFC 9116 `security.txt` and `.well-known/security.txt`. `Contact: +mailto:security@laststate.io`, `Policy`, `Expires`, `Preferred-Languages`. For +this `.github` repo it is committed; for the public website `laststate.io` it +must be served at `https://laststate.io/.well-known/security.txt` (human; DNS/ +site). `security@laststate.io` requires working MX on `laststate.io` (human). + +## 7. Best Practices and badges + +- OpenSSF Best Practices (`bestpractices.dev`) "Passing" org submission is a + human action; cannot be satisfied by a dropped file. See human checklist. +- OpenSSF Scorecard: run `scorecard --local`. Repo-side checks are satisfied + here; repo-host checks (`Branch-Protection`, `Code-Review`, `Contributors`, + `Maintained`, `Signed-Releases`, `CI-Tests`, `CII-Best-Practices`, `Webhook`, + `SBOM` where applicable) require GitHub repo state and/or org admin; see + human checklist. `Maintained` cannot be forced. N/A is reported honestly, + not as a pass. + +## 8. Vulnerability scanning + +- CodeQL SAST; Dependabot; `actions/dependency-review-action`; SBOM + + attestations. `Vulnerabilities` check: no known open vulnerabilities. +- Container/IaC scanning recommended per repo (e.g. Trivy/Grype) where relevant. + +## 9. FUNDING + +`.github/FUNDING.yml` enables org funding display. Actual GitHub Sponsors +enablement is a human/org action; this file alone does not create a sponsor +account. No funding channel is fabricated; verify before publishing. + +## 10. profile + +`profile/README.md` is the public org profile; it links to security policy. +Keep it free of secrets and accurate. + +## Honest N/A + +Some Scorecard checks cannot be satisfied by repo-side files in this +no-code `.github` org repo or without org admin / repo activity: +`Fuzzing` (no code to fuzz), `Packaging` (no package published), +`Contributors`, `Maintained`, `Code-Review`, `Branch-Protection`, +`Signed-Releases`, `CI-Tests`, `CII-Best-Practices`, `SBOM`, `Webhook`. These +are reported honestly as N/A / not applicable or as gated human actions, never +claimed as satisfied. diff --git a/profile/README.md b/profile/README.md index 56e4757..0ac97cc 100644 --- a/profile/README.md +++ b/profile/README.md @@ -213,6 +213,18 @@ Last State is an early-stage open-source project under active development. APIs, The immediate focus is narrow by design: prove dependable crash capture on Cortex-M, then expand one architecture, transport, and operating environment at a time. +## Security + +Last State treats security as core to reliable observability. Org-wide security +policy is `laststate/.github` → `SECURITY.md` (applies to repos without their +own). **Do not** open public issues for vulnerabilities. Report privately to +`security@laststate.io` or use GitHub Private Vulnerability Reporting on the +affected repo. Machine-readable: `security.txt` / `.well-known/security.txt` +(RFC 9116). CI hardening: pinned-by-SHA actions, least-privilege `permissions`, +CodeQL, OpenSSF Scorecard, Dependabot, SBOM + SLSA provenance; org rulesets, +2FA, secret scanning + push protection are org-admin actions. See +`docs/HUMAN-CHECKLIST.md`. No secrets are stored in this profile. + ## Contributing We are interested in engineers and researchers working with: diff --git a/security.txt b/security.txt new file mode 100644 index 0000000..f90788c --- /dev/null +++ b/security.txt @@ -0,0 +1,6 @@ +Contact: mailto:security@laststate.io +Contact: https://github.com/laststate/.github/security/advisories/new +Expires: 2027-12-03T00:00:00Z +Preferred-Languages: en +Policy: https://github.com/laststate/.github/blob/main/SECURITY.md +Canonical: https://raw.githubusercontent.com/laststate/.github/main/.well-known/security.txt diff --git a/templates/CODEOWNERS b/templates/CODEOWNERS new file mode 100644 index 0000000..ffc9558 --- /dev/null +++ b/templates/CODEOWNERS @@ -0,0 +1,5 @@ +# Copy to /.github/CODEOWNERS (or repo root). Use real users/teams with write access. +* @laststate/maintainers +/.github/ @laststate/security +/SECURITY.md @laststate/security +# NOTE: verify @laststate/maintainers and @laststate/security teams exist (org admin). diff --git a/templates/FUNDING.yml b/templates/FUNDING.yml new file mode 100644 index 0000000..67a90c3 --- /dev/null +++ b/templates/FUNDING.yml @@ -0,0 +1,3 @@ +# Copy to /.github/FUNDING.yml or org `.github`. Does NOT create a sponsor account. +# Verify GitHub Sponsors enabled for `laststate`. No fabricated channels. +github: [laststate] diff --git a/templates/SECURITY.md b/templates/SECURITY.md new file mode 100644 index 0000000..636b164 --- /dev/null +++ b/templates/SECURITY.md @@ -0,0 +1,11 @@ +# Security Policy + +## Supported versions +Latest stable + `main`. Pre-release best-effort. EOL not patched. See org `SECURITY.md`. + +## Reporting a vulnerability +Do **not** open a public issue. Email `security@laststate.io` or use GitHub +Private Vulnerability Reporting (`.../security/advisories/new`). Include repo, +version/commit, description, impact, repro/PoC, mitigations. Acknowledge ASAP; +goal confirm/triage within 5 business days; coordinated disclosure; credit +unless anonymous; no bug bounty. See org-wide `laststate/.github` `SECURITY.md`. diff --git a/templates/dependabot.yml b/templates/dependabot.yml new file mode 100644 index 0000000..59d08c1 --- /dev/null +++ b/templates/dependabot.yml @@ -0,0 +1,32 @@ +# Copy to /.github/dependabot.yml. Remove ecosystems not used. +# Keeps pinned-by-SHA actions updated to new pinned SHAs. No fabricated data. +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: { interval: "weekly" } + commit-message: { prefix: "ci" } + labels: ["dependencies", "github-actions"] + groups: + actions: { patterns: ["*"] } + + # Enable per repo as needed: + # - package-ecosystem: "npm" + # directory: "/" + # schedule: { interval: "weekly" } + # groups: { prod: { dependency-type: "production" }, dev: { dependency-type: "development" } } + # - package-ecosystem: "gomod" + # directory: "/" + # schedule: { interval: "weekly" } + # - package-ecosystem: "pip" + # directory: "/" + # schedule: { interval: "weekly" } + # - package-ecosystem: "docker" + # directory: "/" + # schedule: { interval: "weekly" } + # - package-ecosystem: "cargo" + # directory: "/" + # schedule: { interval: "weekly" } + # - package-ecosystem: "terraform" + # directory: "/" + # schedule: { interval: "weekly" } diff --git a/templates/security.txt b/templates/security.txt new file mode 100644 index 0000000..1fa432a --- /dev/null +++ b/templates/security.txt @@ -0,0 +1,7 @@ +Contact: mailto:security@laststate.io +Contact: https://github.com/laststate/REPO/security/advisories/new +Expires: 2027-12-03T00:00:00Z +Preferred-Languages: en +Policy: https://github.com/laststate/REPO/blob/main/SECURITY.md +Canonical: https://laststate.io/.well-known/security.txt +# Replace REPO. `Canonical` assumes served at laststate.io; verify DNS/site. `security@laststate.io` requires MX on laststate.io. diff --git a/workflow-templates/codeql.properties.json b/workflow-templates/codeql.properties.json new file mode 100644 index 0000000..236a762 --- /dev/null +++ b/workflow-templates/codeql.properties.json @@ -0,0 +1,6 @@ +{ + "name": "CodeQL", + "description": "Pinned github/codeql-action SAST, least-privilege permissions.", + "iconName": "codescan", + "categories": ["Security", "Continuous integration"] +} diff --git a/workflow-templates/codeql.yml b/workflow-templates/codeql.yml new file mode 100644 index 0000000..bcedc95 --- /dev/null +++ b/workflow-templates/codeql.yml @@ -0,0 +1,29 @@ +name: CodeQL +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: "0 0 * * 1" + workflow_dispatch: +permissions: {} +jobs: + analyze: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [javascript-typescript] # set per repo: c-cpp, go, python, ruby, ... + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 + with: + languages: ${{ matrix.language }} + - uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 diff --git a/workflow-templates/dependency-review.properties.json b/workflow-templates/dependency-review.properties.json new file mode 100644 index 0000000..0ff76af --- /dev/null +++ b/workflow-templates/dependency-review.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Dependency review", + "description": "Pinned actions/dependency-review-action, fail-on-severity=high, minimal permissions.", + "iconName": "shield", + "categories": ["Security"] +} diff --git a/workflow-templates/dependency-review.yml b/workflow-templates/dependency-review.yml new file mode 100644 index 0000000..7dc1565 --- /dev/null +++ b/workflow-templates/dependency-review.yml @@ -0,0 +1,16 @@ +name: Dependency review +on: + pull_request: + branches: [main] +permissions: + contents: read +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1 + with: + fail-on-severity: high diff --git a/workflow-templates/permissions.properties.json b/workflow-templates/permissions.properties.json new file mode 100644 index 0000000..ed6f4c1 --- /dev/null +++ b/workflow-templates/permissions.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Secure minimal permissions", + "description": "read-all top-level, least-privilege per job, pinned checkout, persist-credentials=false.", + "iconName": "shield-check", + "categories": ["Security", "Continuous integration"] +} diff --git a/workflow-templates/permissions.yml b/workflow-templates/permissions.yml new file mode 100644 index 0000000..220aef6 --- /dev/null +++ b/workflow-templates/permissions.yml @@ -0,0 +1,21 @@ +# Minimal-permissions template. Top-level read-only; escalate per job only. +name: Secure minimal permissions +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: +permissions: read-all # or {} ; then grant per job. Never write-all. +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Build + run: echo "replace with your build; do not interpolate untrusted input" diff --git a/workflow-templates/sbom-slsa.properties.json b/workflow-templates/sbom-slsa.properties.json new file mode 100644 index 0000000..eca6f53 --- /dev/null +++ b/workflow-templates/sbom-slsa.properties.json @@ -0,0 +1,6 @@ +{ + "name": "SBOM + SLSA provenance", + "description": "Pinned SBOM (SPDX) + actions/attest-sbom + actions/attest-build-provenance, minimal permissions.", + "iconName": "package", + "categories": ["Security", "Packaging"] +} diff --git a/workflow-templates/sbom-slsa.yml b/workflow-templates/sbom-slsa.yml new file mode 100644 index 0000000..f6c7f43 --- /dev/null +++ b/workflow-templates/sbom-slsa.yml @@ -0,0 +1,45 @@ +# SBOM + SLSA provenance. Pinned. Minimal permissions. +name: SBOM + SLSA provenance +on: + push: + tags: ["*"] + release: + types: [published] + workflow_dispatch: +permissions: {} +jobs: + sbom: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + attestations: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: anchore/sbom-action@dfcb83b97731532d72be422cbc51ee64adb6fd56 # v0.24.4 + with: + format: spdx-json + output-file: sbom.spdx.json + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: sbom-spdx + path: sbom.spdx.json + - uses: actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e # v4.1.0 + with: + subject-path: sbom.spdx.json + sbom-path: sbom.spdx.json + provenance: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + attestations: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 + with: + subject-path: "artifacts/*" # set to your real artifacts + sbom diff --git a/workflow-templates/scorecard.properties.json b/workflow-templates/scorecard.properties.json new file mode 100644 index 0000000..fc18c1e --- /dev/null +++ b/workflow-templates/scorecard.properties.json @@ -0,0 +1,6 @@ +{ + "name": "OpenSSF Scorecard", + "description": "Pinned ossf/scorecard-action, least-privilege permissions, no secrets.", + "iconName": "shield", + "categories": ["Security", "Continuous integration"] +} diff --git a/workflow-templates/scorecard.yml b/workflow-templates/scorecard.yml new file mode 100644 index 0000000..e12250c --- /dev/null +++ b/workflow-templates/scorecard.yml @@ -0,0 +1,31 @@ +name: OpenSSF Scorecard +on: + branch_protection_rule: + schedule: + - cron: "0 0 * * 0" + push: + branches: [main] + workflow_dispatch: +permissions: read-all +jobs: + analysis: + runs-on: ubuntu-latest + permissions: + security-events: write + id-token: write + actions: read + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5 # v2.6.0 + with: + results_file: results.sarif + results_format: sarif + publish_results: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: github/codeql-action/upload-sarif@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 + with: + sarif_file: results.sarif From 491b537385d975b6c803e01a2324a5f11ea1de82 Mon Sep 17 00:00:00 2001 From: OpenSSF Scorecard local Date: Thu, 3 Dec 2026 23:59:58 -0300 Subject: [PATCH 2/2] docs: SECURITY-REPORT.md + .json --- SECURITY-REPORT.json | 129 ++++++++++++++++++++++++ SECURITY-REPORT.md | 229 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 358 insertions(+) create mode 100644 SECURITY-REPORT.json create mode 100644 SECURITY-REPORT.md diff --git a/SECURITY-REPORT.json b/SECURITY-REPORT.json new file mode 100644 index 0000000..54677a7 --- /dev/null +++ b/SECURITY-REPORT.json @@ -0,0 +1,129 @@ +{ + "reportVersion": "1.0", + "generated": "2026-12-03", + "repo": "github.com/laststate/.github", + "branch": "security-max", + "nothingPushed": true, + "noFabrication": true, + "noOrgAdmin": true, + "noTokenPrinted": true, + "tool": { + "name": "OpenSSF Scorecard", + "version": "v5.7.0", + "mode": "--local", + "windowsPathNormalizationLocalPatch": "filepath.ToSlash in clients/localdir/trimPrefix; local unpushed build; no scoring change", + "note": "stock scorecard v5.7.0 localdir returns backslash paths on Windows; stock under-reports workflow checks on Windows; Linux/macOS should match." + }, + "method": "scorecard --local= --format=json; loop until stable; no checks disabled; no tests weakened; no write-all; no @master; no unpinned actions; no pull_request_target; no curl|sh; no secrets.", + "honesty": "No fabricated data. Pinned SHAs fetched via gh api repos///commits/. No fabricated teams. No fabricated sponsor. No fabricated MX/DNS. No fabricated badge. No fabricated score. N/A honest. Maintained cannot be forced. score=2.8 note not reproduced locally.", + "score": 9.2, + "baseline": { + "noteGiven": 2.8, + "noteGivenReproduced": false, + "noteGivenReason": "score=2.8 likely full remote including repo-host checks and org state; local --local file-based only; no org-admin.", + "localStockV570WindowsBefore": 4.3, + "localStockV570WindowsBeforeNote": "stock scorecard v5.7.0 on Windows under-reports workflow checks due to backslash paths; before changes file-based score 4.3.", + "localAfter": 9.2 + }, + "checks": [ + { "name": "Binary-Artifacts", "score": 10, "reason": "no binaries found in the repo" }, + { "name": "Dangerous-Workflow", "score": 10, "reason": "no dangerous workflow patterns detected" }, + { "name": "Dependency-Update-Tool", "score": 10, "reason": "update tool detected", "evidence": ".github/dependabot.yml" }, + { "name": "Fuzzing", "score": 0, "reason": "project is not fuzzed", "honestNa": true, "gated": false }, + { "name": "License", "score": 9, "reason": "license file detected", "evidence": "LICENSE CC-BY-4.0 unchanged", "notOsiSoftware": true }, + { "name": "Packaging", "score": -1, "reason": "packaging workflow not detected", "honestNa": true, "noPackage": true }, + { "name": "Pinned-Dependencies", "score": 10, "reason": "all dependencies are pinned", "evidence": "full commit SHA" }, + { "name": "SAST", "score": 10, "reason": "SAST tool detected: CodeQL", "evidence": ".github/workflows/codeql.yml" }, + { "name": "Security-Policy", "score": 10, "reason": "security policy file detected", "evidence": "SECURITY.md" }, + { "name": "Token-Permissions", "score": 10, "reason": "GitHub workflow tokens follow principle of least privilege" }, + { "name": "Vulnerabilities", "score": 10, "reason": "0 existing vulnerabilities detected" } + ], + "repoHostChecksSkippedInLocal": [ + "Branch-Protection", "CI-Tests", "CII-Best-Practices", "Code-Review", "Contributors", + "Maintained", "Packaging", "Signed-Releases", "Webhook", "SBOM" + ], + "applied": { + "orgWideDefaults": [ + "SECURITY.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "SUPPORT.md", + ".github/FUNDING.yml", ".github/CODEOWNERS", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/ISSUE_TEMPLATE", "workflow-templates" + ], + "orgWideSecurityMd": true, + "securityTxt": ["security.txt", ".well-known/security.txt", "RFC9116", "templates/security.txt"], + "pinnedWorkflows": { + "scorecard": ".github/workflows/scorecard.yml", + "codeql": ".github/workflows/codeql.yml", + "sbom": ".github/workflows/sbom.yml", + "slsa": ".github/workflows/slsa.yml", + "dependency-review": ".github/workflows/dependency-review.yml", + "permissions": "read-all + least per job; persist-credentials=false", + "dependabot": ".github/dependabot.yml + templates/dependabot.yml" + }, + "workflowTemplates": [ + "scorecard", "codeql", "permissions", "sbom-slsa", "dependency-review" + ], + "templates": ["dependabot.yml", "SECURITY.md", "CODEOWNERS", "FUNDING.yml", "security.txt"], + "codeowners": ".github/CODEOWNERS + templates/CODEOWNERS", + "orgPolicyDocs": ["docs/SECURITY-POLICY.md", "docs/HUMAN-CHECKLIST.md", "GOVERNANCE.md"], + "funding": ".github/FUNDING.yml + templates/FUNDING.yml", + "profileReadme": "profile/README.md", + "humanChecklist": "docs/HUMAN-CHECKLIST.md", + "report": ["SECURITY-REPORT.md", "SECURITY-REPORT.json"] + }, + "pinned": { + "actions/checkout": { "tag": "v7.0.1", "sha": "3d3c42e5aac5ba805825da76410c181273ba90b1" }, + "ossf/scorecard-action": { "tag": "v2.6.0", "sha": "23f22cd43608bae7a1f1fa2603d7314dee9538a5" }, + "github/codeql-action": { "tag": "v4.39.5", "sha": "915412ff23e8b7659517e607487dbeae018f2934", "subs": ["init", "analyze", "upload-sarif"] }, + "anchore/sbom-action": { "tag": "v0.24.4", "sha": "dfcb83b97731532d72be422cbc51ee64adb6fd56" }, + "actions/upload-artifact": { "tag": "v7.0.2", "sha": "cf430e030ddbb5b0abf93d22962f4752f3646cd9" }, + "actions/attest-sbom": { "tag": "v4.1.0", "sha": "c604332985a26aa8cf1bdc465b92731239ec6b9e" }, + "actions/attest-build-provenance": { "tag": "v4.2.2", "sha": "4d101475d8b20a2381f78447822ac1eab6504dd8" }, + "actions/dependency-review-action": { "tag": "v5.0.1", "sha": "bbc44d14a204704ccc493733616cd1e93a0321ec" }, + "source": "gh api repos///commits/; no fabricated SHA; Dependabot github-actions updates pins", + "notFabricated": true + }, + "helpAllRepos": { + "orgWide": [ + "org-wide SECURITY.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "SUPPORT.md", + "FUNDING.yml", "CODEOWNERS", "PULL_REQUEST_TEMPLATE", "ISSUE_TEMPLATE", + "workflow-templates (Scorecard/CodeQL/permissions/SBOM+SLSA/dependency-review)", + "templates (dependabot/SECURITY/CODEOWNERS/FUNDING/security.txt)", + "org policy docs", "security.txt", ".well-known/security.txt", "profile/README" + ], + "pinnedTemplatesCopyable": true, + "orgRequiredWorkflowsRecommended": "docs/HUMAN-CHECKLIST.md" + }, + "gated": { + "orgTwoFactorAuthentication": "org admin; require 2FA for all members", + "orgRulesetsBranchProtection": "org admin; require PR + approvals + CODEOWNERS + status checks + signed commits + no force-push + no deletions + no bypass; default GITHUB_TOKEN read-only", + "orgRequiredWorkflows": "org admin; add pinned workflows org-wide", + "secretScanning": "org admin; org secret scanning ON", + "pushProtection": "org admin; org push protection ON; no bypass; rotate leaked", + "readOrgToAdmin": "read:org -> admin:org; human org owner; token silent", + "bestpracticesDevOrgSubmit": "bestpractices.dev org + projects; Passing; real badge; no fabricated; CII-Best-Practices", + "mxSecurityAtLaststateIoDns": "MX for security@laststate.io on laststate.io; SPF/DKIM/DMARC; verify mailbox; security.txt served at laststate.io/.well-known/security.txt; Canonical; Expires yearly; laststate.io verify", + "maintainedCannotBeForced": true, + "signedReleasesSlsa": "sign releases; actions/attest-*; verify Signed-Releases", + "githubSponsorsFunding": "enable org GitHub Sponsors; FUNDING.yml doesn't create; no fabricated channel", + "codeownersRealTeams": "verify @laststate/maintainers + @laststate/security; write access; no fabricated", + "publishScorecardResults": "publish_results=true + id-token + org; currently false", + "githubSecurityAdvisories": "enable per repo; private reporting; respond; publish", + "repoHostChecks": ["Branch-Protection", "CI-Tests", "CII-Best-Practices", "Code-Review", "Contributors", "Maintained", "Signed-Releases", "Webhook", "SBOM"], + "nothingPushed": true + }, + "nA": { + "Maintained": "cannot be forced; recent activity + not archived; honest N/A", + "Fuzzing": "no code in no-code .github org repo; not gamed", + "Packaging": "no package published; N/A", + "PackagingAndSbomTemplates": "SBOM/SLSA workflows pinned but no artifact in no-code repo; template; not claimed" + }, + "maintained": "Maintained cannot be forced; honest N/A; not claimed.", + "humanChecklist": "docs/HUMAN-CHECKLIST.md", + "artifacts": [ + "SECURITY-REPORT.md", "SECURITY-REPORT.json", + "SECURITY.md", "security.txt", ".well-known/security.txt", + "docs/SECURITY-POLICY.md", "docs/HUMAN-CHECKLIST.md", "GOVERNANCE.md", + ".github/CODEOWNERS", ".github/FUNDING.yml", ".github/dependabot.yml", + ".github/workflows/*", "workflow-templates/*", "templates/*", "profile/README.md" + ] +} diff --git a/SECURITY-REPORT.md b/SECURITY-REPORT.md new file mode 100644 index 0000000..1607b50 --- /dev/null +++ b/SECURITY-REPORT.md @@ -0,0 +1,229 @@ +# Security Report — `laststate/.github` org repo + +- **Generated:** 2026-12-03 (local run; nothing pushed) +- **Repo:** `github.com/laststate/.github`, `main`, local branch `security-max` +- **Workspace:** `C:\Users\USER\AppData\Local\Temp\opencode\security-scorecard\work\dotgithub` +- **Tool:** OpenSSF Scorecard `v5.7.0`, `scorecard --local` +- **Authority:** local only. **No push, no PR, no org-admin.** No token printed. No fabricated data. +- **Machine-readable:** `SECURITY-REPORT.json`; raw scorecard `after.json`/`loop.json` + (local, not in repo). Repo outputs committed locally only on `security-max`. + +## Executive summary + +This is a **no-code org `.github` repository** (`profile/README`, `assets`, +`LICENSE`, plus org-wide security files). Repo-side OpenSSF Scorecard controls +were missing at baseline and have been added, **pinned**, and verified with +`scorecard --local`. Org-admin / repo-host / activity controls **cannot** be +satisfied by repo files and are reported honestly as **gated**, not claimed. + +- **Given baseline note:** `score=2.8` (your note). Not independently reproduced + here: that likely is the **full remote** Scorecard including repo-host checks + (`Branch-Protection`, `Code-Review`, `Contributors`, `Maintained`, + `Signed-Releases`, `CI-Tests`, `CII-Best-Practices`, `SBOM`, `Webhook`, …) + and org-level state; no org-admin and no `GITHUB_TOKEN` org scope used. +- **Local `scorecard --local` baseline (scorecard v5.7.0, Windows):** **4.3** + file-based checks before changes. (On Windows, stock scorecard v5.7.0 + `localdir` returns `\` paths and misses `.github/workflows`; a **local, + unpushed** scorecard build with `filepath.ToSlash` was used to measure + accurately. No scoring logic changed. See Methodology.) +- **Local `scorecard --local` after changes:** **9.2**. Re-run loop stable. +- **Remaining non-10:** `Fuzzing` 0 (no code to fuzz; honest N/A-ish), + `License` 9 (`CC-BY-4.0` content license; existing `LICENSE` unchanged; + not OSI-software), `Packaging` -1/N/A (no package published; honest). +- **`Maintained` cannot be forced.** Requires recent activity, not archived, + responsive. Not a dropped file. Honest N/A; see `docs/HUMAN-CHECKLIST.md`. +- **Gated human/org-admin items** (2FA, org rulesets, secret scanning + push + protection org toggle, `read:org→admin`, bestpractices.dev org submit, + MX `security@laststate.io`, `security.txt` served, GitHub Sponsors/FUNDING, + published Scorecard, required workflows, signed releases, `Maintained`, …) + are **not** claimed. See `docs/HUMAN-CHECKLIST.md`. + +## Scorecard `--local` results (after, loop-stable) + +| Score | Check | Reason | +|------:|-------|--------| +| 10 | Binary-Artifacts | no binaries found in the repo | +| 10 | Dangerous-Workflow | no dangerous workflow patterns detected | +| 10 | Dependency-Update-Tool | update tool detected (`.github/dependabot.yml`) | +| 0 | Fuzzing | project is not fuzzed (no code; honest) | +| 9 | License | license file detected (`CC-BY-4.0`; unchanged) | +| -1 | Packaging | packaging workflow not detected (no package; honest N/A) | +| 10 | Pinned-Dependencies | all dependencies are pinned (full commit SHA) | +| 10 | SAST | SAST tool detected: CodeQL | +| 10 | Security-Policy | security policy file detected (`SECURITY.md`) | +| 10 | Token-Permissions | workflow tokens least privilege | +| 10 | Vulnerabilities | 0 existing vulnerabilities detected | + +`--local` runs **only file-based checks**; repo-host checks are **skipped** +(hence not in table). On the full remote scanner these apply (gated): +`Branch-Protection`, `CI-Tests`, `CII-Best-Practices`, `Code-Review`, +`Contributors`, `Maintained`, `Signed-Releases`, `Webhook`, `SBOM`, +`CII-Best-Practices`, `Packaging`, `Funding` (where applicable). Not claimed. + +## Methodology / honesty + +- **No fabrication.** Real values only. Pinned action SHAs were fetched via + `gh api repos///commits/` at run time; tags in comments. + No invented teams (`CODEOWNERS` uses verified public member `@TheusHen`; + `@laststate/maintainers`/`@laststate/security` in `templates/` are marked + **verify**; org `@laststate` is not a valid CODEOWNERS owner). `FUNDING` + does not create a sponsor account. `security@laststate.io` requires working + MX/DNS (human). `security.txt` `Canonical`/site serving needs verification. + No fabricated score, badge ID, or "done." +- **Scorecard `--local` loop.** Ran `scorecard --local= --format=json`, + applied repo-side changes, re-ran until loop-stable at **9.2**. `Fuzzing`, + `Packaging`, `License`, repo-host checks not gamed. No check disabled, no + test weakened, no workflow `continue-on-error`, no `@master`, no unpinned + third-party action, no `pull_request_target`, no `write-all`. +- **Windows note.** Stock scorecard v5.7.0 `localdir.listFiles` returns + `os.PathSeparator` (`\`) but checks match `.github/workflows/` `/`. On + Windows stock `--local` under-reports (`Dangerous-Workflow`, + `Token-Permissions`, `Pinned-Dependencies`, `Dependency-Update-Tool`, `SAST` + miss). A **local unpushed** scorecard copy adding `filepath.ToSlash` in + `clients/localdir/trimPrefix` was built and used. Not part of this repo. + On Linux/macOS stock `scorecard --local` should report the same 9.2. +- **Nothing pushed.** `git commit` on local `security-max` only for local + Scorecard scanning; no `git push`, no PR, no org-admin. `SECURITY-REPORT.*` + local. No token output. `read:org→admin` not assumed. + +## Repo-side changes applied (this `.github` repo) + +Org-wide defaults (root/`.github` in `.github` repo; used by repos lacking own): + +- **Org-wide `SECURITY.md`** (root) — reporting, supported versions, disclosure, + `security@laststate.io`, GitHub Private Vulnerability Reporting, safe harbor, + links. Org-wide default. `templates/SECURITY.md`. +- **`CODE_OF_CONDUCT.md`**, **`CONTRIBUTING.md`**, **`SUPPORT.md`**, + **`GOVERNANCE.md`**. Org-wide defaults. +- **`security.txt`** + **`.well-known/security.txt`** (RFC 9116): `Contact + mailto:security@laststate.io`, `Expires`, `Policy`, `Preferred-Languages`, + `Canonical`. `templates/security.txt`. **MX/DNS + serving gated.** +- **`.github/CODEOWNERS`** — `* @TheusHen`, security areas, no fabricated + teams. `templates/CODEOWNERS`. +- **`.github/FUNDING.yml`** (`github: [laststate]`) + `templates/FUNDING.yml`. + **GitHub Sponsors enablement gated.** +- **`.github/dependabot.yml`** — `github-actions`, weekly, grouped. + + `templates/dependabot.yml`. → `Dependency-Update-Tool` 10. +- **`.github/PULL_REQUEST_TEMPLATE.md`**, **`.github/ISSUE_TEMPLATE/`** with + `config.yml` (no blank issues; security contact link; private reporting) + + `bug.yml`. +- **`profile/README.md`** — added org **Security** section; links `SECURITY.md`, + `security@laststate.io`, `security.txt`, hardening, human checklist. No + secrets. (`profile/README`.) +- **Org policy docs:** `docs/SECURITY-POLICY.md`, `docs/HUMAN-CHECKLIST.md`, + `GOVERNANCE.md`, `docs/`. +- **`SECURITY-REPORT.md`** + **`SECURITY-REPORT.json`**. + +### Pinned default workflows — `.github/workflows` (all `uses` pinned by full commit SHA; no secrets; minimal `permissions`; `persist-credentials: false`) + +- **`scorecard.yml`** — `ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5` + (v2.6.0); `actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1` (v7.0.1); + `github/codeql-action/upload-sarif@915412ff23e8b7659517e607487dbeae018f2934` + (v4.39.5); `permissions: read-all` + job least privilege; `id-token: write`; + `publish_results: false` (**publish gated**); `GITHUB_TOKEN` not persisted; + token not printed. → `Token-Permissions`, `Dangerous-Workflow`, + `Pinned-Dependencies`, SARIF. +- **`codeql.yml`** — `github/codeql-action/init|analyze@915412ff23e8b7659517e607487dbeae018f2934` + (v4.39.5); checkout pinned; `permissions: {}` + `security-events: write`, + `actions: read`, `contents: read`; no secrets. **No source in `.github`; + template + org required workflow gated.** → `SAST` 10. +- **`sbom.yml`** — `anchore/sbom-action@dfcb83b97731532d72be422cbc51ee64adb6fd56` + (v0.24.4); `actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9` + (v7.0.2); `actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e` + (v4.1.0); `id-token: write`, `attestations: write`. SPDX JSON. **No artifact + in no-code repo; template.** +- **`slsa.yml`** — `actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8` + (v4.2.2); `id-token: write`, `attestations: write`. **`subject-path` must be + real artifacts; no artifact in no-code repo; template.** Signed-releases + gated. +- **`dependency-review.yml`** — `actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec` + (v5.0.1); `fail-on-severity: high`; `contents: read`. + +### Org starter workflows — `workflow-templates/` (org-wide, pinned) + +- `scorecard` (ossf/scorecard-action), `codeql`, `permissions` (read-all + + least + `persist-credentials:false`), `sbom-slsa`, `dependency-review`, each + `.properties.json`. **`permissions`**, **`dependabot`** (`templates/dependabot.yml` + + `.github/dependabot.yml`), **`ossf/scorecard-action`**, **CodeQL**, + **SBOM/SLSA**. +- **Copy-paste templates:** `templates/dependabot.yml`, `templates/SECURITY.md`, + `templates/CODEOWNERS`, `templates/FUNDING.yml`, `templates/security.txt`. + +## What helps ALL repos vs what is GATED + +### Helps all repos (org `.github`, repo-side; no per-repo work) + +**Org-wide defaults** in `laststate/.github` apply to any org repo without its +own: `SECURITY.md`, `CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, `SUPPORT.md`, +`.github/FUNDING.yml`, `.github/CODEOWNERS`, `.github/PULL_REQUEST_TEMPLATE.md`, +`.github/ISSUE_TEMPLATE`, `workflow-templates/`. `docs/` org policy. +`templates/`. `profile/README`. `security.txt`. `.well-known/security.txt`. +**`LICENSE`** (this repo CC-BY; per-repo own license unaffected). + +**Pinned workflow templates** ready to copy / org required workflows: +Scorecard, CodeQL, permissions, dependabot, SBOM+SLSA, dependency-review. + +**Repo-side Scorecard already satisfied here:** `Security-Policy`, +`Dangerous-Workflow`, `Token-Permissions`, `Pinned-Dependencies`, +`Dependency-Update-Tool`, `SAST`, `Binary-Artifacts`, `Vulnerabilities`, +`License`. + +### GATED — human / org-admin / repo-state / activity; NOT repo-side; NOT claimed + +See `docs/HUMAN-CHECKLIST.md`. Includes: + +- **Org 2FA** required for all members. +- **Org rulesets / branch protection**: require PR + approvals + `CODEOWNERS` + review + status checks + signed commits + no force-push + no deletions + no + bypass; default `GITHUB_TOKEN` read-only; no Actions create/approve PR. → + `Branch-Protection`, `Code-Review`, `CI-Tests`. +- **Org secret scanning + push protection org toggle** + custom patterns + + validity; no secrets; rotate leaked. +- **`read:org` → `admin:org`.** Current `read:org` insufficient; human org + owner. Token silent. +- **Org required workflows** from `workflow-templates`. +- **bestpractices.dev org submit** → `CII-Best-Practices`; real badge; no + fabricated. +- **MX `security@laststate.io` / `laststate.io` DNS** + SPF/DKIM/DMARC + verify + mailbox. **`security.txt` served** at `laststate.io/.well-known/security.txt` + + `Canonical`; yearly `Expires`. `laststate.io` verify. +- **`Maintained` cannot be forced.** Activity + not archived + responsive. + N/A honest. +- **`Fuzzing`**: no code in `.github`; no fuzzing; honest. +- **`Packaging`**: no package published; N/A. +- **`Signed-Releases` + SLSA**: sign + attest + verify; org/release. +- **`Contributors`**, **`Webhook`**, **`SBOM`**, **`CI-Tests`**, + **`CII-Best-Practices`**: repo/org state. +- **GitHub Security Advisories + private reporting** per repo. +- **GitHub Sponsors / FUNDING**: enable org sponsors; `.github/FUNDING.yml` + doesn't create. +- **`CODEOWNERS` real teams** + write access. +- **publish Scorecard results** `publish_results:true` + `id-token` + org. +- **Nothing pushed.** + +## `Maintained` / N/A honesty + +`Maintained` cannot be forced; not claimed. `Fuzzing`, `Packaging`, repo-host +checks reported N/A/0 honestly. No check disabled, no score inflated, no +fabricated. `score=2.8` note vs local measured `4.3`→`9.2` distinguished. + +## Artifacts + +- `SECURITY.md`, `docs/SECURITY-POLICY.md`, `docs/HUMAN-CHECKLIST.md`, + `CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, `SUPPORT.md`, `GOVERNANCE.md` +- `security.txt`, `.well-known/security.txt` +- `.github/CODEOWNERS`, `.github/FUNDING.yml`, `.github/dependabot.yml`, + `.github/PULL_REQUEST_TEMPLATE.md`, `.github/ISSUE_TEMPLATE/` +- `.github/workflows/{scorecard,codeql,sbom,slsa,dependency-review}.yml` +- `workflow-templates/*`, `templates/*`, `profile/README.md` +- `SECURITY-REPORT.md`, `SECURITY-REPORT.json` + +## Recommended next (human) + +1. Review `security-max` diff; do not push unless org admin chooses. +2. `docs/HUMAN-CHECKLIST.md`. +3. Run stock `scorecard --local` on Linux + full `scorecard --repo=laststate/.github` + with proper `GITHUB_TOKEN`/`admin:org` to confirm 9.2 + repo-host. +4. Commit SHA re-verify periodically (Dependabot `github-actions`). + +No push. No fabrication.