diff --git a/SECURITY.md b/SECURITY.md index 94b0127..af5aab6 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,20 @@ ## Supported versions -Only the latest release gets security fixes: from 1.0.0 on, the latest 1.x. Release candidates (`vX.Y.Z-rc.N` pre-releases, for review) and versions older than 1.0.0 get none. +Only the latest release is supported. It gets bug and security fixes until the next +release replaces it; a fix ships as a new release, never as a change to an old one, so +updating is how you get it. The browser stores update the extension for you; a server you +run yourself you update by hand (the release notes say how). + +| Version | Support | +| --- | --- | +| The latest release (see [Releases](https://github.com/ScriptKittyOS/kotiko/releases/latest)) | Bug and security fixes, until the next release | +| Any older release, including earlier 1.x | None: update to the latest | +| Release candidates (`vX.Y.Z-rc.N` pre-releases, for review) and versions before 1.0.0 | None | + +The extension works with a Kotiko server of the same minor version and the one before it +(extension 1.1 with server 1.0 and 1.1); each release's notes state it. For help that isn't +a security report, see [kotiko.org](https://kotiko.org/) or open an issue. ## Reporting a vulnerability diff --git a/docs/CODE_REVIEW.md b/docs/CODE_REVIEW.md index c2aa4b8..fbcaec3 100644 --- a/docs/CODE_REVIEW.md +++ b/docs/CODE_REVIEW.md @@ -1,6 +1,6 @@ # Code review -Last reviewed: 2026-10-06. +Last reviewed: 2026-12-05. How a change to Kotiko is reviewed: who reviews, what they check, and what a change needs before it merges. It applies to every pull request, from a maintainer, a contributor or an @@ -15,9 +15,11 @@ agent. The rules contributors follow while writing a change are in A red check is the author's to fix, not the reviewer's to wave through. 2. **One reviewer who isn't the author** reads the whole diff on GitHub and leaves a review: *Approve*, or *Request changes* with each problem as a comment on its line. - While Kotiko has few maintainers, the lead maintainer may merge their own change after - CI passes. GOVERNANCE.md and MAINTAINERS.md say who the maintainers are, and the aim - is that every change gets a second person's review. + The `main` ruleset requires this approval for every change, from every account (since + 2026-12-05), and a new commit dismisses it, so the approval is always of the final + version. An agent never approves: its approval would come from a maintainer's account + without a second person behind it. GOVERNANCE.md and MAINTAINERS.md say who the + maintainers are. 3. **Every review thread is resolved** before merging (the ruleset enforces this), either by a change or by a reply the reviewer accepts. 4. **Merge** with a merge commit. The author or a maintainer merges; nobody bypasses the diff --git a/docs/best-practices.md b/docs/best-practices.md index b40a5a6..305bef3 100644 --- a/docs/best-practices.md +++ b/docs/best-practices.md @@ -1,7 +1,7 @@ # OpenSSF Best Practices answers -Last reviewed: 2026-10-06; the answers about releases and tags updated 2026-12-05, after -v1.0.0 and v1.0.1. +Last reviewed: 2026-10-06; the answers about releases, tags and review updated 2026-12-05, +after v1.0.0, v1.0.1 and v1.0.2. Kotiko's answers to the [OpenSSF Best Practices badge](https://www.bestpractices.dev) criteria, kept in the repository so the claims sit next to the code that backs them. The @@ -54,7 +54,7 @@ request, then on the form. The plan behind it is slice Passing needs every MUST met or N/A, every SHOULD met or explained, and every SUGGESTED answered. Every criterion is met or N/A today; the last unmet one, `version_tags`, is met -since the signed tags of v1.0.0 and v1.0.1. +since the signed tags of v1.0.0, v1.0.1 and v1.0.2. What has to happen for the badge, and to keep it, and who does it: @@ -91,9 +91,9 @@ What has to happen for the badge, and to keep it, and who does it: | `repo_track` | MUST | Met | git records every change with its author and date. https://github.com/ScriptKittyOS/kotiko/commits/main | `git log` | – | | `repo_interim` | MUST | Met | Every change to main goes through a pull request (a ruleset requires pull requests and eight passing CI checks), and the full history with its interim commits is public, not only releases. https://github.com/ScriptKittyOS/kotiko/pulls?q=is%3Apr | `git log --merges` (44 merges); ruleset 24531669 | – | | `repo_distributed` | SUGGESTED | Met | git, hosted on GitHub: https://github.com/ScriptKittyOS/kotiko | – | – | -| `version_unique` | MUST | Met | Each release has its own SemVer version (0.1.0 and 0.2.0 privately, then 1.0.0 and 1.0.1), kept identical in the server, the extension manifest and the release manifest; CI fails if they differ. | `server/mix.exs:11`; `extension/manifest.json:5`; `.release-please-manifest.json`; `node scripts/check-versions.mjs`: all 1.0.1, exit 0 (2026-12-05) (CI job "versions and licenses", `.github/workflows/ci.yml:131`) | – | +| `version_unique` | MUST | Met | Each release has its own SemVer version (0.1.0 and 0.2.0 privately, then 1.0.0, 1.0.1 and 1.0.2), kept identical in the server, the extension manifest and the release manifest; CI fails if they differ. | `server/mix.exs:11`; `extension/manifest.json:5`; `.release-please-manifest.json`; `node scripts/check-versions.mjs`: all 1.0.2, exit 0 (2026-12-05) (CI job "versions and licenses", `.github/workflows/ci.yml:131`) | – | | `version_semver` | SUGGESTED | Met | Semantic Versioning; release-please derives versions from Conventional Commits. | `CHANGELOG.md:209,217`; `release-please-config.json`; `.release-please-manifest.json` | – | -| `version_tags` | SUGGESTED | Met | Every release has a signed vX.Y.Z tag (v1.0.0 and v1.0.1, and v1.0.0-rc.1 to rc.4 for the release candidates), which the release pipeline verifies before it builds anything. Tag rulesets let only the release manager create release tags and keep every tag from being moved or deleted (organization admins can bypass them). https://github.com/ScriptKittyOS/kotiko/tags | `git ls-remote --tags origin`: v1.0.0-rc.1 to rc.4, v1.0.0, v1.0.1 (2026-12-05); `gh release list`: the same releases; rulesets "release tags: only the release manager creates them" and "tags are permanent"; `.github/workflows/release.yml` | – | +| `version_tags` | SUGGESTED | Met | Every release has a signed vX.Y.Z tag (v1.0.0, v1.0.1 and v1.0.2, and v1.0.0-rc.1 to rc.4 for the release candidates), which the release pipeline verifies before it builds anything. Tag rulesets let only the release manager create release tags and keep every tag from being moved or deleted (organization admins can bypass them). https://github.com/ScriptKittyOS/kotiko/tags | `git ls-remote --tags origin`: v1.0.0-rc.1 to rc.4, v1.0.0, v1.0.1, v1.0.2 (2026-12-05); `gh release list`: the same releases; rulesets "release tags: only the release manager creates them" and "tags are permanent"; `.github/workflows/release.yml` | – | | `release_notes` | MUST [URL] [N/A J] | Met | Human-readable release notes for every release, written for users, not a git log: https://github.com/ScriptKittyOS/kotiko/blob/main/CHANGELOG.md | `CHANGELOG.md:1-219`; `scripts/release-notes.mjs` (notes for each GitHub release) | – | | `release_notes_vulns` | MUST [N/A J] | N/A | No publicly known vulnerability (with a CVE or similar) has been fixed in a release. The one security fix so far (0.2.0, an authentication bypass found by our own review, never public) is still named in the 0.2.0 notes. Future notes list every advisory and CVE (SECURITY.md, What happens after you report, step 6). | `CHANGELOG.md:214-215`; `SECURITY.md:37-38`; `gh api repos/ScriptKittyOS/kotiko/security-advisories`: none | – | @@ -241,7 +241,7 @@ earned, and gold once silver is; the answers can be entered before that. | `crypto_certificate_verification` | MUST [J] | Met | The server makes HTTPS requests with Req (Mint over Erlang/OTP ssl), which verifies the certificate chain and host name by default; Kotiko's code sets no verify option anywhere. The extension's requests go through the browser, which always verifies certificates. | `grep -rniE` for verify_none and rejectUnauthorized over `server/lib server/config extension`: no match; `server/lib/kotiko/llm/client.ex:41` (only a connect timeout is set) | – | | `crypto_verification_private` | MUST [J] | Met | Certificate verification happens in the TLS handshake, before any HTTP request is sent, so the Authorization header and API keys are sent only after the certificate is verified. Kotiko uses no cookies. | As for crypto_certificate_verification; `docs/security/assurance-case.md:131` (token in a header, never a cookie) | – | | `signed_releases` | MUST [J] [N/A J] | Met | Every release is signed: the release manager signs the tag with their own SSH key, listed in .github/allowed_signers; the workflow refuses a tag not signed by a key listed there on main, builds the zips reproducibly, and publishes them with SHA256SUMS, a CycloneDX SBOM and Sigstore build-provenance attestations (keyless, so no signing key is stored on GitHub). v1.0.0 and v1.0.1 were published this way. How users verify: https://github.com/ScriptKittyOS/kotiko/blob/main/docs/verify.md | `.github/workflows/release.yml:2-17,50-75,140-165`; `.github/allowed_signers:14-15`; `git -c gpg.ssh.allowedSignersFile=.github/allowed_signers verify-tag v1.0.1`: Good "git" signature (2026-12-05); `gh release view v1.0.1`: both zips, the SBOM and SHA256SUMS; `gh api repos/ScriptKittyOS/kotiko/attestations/sha256:`: one attestation; `docs/verify.md:11-52` | – | -| `version_tags_signed` | SUGGESTED [J] | Met | Every release tag (v1.0.0, v1.0.1 and the release candidates) is signed by the release manager and verified by the release workflow against .github/allowed_signers before anything is built. | `git -c gpg.ssh.allowedSignersFile=.github/allowed_signers verify-tag v1.0.0` and `v1.0.1`: Good "git" signature (2026-12-05); `.github/workflows/release.yml:50-75` | – | +| `version_tags_signed` | SUGGESTED [J] | Met | Every release tag (v1.0.0, v1.0.1, v1.0.2 and the release candidates) is signed by the release manager and verified by the release workflow against .github/allowed_signers before anything is built. | `git -c gpg.ssh.allowedSignersFile=.github/allowed_signers verify-tag v1.0.0`, `v1.0.1` and `v1.0.2`: Good "git" signature (2026-12-05); `.github/workflows/release.yml:50-75` | – | | `input_validation` | MUST [J] [N/A J] | Met | Every input from an untrusted source is checked against what is allowed, and refused otherwise: HTTP requests (Host allowlist, exactly one Bearer token, JSON only within size caps, then per-field rules such as text length, canonical language tags, UUID request ids, statuses from a fixed list and limits in range); model answers (the shared word spec: required fields, canonical tags, a script check, length and count caps); server answers in the extension; backup files (format, version, every word re-checked); the server address the user types; and every setting at start. The full table: https://github.com/ScriptKittyOS/kotiko/blob/main/docs/security/assurance-case.md#6-inputs-and-how-each-is-validated | `docs/security/assurance-case.md:141-157`; `server/lib/kotiko/router.ex:20-21`; `extension/lib/backup.js:22-29,88-178`; `extension/lib/url.js:52-82` | – | | `hardening` | SHOULD [J] [N/A J] | Met | Extension pages run under an explicit content security policy (script-src 'self'; object-src 'self') with no inline scripts, and ESLint forbids HTML string sinks (innerHTML, outerHTML, insertAdjacentHTML) so a bug can't turn word data into markup. The server checks the Host header against an allowlist before anything else (against DNS rebinding), caps request bodies, sends no CORS headers, marks answers no-store, binds to loopback by default, compares tokens in constant time, and filters secrets out of logs. Planned: X-Content-Type-Options and similar headers on server responses, and a sandboxed systemd unit. Evidence: https://github.com/ScriptKittyOS/kotiko/blob/main/extension/manifest.json and https://github.com/ScriptKittyOS/kotiko/blob/main/docs/security/assurance-case.md | `extension/manifest.json:46`; `eslint.config.js:10-13,45-49`; `server/lib/kotiko/router.ex:11,20-21,33,214`; `docs/security/assurance-case.md:30,34` | – | | `assurance_case` | MUST [URL] | Met | docs/security/assurance-case.md: the top claim and its sub-claims mapped to arguments and evidence, the threat model (assets, attackers and what each can reach), the trust boundaries (diagram and table), how each secure design principle is applied, the CWE Top 25 and OWASP Top 10 weaknesses that apply and how each is countered, every input and how it is validated, and the residual risks. https://github.com/ScriptKittyOS/kotiko/blob/main/docs/security/assurance-case.md | `docs/security/assurance-case.md:14-41` (claims), `43-66` (threat model), `68-100` (trust boundaries), `102-117` (principles), `119-139` (weaknesses), `141-157` (inputs), `159-183` (residual risks) | Agent: fix the stale lines listed under documentation_current | @@ -277,7 +277,7 @@ earned, and gold once silver is; the answers can be entered before that. | Criterion | Level | Status | Answer | Evidence | Needs | |---|---|---|---|---|---| | `code_review_standards` | MUST [URL] [N/A J] | Met | docs/CODE_REVIEW.md documents how code review is done and what is required: CI's required checks pass first; a reviewer who isn't the author reads the whole diff and approves or requests changes line by line; every review thread is resolved before merging; and a checklist of what must be true (does what it says and matches its spec, tested with a regression test for each fix, trust boundaries and input validation hold, no HTML from data, privacy inventory updated, dependencies within the license and dependency policy, no English or single-language assumption, accessibility and size budgets, docs and changelog, DCO sign-off), plus the standard of evidence for any claim. CONTRIBUTING.md links it. https://github.com/ScriptKittyOS/kotiko/blob/main/docs/CODE_REVIEW.md | `docs/CODE_REVIEW.md`; `CONTRIBUTING.md` "Commits and pull requests"; ruleset 24531669 (`required_review_thread_resolution: true`) | – | -| `two_person_review` | MUST [J] | Unmet | Not yet. Kotiko has a second maintainer since 2026-10-06, who now merges dependency updates, but most merged pull requests (41 of 59 by 2026-12-05) were opened and merged by the same account, with CI as the only check. The next steps are reviews by the second maintainer, then an approving review required on main for every change. | `gh pr list --state all --json reviews`; ruleset 24531669 `required_approving_review_count: 0` | Maintainers: review each other's pull requests, then set the main ruleset to 1 required approval | +| `two_person_review` | MUST [J] | Unmet | Not yet. Kotiko has a second maintainer since 2026-10-06, who now merges dependency updates, but most merged pull requests (41 of 59 by 2026-12-05) were opened and merged by the same account, with CI as the only check. Since 2026-12-05 every change needs a non-author approval to merge (the main ruleset; osps_qa_07_01), and the PRs for 1.0.2 were approved by the second maintainer. This becomes Met once the reviewed changes are at least half of those in a release, expected with 1.1.0. | `gh pr list --state all --json reviews`; ruleset 24531669 `required_approving_review_count: 1` since 2026-12-05 | Maintainers: review each other's pull requests (now enforced); mark Met when the record shows it | | `build_reproducible` | MUST [URL] [N/A J] | Met | The extension zips, the only built release files, are reproducible by anyone: the build uses entries sorted by path, the commit's timestamp, fixed permissions and a pinned pure-JavaScript deflate, so the bytes don't depend on the machine or time zone. The release workflow builds twice and compares, and docs/reproducible-builds.md shows how to rebuild a release from its tag and check it against the published SHA256SUMS. The server is released as source. https://github.com/ScriptKittyOS/kotiko/blob/main/docs/reproducible-builds.md | `docs/reproducible-builds.md:1-57`; `.github/workflows/release.yml:111-118`; two local builds on 2026-10-06 gave identical SHA-256 | Once v1.0.0 exists, have someone outside the project rebuild it and compare (slice 53 section 7.5) | | `test_invocation` | MUST [URL] | Met | npm test (Node's built-in test runner) for the extension and mix test for the server, the standard commands of each ecosystem; npm run e2e runs the Playwright end-to-end tests. https://github.com/ScriptKittyOS/kotiko/blob/main/CONTRIBUTING.md#setup | `package.json:10-11`; `CONTRIBUTING.md:19-30` | – | | `test_continuous_integration` | MUST [URL] | Met | Every change reaches main through a short-lived pull request, and GitHub Actions runs every test suite, the linters and the audits on each pull request and each push to main; main requires 8 checks to pass. https://github.com/ScriptKittyOS/kotiko/actions/workflows/ci.yml | `.github/workflows/ci.yml:5-8`; ruleset 24531669; `gh run list --workflow ci.yml` | – | @@ -307,7 +307,7 @@ The OpenSSF Baseline controls (OSPS Baseline 2026-08-28: 24 at level 1, 19 at le level 3), checked on 2026-10-06 against `main` at 320c948 and the repository's live settings (read-only GitHub API calls). Every control is a MUST; N/A needs a justification. -The first public release, v1.0.0, and v1.0.1 came out on 2026-10-08, after the release candidates v1.0.0-rc.1 to rc.4 (git tag; gh release list). The CHANGELOG's 0.1.0 and 0.2.0 were private versions of the personal tool, never tagged or distributed. Release controls are marked Met only where the release workflow mechanically enforces them (a release cannot be produced without the property), and N/A where the property depends on future work. +The first public release, v1.0.0, and v1.0.1 came out on 2026-10-08, and v1.0.2 on 2026-12-05, after the release candidates v1.0.0-rc.1 to rc.4 (git tag; gh release list). The CHANGELOG's 0.1.0 and 0.2.0 were private versions of the personal tool, never tagged or distributed. Release controls are marked Met only where the release workflow mechanically enforces them (a release cannot be produced without the property), and N/A where the property depends on future work. ## Baseline 1: General @@ -372,14 +372,14 @@ The first public release, v1.0.0, and v1.0.1 came out on 2026-10-08, after the r | `osps_br_07_02` | MUST [N/A J] | Met | docs/stores.md "Secrets" is the policy: every credential belongs to the organization's accounts, not a person's; each is stored only as a GitHub environment secret (release, store-status, eval) with the narrowest scope available, release secrets reachable only from v* tags after maintainer approval; workflows never print them; rotation at least yearly and whenever someone with access leaves, by organization owners, with the steps. Secrets never go in the repository (CONTRIBUTING.md). https://github.com/ScriptKittyOS/kotiko/blob/main/docs/stores.md#secrets | docs/stores.md:96-106, 122-147; CONTRIBUTING.md:45-49 | The release, store-status and eval environments don't exist yet (gh api .../environments: total_count 0); create them as docs/stores.md says before the first release (maintainer) | | `osps_do_03_01` | MUST [N/A J] | Met | docs/verify.md explains how to check a release's integrity and authenticity: the commands (sha256sum -c SHA256SUMS, gh attestation verify for each file, git verify-tag) and the expected output for each; docs/reproducible-builds.md shows how to rebuild the zips byte for byte. https://github.com/ScriptKittyOS/kotiko/blob/main/docs/verify.md | docs/verify.md:1-59; docs/reproducible-builds.md:7-27 | – | | `osps_do_03_02` | MUST [N/A J] | Met | docs/verify.md gives the expected identities: the Sigstore attestation must come from the workflow ScriptKittyOS/kotiko/.github/workflows/release.yml at refs/tags/vX.Y.Z (gh attestation verify with signer-workflow and source-ref), and the tag must be signed by a release manager key listed in .github/allowed_signers and MAINTAINERS.md, cross-checked against the maintainer's GitHub profile keys. https://github.com/ScriptKittyOS/kotiko/blob/main/docs/verify.md | docs/verify.md:11-29, 44-49 | Before v1.0.0: put the release key in .github/allowed_signers (empty today) and its fingerprint in MAINTAINERS.md, whose line 16 still says tags are not signed (maintainer adds the key; agent fixes the wording) | -| `osps_do_04_01` | MUST [N/A J] | Unmet | Releases exist now (v1.0.0 and v1.0.1, 2026-10-08). SECURITY.md states that only the latest release gets security fixes, but the fuller support statement planned before the first release (what support each release gets and for how long) isn't published yet. | git tag and gh release list: v1.0.0-rc.1 to rc.4, v1.0.0, v1.0.1 (2026-12-05); docs/stores.md:8-17; SECURITY.md:3-5 | Add a Support section (scope: bug and security fixes on the latest minor; duration: until the next minor; extension and server compatibility window; where to get help) and drop "before 1.0" wording (agent) | +| `osps_do_04_01` | MUST [N/A J] | Met | SECURITY.md "Supported versions" states the scope and duration of support for each release: the latest release gets bug and security fixes until the next one replaces it; release candidates and versions before 1.0.0 get none; and which server versions each extension version works with (the same minor and one older). Releases so far: v1.0.0 and v1.0.1 (2026-10-08), v1.0.2 (2026-12-05). https://github.com/ScriptKittyOS/kotiko/blob/main/SECURITY.md#supported-versions | `SECURITY.md` "Supported versions"; `scripts/release-notes.mjs` `compatibilityLine` (each release's notes state the compatible server versions); `gh release list` | – | | `osps_do_05_01` | MUST [N/A J] | Met | SECURITY.md "Supported versions": only the latest minor release gets security fixes, so a version stops receiving security updates as soon as a newer minor version is released. https://github.com/ScriptKittyOS/kotiko/blob/main/SECURITY.md#supported-versions | SECURITY.md:3-5; docs/security/requirements.md:69-70 | Update the sentence "Kotiko is before 1.0" at v1.0.0 (agent) | | `osps_gv_04_01` | MUST [N/A J] | Met | GOVERNANCE.md: escalated access (maintainer, which carries merge and release rights) is given after landing changes through the ordinary review process and reviewing someone else's pull request, on a maintainer's proposal (the second maintainer joined by the lead maintainer's invitation, which GOVERNANCE.md states); either way it is recorded by a reviewed pull request to MAINTAINERS.md, and the person is added as a repository collaborator with the Maintain role. Access is removed the day someone steps down or goes inactive. https://github.com/ScriptKittyOS/kotiko/blob/main/GOVERNANCE.md | `GOVERNANCE.md` "How decisions are made" 5 and 6; `MAINTAINERS.md` | – | | `osps_qa_02_02` | MUST [N/A J] | Met | Every release includes a CycloneDX SBOM of the server's production dependencies (kotiko-server-X.Y.Z.cdx.json), generated at build time by the sbom Mix tool and attested with the other files. The extension zips are uncompiled first-party source with no third-party code. v1.0.0 and v1.0.1 include it (kotiko-server-1.0.1.cdx.json). | .github/workflows/release.yml:119-127; server/mix.exs:44; docs/verify.md:61-68 | – | | `osps_qa_04_02` | MUST [N/A J] | N/A | Kotiko is a single repository; there are no subproject repositories in a release. | Repository layout: extension/, server/, spec/, site/ | – | | `osps_qa_06_02` | MUST [N/A J] | Met | CONTRIBUTING.md "Setup" and "Tests" and the developer setup page explain how to run each suite locally (mix test; npm test for unit, DOM and background tests; npm run e2e for end-to-end; the site's own tests), what each covers, and that CI runs them on every pull request and on main, listed in .github/workflows/ci.yml. https://github.com/ScriptKittyOS/kotiko/blob/main/CONTRIBUTING.md#tests | CONTRIBUTING.md:15-36, 55-63; site/src/content/docs/contribute/setup.md:25-66 | – | | `osps_qa_06_03` | MUST [N/A J] | Met | CONTRIBUTING.md "Tests": every pull request that adds or changes behaviour adds or updates automated tests in the same pull request, major new functionality is not merged without tests, and every bug fix adds a regression test that fails without the fix. https://github.com/ScriptKittyOS/kotiko/blob/main/CONTRIBUTING.md#tests | CONTRIBUTING.md:55-63; .github/pull_request_template.md | – | -| `osps_qa_07_01` | MUST [N/A J] | Unmet | Kotiko has one maintainer, so the main ruleset requires a pull request with passing CI but zero approvals; a non-author approval cannot be required until there is a second maintainer. Required review will be turned on when a second maintainer joins. | gh api repos/ScriptKittyOS/kotiko/rulesets/24531669: required_approving_review_count 0; MAINTAINERS.md:12-16; docs/PUBLIC_CHECKLIST.md:15-16 | A second maintainer, then set required approvals to 1 in the main ruleset (maintainer) | +| `osps_qa_07_01` | MUST [N/A J] | Met | Since 2026-12-05 the main ruleset requires an approving review from someone other than the author before any change merges, for every account (no bypass actors). An approval is dismissed when new commits arrive, and every review thread must be resolved. Kotiko has two maintainers, so each can approve the other's changes. | `gh api repos/ScriptKittyOS/kotiko/rulesets/24531669`: `required_approving_review_count: 1`, `dismiss_stale_reviews_on_push: true`, `required_review_thread_resolution: true`, `bypass_actors: []` (2026-12-05); `docs/CODE_REVIEW.md` step 2; MAINTAINERS.md | – | | `osps_sa_03_02` | MUST [N/A J] | Met | docs/security/assurance-case.md sections 2 and 3 are the threat model and attack surface analysis: the assets, each attacker (malicious page, injected script, network attacker, bad model answer, unlisted Telegram user, local user, compromised dependency or Action, malicious pull request), what each can reach, every trust boundary with its control and evidence, and the residual risks. https://github.com/ScriptKittyOS/kotiko/blob/main/docs/security/assurance-case.md#2-threat-model | docs/security/assurance-case.md:43-101, 159-184 | – | | `osps_vm_04_02` | MUST [N/A J] | Met | Kotiko publishes a VEX document (OpenVEX 0.2.0), vex/kotiko.openvex.json, and every release carries it as kotiko-X.Y.Z.openvex.json, checksummed and attested with the other release files. A dependency vulnerability that doesn't affect Kotiko is accepted only with an osv-scanner.toml entry and a not_affected statement with its justification in the VEX document, in the same reviewed pull request; a unit test fails when an accepted finding has no statement. Today nothing is accepted (the earlier node-forge finding left with web-ext's update; the picomatch advisory was withdrawn), so it has no statements. https://github.com/ScriptKittyOS/kotiko/blob/main/vex/kotiko.openvex.json | `vex/kotiko.openvex.json`; `test/unit/vex.test.mjs`; `.github/workflows/release.yml` ("VEX document" step, before "Checksums"); `docs/security/dependency-and-static-analysis-policy.md` "Accepting a finding that can't be exploited"; `osv-scanner.toml` (no `[[IgnoredVulns]]`) | – | | `osps_vm_05_01` | MUST [N/A J] | Met | The dependency and static analysis policy sets the thresholds for dependency findings: what blocks a merge or a release by severity, deadlines to fix (critical 7 days and high 30, for runtime and dev-only alike; medium 60 days for runtime and 90 for dev-only), how an unreachable finding is accepted (osv-scanner.toml with a reason and an expiry date), and which dependency licenses are allowed (following the Apache Software Foundation's categories). https://github.com/ScriptKittyOS/kotiko/blob/main/docs/security/dependency-and-static-analysis-policy.md | `docs/security/dependency-and-static-analysis-policy.md`; `osv-scanner.toml` | – | diff --git a/docs/security/assurance-case.md b/docs/security/assurance-case.md index 5b69272..c595a79 100644 --- a/docs/security/assurance-case.md +++ b/docs/security/assurance-case.md @@ -258,11 +258,12 @@ These match "What you can't expect" in the [requirements](requirements.md). 50,000 signed requests the server remembers at once). - **Response hardening headers** (`X-Content-Type-Options` and similar) are not sent yet; only `/health` sends `cache-control: no-store`. Planned (slice 01 section 7). -- **No enforced second review.** The `main` ruleset requires the CI checks but no - approving review, so one maintainer account (or a stolen token with write access) can - merge its own pull request, including changes to `.github/allowed_signers` and the - workflows. Accepted while one maintainer does nearly all the work - ([CODE_REVIEW.md](../CODE_REVIEW.md), step 2). The release tag and the store upload still +- **Second review: enforced, but two people.** Since 2026-12-05 the `main` ruleset + requires an approving review from someone other than the author, with no bypass, so one + maintainer account (or a stolen token with write access) can no longer merge its own + pull request alone ([CODE_REVIEW.md](../CODE_REVIEW.md), step 2). With two + maintainers, both accounts acting together still can, including changes to + `.github/allowed_signers` and the workflows; code-owner review isn't required. The release tag and the store upload still need the release manager: only they can create a `v*` tag, and the `release` environment's reviewer approves each upload. A pull request can also change a workflow itself, and that change runs on the pull request; only review catches it. diff --git a/docs/stores.md b/docs/stores.md index 56fa4c3..76386fb 100644 --- a/docs/stores.md +++ b/docs/stores.md @@ -129,11 +129,9 @@ All of these are the maintainer's to do; nothing in the repository can do them. The release workflow builds only a tag signed by a key in `.github/allowed_signers`, under the name it was signed with, so a tag can't be moved after a release and an unsigned or renamed one releases nothing. - - `main` takes changes only through pull requests whose required CI checks pass (no force - pushes or deletion, no bypass). It doesn't require an approving review: a maintainer - can merge their own pull request once the checks pass. That is an accepted risk while - one maintainer does nearly all the work ([CODE_REVIEW.md](CODE_REVIEW.md), step 2); - review by a second maintainer is the aim, not yet enforced. + - `main` takes changes only through pull requests whose required CI checks pass and that + someone other than the author approved (no force pushes or deletion, no bypass; the + approval rule since 2026-12-05, [CODE_REVIEW.md](CODE_REVIEW.md), step 2). - GitHub allows push rulesets only on private repositories, so the old push ruleset is disabled; CI's required `secrets` job rejects `.env`, database, private-key and token files and files over 10 MB instead (`scripts/check-forbidden-files.mjs`), along with