From 38c8f70675b0cacbaa826896a97e3970858e48ca Mon Sep 17 00:00:00 2001 From: Toni Bergholm Date: Sat, 18 Jul 2026 11:47:08 +0300 Subject: [PATCH] =?UTF-8?q?docs(audit):=20OSTIF=20best-practices=20gap=20a?= =?UTF-8?q?nalysis=20=E2=80=94=2035=20gaps,=20prioritized=20todos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Full audit of the repo against the OSTIF/Least Authority Security Best Practices Guide (github.com/ostif-org/best-practices-guide), run as a gap analysis with a 6-agent validation swarm and three evidence rounds (repo + live GitHub API + live code-scanning surface). - docs/audit/ostif-best-practices-audit.md: the report — 35 gaps (16 Missing / 12 Partial / 2 Divergent / 5 Implicit), confidence ratings, technical details, and the T-1..T-26 prioritized todo plan. - docs/audit/gap-analysis-source.md: the evidence trail with file:line citations and the per-round deltas. --- docs/audit/gap-analysis-source.md | 609 ++++++++++++++++++++ docs/audit/ostif-best-practices-audit.md | 690 +++++++++++++++++++++++ 2 files changed, 1299 insertions(+) create mode 100644 docs/audit/gap-analysis-source.md create mode 100644 docs/audit/ostif-best-practices-audit.md diff --git a/docs/audit/gap-analysis-source.md b/docs/audit/gap-analysis-source.md new file mode 100644 index 00000000..b108775a --- /dev/null +++ b/docs/audit/gap-analysis-source.md @@ -0,0 +1,609 @@ +# Gap Analysis: src-control repository vs. OSTIF/Least Authority Security Best Practices Guide + +## Comparison Direction + +**Current state → Desired state** (unidirectional, as instructed). + +- Current state: the `src-control` repository at + `/Users/tonibergholm/Developer/claude/src-control` (commit `d7106e5` at time of + analysis, plus one untracked file `docs/research/cryptography-audit-options.md`). +- Desired state: the OSTIF/Least Authority "Security Best Practices Guide" + (`README.md`, `01-introduction.md` … `07-milestones.md`), cloned locally to + `/private/tmp/claude-501/.../scratchpad/ostif-guide/`. + +Where a desired-state item concerns GitHub repository configuration not visible +in the file tree (branch protection, secret scanning, private vulnerability +reporting toggle, dependabot security updates), this analysis used `gh api` to +query the live `git-agentic/src-control` GitHub repository directly — these +findings are **verified**, not inferred, and are cited as such. Anything not +checkable even via `gh api` (e.g., org-level settings, mailing-list +subscriptions, individual maintainers' inboxes) is marked **unverifiable from +repo/API** and classified as Implicit. + +## Scope + +Comparison areas follow the guide's six practice areas plus its two framing +chapters (Introduction, "What to do next" — the latter file does not exist in +the cloned guide and was not compared): + +1. Private security reporting pipeline (Ch. 2) +2. Internal vulnerability response policy (Ch. 3) +3. Development/build best practices (Ch. 4) +4. Up-to-date security (Ch. 5) +5. Updated knowledgebase (Ch. 6) +6. Milestones (Ch. 7) + +Excluded: `08-what-next.md` is linked from the guide's README and chapter 7 but +was not present in the cloned guide directory, so it could not be compared — +noted under "Areas Needing Separate Analysis" (not scored as a finding, since +there is no retrievable desired-state content to compare against). + +Files/areas examined in the current state: `SECURITY.md`, `CONTRIBUTING.md`, +`CODE_OF_CONDUCT.md`, `LICENSE`, `README.md`, `CLAUDE.md`, `ARCHITECTURE.md`, +`ROADMAP.md` (incl. `## Deferred`), `docs/THREAT-MODEL.md`, `docs/adr/*`, +`docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`, +`docs/research/cryptography-audit-options.md`, `.github/workflows/{ci,codeql,audit}.yml`, +`.github/dependabot.yml`, `Cargo.toml`/`Cargo.lock`, `apps/desktop/package.json` +and CI coverage of it, `git log` (RustSec/audit/CodeQL commit history), and the +live GitHub repository's `security_and_analysis` block and branch-protection API. + +## Summary + +Compared the src-control repository's security posture, tooling, and documentation against all +six OSTIF/Least Authority Security Best Practices Guide chapters and their self-check items, +current state toward desired state. The project substantially satisfies chapter 2 +(reporting pipeline) and parts of 4/5 (RustSec/CodeQL scanning, dependabot cargo updates), but +has concrete gaps in code-review enforcement, GitHub-native security tooling (secret scanning, +dependabot security updates, private vulnerability reporting, branch protection — all +confirmed disabled or unenforced via the live API), fuzzing/property-based testing, reproducible +builds, OpenSSF Scorecard, npm-side supply-chain scanning for the desktop app, SBOM, an internal +security-incident response process, and an explicit access-privilege/PII inventory. + +| Category | Count | Description | +|----------|-------|-------------| +| Missing | 15 | Elements in desired state with no current state correspondence | +| Partial | 8 | Elements present in both but incompletely covered | +| Divergent | 1 | Elements addressing same concern in incompatible ways | +| Implicit | 4 | Assumed capabilities neither confirmed nor denied | + +Full analysis written to: `/Users/tonibergholm/Developer/claude/src-control/docs/audit/gap-analysis-source.md` + +## Findings + +**GAP-001: No SAST/fuzzing/property-based testing** +- **Category:** Missing +- **Feature/Behavior:** Ch. 4 self-check: "A wide range of testing (e.g., ... testing edge-cases and properties (fuzzing and property-based testing)". +- **Current State:** `grep -rn "fuzz\|proptest\|quickcheck\|property"` across `crates/**/*.rs` and `Cargo.toml` returns only prose comments referencing the word "property" (e.g. `crates/repo/src/rewrap.rs:37`, `crates/repo/src/repo.rs:5337`) — no `proptest`/`quickcheck`/`cargo-fuzz`/`afl` dependency, harness, or fuzz target anywhere in the workspace. `CONTRIBUTING.md:23-26` lists only `cargo test`, `cargo fmt`, `cargo clippy` as the required local bar; `.github/workflows/ci.yml:47-48` runs `cargo test --workspace --all-targets` only. +- **Desired State:** `04-follow.md:7`: "A wide range of testing (e.g., adding integration testing, testing edge-cases and properties (fuzzing and property-based testing), and adding integrated testing in CI". + +**GAP-002: OSS-Fuzz not integrated** +- **Category:** Missing +- **Feature/Behavior:** Ch. 5 self-check: "OSS-Fuzz" as a subscribed/utilized free tool. +- **Current State:** No `.clusterfuzzlite/`, `oss-fuzz` project file, or fuzz target directory exists anywhere in the repository (`find . -iname "*fuzz*"` under crates/ returns nothing beyond prose comments, per GAP-001). +- **Desired State:** `05-up-to-date.md:29`: self-check item "OSS-Fuzz" under SAST tooling. + +**GAP-003: No reproducible-build tooling or verification** +- **Category:** Missing +- **Feature/Behavior:** Ch. 4 self-check: "Determine viability of allowing reproducible builds." +- **Current State:** No reference to `reproducible-builds.org`, deterministic-build flags, `--remap-path-prefix`, or build-attestation tooling anywhere in `Cargo.toml`, CI workflows, or `docs/`. `grep -rn -i "reproducible"` across the repo (excluding `target/`) returns zero matches. +- **Desired State:** `04-follow.md:15`: "If feasible for your project, consider enabling reproducible builds... allowing the ability to prove nothing has been injected during compilation via comparison to the original build." + +**GAP-004: No OpenSSF Scorecard or OWASP ASVS self-guided review** +- **Category:** Missing +- **Feature/Behavior:** Ch. 4 self-check: "Do Self Guided Security Reviews — OpenSSF Security Scorecard / OWASP Application Security Verification Standard." +- **Current State:** `grep -rn -i "scorecard\|ossf\|asvs" .` (excluding `target/`, `node_modules/`) returns zero matches; no `ossf/scorecard-action` workflow exists in `.github/workflows/` (only `ci.yml`, `codeql.yml`, `audit.yml` are present). +- **Desired State:** `04-follow.md:24-26`: self-check "Do Self Guided Security Reviews — [ ] OpenSSF Security Scorecard — [ ] OWASP Application Security Verification Standard." + +**GAP-005: SBOM not produced** +- **Category:** Missing +- **Feature/Behavior:** Ch. 6 self-check: "Create SBOM (if relevant)." +- **Current State:** `find . -iname "*sbom*"` (excluding `target/`, `node_modules/`) returns no results; no `cargo-cyclonedx`, `cargo-sbom`, or SPDX/CycloneDX file/workflow step exists. `Cargo.lock` exists (dependency graph) but is not published or transformed into a shareable SBOM artifact. +- **Desired State:** `06-kb.md:9,18-19`: "Creating a Statement Bill of Materials (‘SBOM’)..." self-check "Create SBOM (if relevant) — Utilize OS tools like awesome-sbom to determine if a SBOM is right for your organization." + +**GAP-006: No npm/frontend dependency audit in CI** +- **Category:** Missing +- **Feature/Behavior:** Ch. 4 self-check: "Reviewing and updating dependencies... integrating dependency checks and static analysis in CI, wherever possible" — applies to every ecosystem in the project, including the Tauri/React frontend. +- **Current State:** `apps/desktop/package.json` declares a full npm dependency tree (React 19, Vite 8, TypeScript 7, `@pierre/*`, Tauri JS bindings). `.github/workflows/ci.yml` only builds/tests the Rust workspace (`cargo test --workspace --all-targets`, `cargo fmt`, `cargo clippy`) — grep for `npm`/`node`/`desktop` in `.github/workflows/*.yml` returns no matches. No `npm audit`, `npm ci`, or JS build/test step exists in any workflow. `.github/dependabot.yml:1-40` configures only `package-ecosystem: cargo` and `package-ecosystem: github-actions` — no `npm` ecosystem entry for `apps/desktop`. +- **Desired State:** `04-follow.md:9`: "Reviewing and updating dependencies, as well as integrating dependency checks and static analysis in CI, wherever possible." + +**GAP-007: GitHub secret scanning and push protection disabled** +- **Category:** Missing +- **Feature/Behavior:** Ch. 4's "internal operational security, including... internal best practices on handling secrets" and Ch. 5's automated-tooling posture both imply repository-native secret-leak defenses as a baseline control. +- **Current State:** Live `gh api repos/git-agentic/src-control` query returns `"security_and_analysis": {"secret_scanning": {"status": "disabled"}, "secret_scanning_push_protection": {"status": "disabled"}, "secret_scanning_non_provider_patterns": {"status": "disabled"}, "secret_scanning_validity_checks": {"status": "disabled"}}` (verified via API, not inferred). The project does have its own commit-time secret scanner (P5, `docs/adr/0017-secret-scanner.md`) that operates on `sc`-tracked content, but that is orthogonal to GitHub's scanning of the Git-hosted mirror/export path and does not cover the GitHub repository surface itself. +- **Desired State:** `04-follow.md:11`: "Reviewing the internal operational security, including, for example, internal best practices on handling secrets." + +**GAP-008: Dependabot security updates disabled at the GitHub repository level** +- **Category:** Missing +- **Feature/Behavior:** Ch. 5 self-check: "Are you able to automate updates for your project?" and the `dependabot-core` reference. +- **Current State:** Live API query: `"dependabot_security_updates": {"status": "disabled"}`. `.github/dependabot.yml` configures scheduled version-update PRs (weekly, cargo + github-actions ecosystems) but the separate GitHub *security*-update toggle (auto-PRs specifically for vulnerability alerts, independent of the `dependabot.yml` schedule) is off. +- **Desired State:** `05-up-to-date.md:15,25,30`: "Enabling automation in updates when securely possible..." self-check "Are you able to automate updates for your project?" and tool reference `github.com/dependabot/dependabot-core`. + +**GAP-009: Code review before merge is practiced but not enforced on `main`** +- **Category:** Partial +- **Feature/Behavior:** Ch. 4 self-check item: "Adhering to best practices in code review in the development process (utilizing GitHub pull requests and requiring code reviews before merging)." +- **Current State:** `git log` shows the project does route changes through PRs in practice (e.g. commit `d7106e5` is `(#70)`, `0d27dfa` is `(#69)`) — the GitHub-pull-request half of the recommendation is present. But live `gh api repos/git-agentic/src-control/branches/main/protection` returns `404 {"message":"Branch not protected"}`: there is no required-review rule, no required-status-check rule, and nothing technically prevents a direct push to `main` bypassing review entirely. The practice exists; the enforcement does not. +- **Desired State:** `04-follow.md:8`: "Adhering to best practices in code review in the development process (utilizing GitHub pull requests and requiring code reviews before merging)." + +**GAP-010: No internal vulnerability-response / triage-ticketing documentation** +- **Category:** Missing +- **Feature/Behavior:** Ch. 3: an internal, documented process for triaging and remediating a received vulnerability report (responsible-member assignment, bug-tracking documentation, remediation planning, third-party communication, verification with the researcher). +- **Current State:** `SECURITY.md:31-59` documents the *external* reporting channel and *timeline commitments* (3-day ack, 7-day status, 90-day coordinated disclosure) but nowhere documents the *internal* steps a maintainer follows on receipt: no named "responsible team member" role, no reference to how a report gets into GitHub Issues/bug-tracking (the standard `docs/agents/issue-tracker.md` process is generic and does not mention security reports or private handling), no remediation-planning or third-party-communication procedure, no verification-with-researcher step documented anywhere in `docs/`. +- **Desired State:** `03-response.md:7-16`: "project teams should create internal processes for handling the reported issues... Assigning responsible team members... Acknowledging the report... Adding the reported vulnerability to any internal bug-tracking or ticketing system... Triaging steps... Planning remediation... Planning any needed outside communication... Performing the verification of the remediation." + +**GAP-011: No documented security-incident response process** +- **Category:** Missing +- **Feature/Behavior:** Ch. 3's second half: an internal process for handling security *incidents* (supply-chain attacks, malware campaigns, infrastructure compromise, data breaches) distinct from vulnerability *reports*. +- **Current State:** No document in `docs/` (including `docs/THREAT-MODEL.md`, which is scoped to cryptographic/protocol boundaries, not operational incident response) addresses what happens if, e.g., a maintainer's signing key is compromised, a dependency is found backdoored post-hoc, or `git-agentic.com`/the GitHub org account is compromised. `grep -rn -i "incident"` across `docs/` and root markdown files returns no process document. +- **Desired State:** `03-response.md:18-23`: "We recommend introducing an internal process for handling security incidents, including but not limited to supply-chain attacks, malware campaigns... infection or other attacks on the project's development or production systems, and data breaches." + +**GAP-012: No documented list of access privileges** +- **Category:** Missing +- **Feature/Behavior:** Ch. 6 self-check: "List of access privileges." +- **Current State:** No document enumerates who holds GitHub org/repo admin, npm/crates.io publish rights, DNS/domain control for `git-agentic.com`, or signing-key custody. `docs/agents/domain.md` and `docs/agents/issue-tracker.md` describe process conventions, not privilege inventories. (The live API shows the querying credential has `"permissions": {"admin": true, ...}` for one account, but no repo document records this or any other maintainer's access level.) +- **Desired State:** `06-kb.md:17`: self-check "List of access privileges." + +**GAP-013: No security-announcement subscription documentation** +- **Category:** Missing +- **Feature/Behavior:** Ch. 5 self-check: subscription to CVEs and security-announcement mailing lists for languages, libraries, dependencies, and tools. +- **Current State:** No document (README, CONTRIBUTING, THREAT-MODEL, or a dedicated ops doc) records that a maintainer is subscribed to RustSec/rust-lang security announcements, crates.io advisories beyond what `cargo-audit`'s live DB fetch covers, Tauri security advisories, or GitHub's own security-advisory feed. The `audit.yml` workflow's daily `cargo-audit` run (`.github/workflows/audit.yml:17-20`) provides automated *detection* of RustSec advisories but is not itself evidence of a human subscription/awareness practice for the broader ecosystem (Node/npm/Tauri CVEs, OS-level toolchain CVEs). +- **Desired State:** `05-up-to-date.md:9-10,20-24`: "Are you subscribed to relevant CVEs? Are you subscribed to the security announcements mailing lists for all languages, libraries, and dependencies related to your project, tools and anything else relevant to it?" self-check enumerates Languages/Libraries/Dependencies/Tools separately. + +**GAP-014: Private vulnerability reporting (GitHub feature) not confirmed enabled** +- **Category:** Missing +- **Feature/Behavior:** Ch. 2's named example channel: "Private vulnerability reporting via Github." +- **Current State:** `SECURITY.md:34-38` *references* GitHub's private vulnerability reporting as an accepted channel ("or GitHub's private vulnerability reporting... on this repository"), but the live `gh api repos/git-agentic/src-control/security-advisories` call succeeds and returns `[]` (an empty list, meaning the endpoint is reachable, which happens whether or not the private-reporting *toggle* is on — the toggle itself is a repo setting not exposed by this endpoint and not queryable without a scope this session's token lacks). Combined with `dependabot_security_updates` and `secret_scanning` both being `disabled` in the same `security_and_analysis` block (GAP-007/GAP-008), and GitHub's UI groups the "Private vulnerability reporting" toggle in that same settings panel, there is a reasonable inference — not proof — that it may also be off. Marking this Missing rather than Implicit because SECURITY.md's own text presents it as a currently-usable channel, which is precisely the claim that cannot be verified from available API scope. +- **Desired State:** `02-pipeline.md:8`: "Private vulnerability reporting via Github" listed as a recommended pipeline mechanism. + +**GAP-015: No legal safe-harbor / security-research authorization language** +- **Category:** Partial +- **Feature/Behavior:** Ch. 2's disclosure-policy content list: "Legal authorization for security research." +- **Current State:** `SECURITY.md` covers reporting channel, expected report contents, and response timelines (lines 31-59) but contains no statement authorizing good-faith security research (e.g., "we will not pursue legal action against researchers acting in good faith and within this policy"), and no reference to consulting legal counsel. +- **Desired State:** `02-pipeline.md:18-27`: disclosure policy should cover "Legal authorization for security research" and "we recommend that project teams consult their legal team to ensure compliance with the applicable law." + +**GAP-016: No `security.txt` at a well-known location** +- **Category:** Missing +- **Feature/Behavior:** Ch. 2's mirroring recommendation: "You can also mirror this on your website at `/.well-known/security.txt` as per RFC 9116." +- **Current State:** `find . -iname "security.txt" -o -iname ".well-known"` returns no results in the repository. Since `git-agentic.com` is an external website (referenced as the GitHub repository's homepage field) not hosted from this repo, this is only a partial check — but no `security.txt` template or generation step exists in-repo either, so there is nothing in the current state feeding such a file even if the website is external. +- **Desired State:** `02-pipeline.md:18`: "You can also mirror this on your website at `/.well-known/security.txt` as per RFC 9116." + +**GAP-017: No bug-bounty-program statement (presence or explicit absence)** +- **Category:** Partial +- **Feature/Behavior:** Ch. 2's disclosure-policy content list: "Existence or absence of a bug bounty program, along with its conditions." +- **Current State:** `SECURITY.md` does not mention a bug bounty program at all, in either direction (no statement that one exists, and no explicit statement that one does not, which the guide asks for as one of the required policy elements). +- **Desired State:** `02-pipeline.md:24`: "Existence or absence of a bug bounty program, along with its conditions." + +**GAP-018: No request for reporter non-disclosure to third parties** +- **Category:** Partial +- **Feature/Behavior:** Ch. 2's disclosure-policy content list: "Request for non-disclosure to third parties." +- **Current State:** `SECURITY.md:53-55` commits the *project* to a 90-day coordinated-disclosure timeline, but nowhere asks the *reporter* to hold the report in confidence until a fix ships or the window elapses — the guide asks for both halves of that coordination to be stated explicitly, and only the project's own commitment is present. +- **Desired State:** `02-pipeline.md:21`: "Request for non-disclosure to third parties" listed as a required disclosure-policy element alongside timeline and legal authorization. + +**GAP-019: `SECURITY.md` contains stale claims relative to shipped phases** +- **Category:** Divergent +- **Feature/Behavior:** Ch. 6's documentation-currency requirement: "Documentation that is current needs to detail the function and safe usage of a project... It should be easily read, well defined." +- **Current State:** `docs/research/cryptography-audit-options.md:139-140` (the project's own newly authored research note) states explicitly: "Reconcile `SECURITY.md` with the current P32 TLS and P33 randomized-protection design before soliciting bids; it currently contains stale pre-P32/P33 claims." This is the project's own internal admission of a documentation-currency defect, which directly contradicts the guide's freshness requirement — not merely an absence, but an acknowledged drift between shipped capability (P32 TLS, P33 randomized protection per `docs/THREAT-MODEL.md:16` and ADR-0042/0043) and what `SECURITY.md` currently asserts. +- **Desired State:** `06-kb.md:7`: "Documentation that is current needs to detail the function and safe usage of a project, its security disclosure process and goals." + +**GAP-020: No documented list of third-party libraries/tools as project documentation** +- **Category:** Partial +- **Feature/Behavior:** Ch. 6 self-check: "List of third party libraries in project" and "List of tools, security practices, goals, etc." +- **Current State:** `CLAUDE.md`'s "Stack & tooling" section (lines ~19-27) names *some* key dependencies (`blake3`, `thiserror`, `hex`, `gix`, `clap`, `anyhow`, RustCrypto AEAD/X25519) as prose explaining architectural quarantine rules, not as a complete, purpose-built inventory; the full list lives only implicitly in `Cargo.lock` (160KB, not meant for human consumption) and `apps/desktop/package.json`. There is no single "third-party libraries and tools" document a user/auditor can read end-to-end, and the npm-side dependency tree is not mentioned in `CLAUDE.md` at all. +- **Desired State:** `06-kb.md:15-16`: self-check "List of third party libraries in project" / "List of tools, security practices, goals, etc." + +**GAP-021: No explicit "does the project store PII" statement** +- **Category:** Missing +- **Feature/Behavior:** Ch. 7 self-check: "Does your project store any user PII?" +- **Current State:** `grep -rn -i "PII\|personal data\|GDPR"` across `docs/`, `CLAUDE.md`, `ARCHITECTURE.md` returns zero matches. Given the project's nature (a VCS with committed-secrets and per-file-encryption features whose whole purpose is storing sensitive user-supplied data — secrets, protected file content, private-branch content), an explicit PII/sensitive-data-exposure statement is a natural fit but does not exist as a standalone, findable assessment. +- **Desired State:** `07-milestones.md:29`: self-check "Does it store any user PII?" + +**GAP-022: No documented milestone/release-triggered security-review cadence** +- **Category:** Partial +- **Feature/Behavior:** Ch. 7: "Maintainers ought to think ahead about when security efforts can be most impactful... changed aspects of a given project... Improvements or releases to a project that change permissions or features." +- **Current State:** `ROADMAP.md`'s per-phase entries (e.g., P28 "Security hardening sweep" at ROADMAP.md ~379-390) show *reactive* security-focused phases exist and are well-documented after the fact, and `docs/research/cryptography-audit-options.md` is a forward-looking milestone artifact for one specific case (professional audit prep) — but there is no standing, generalized policy statement (e.g., in `CONTRIBUTING.md` or a dedicated release-process doc) that every release/major feature/new-dependency addition triggers a security review pass as a matter of course, as opposed to being decided ad hoc per phase. +- **Desired State:** `07-milestones.md:5-9`: "Alterations to a code's function, large releases with new code, or the addition of new third party libraries are all mile markers to consider when planning major security improvements." + +**GAP-023: `git-agentic.com`/website disclosure-policy mirroring unverifiable** +- **Category:** Implicit +- **Feature/Behavior:** Ch. 6's public-documentation-availability requirement: "documentation should be available at locations easily accessible to users such as on any relevant websites and project repositories." +- **Current State:** The repository references an external homepage (`git-agentic.com`, per the live GitHub API's `"homepage"` field) but that website's content is outside this repository and was not fetched/verified as part of this analysis. +- **Desired State:** `06-kb.md:7`: documentation "should be available at locations easily accessible to users such as on any relevant websites and project repositories." Marked Implicit / unverifiable-from-repo. + +**GAP-024: Mailing-list / CVE subscription status for maintainers unverifiable** +- **Category:** Implicit +- **Feature/Behavior:** Ch. 5 self-check items on subscription to security mailing lists. +- **Current State:** No repository artifact (commit history, docs, CI config) can confirm or deny whether individual maintainers are personally subscribed to RustSec-announce, oss-security, Tauri's advisory feed, or GitHub's own advisory notifications for their account/org. +- **Desired State:** `05-up-to-date.md:9-10`. Marked Implicit / unverifiable-from-repo. + +**GAP-025: Internal operational security of developer devices/infrastructure unverifiable** +- **Category:** Implicit +- **Feature/Behavior:** Ch. 4: "internal best practices on handling secrets, security of development devices and infrastructure." +- **Current State:** Nothing in the repository documents developer-machine hardening, 2FA enforcement on the GitHub org, CI runner trust boundaries beyond what GitHub Actions provides by default, or secrets-in-CI hygiene beyond `secrets.GITHUB_TOKEN` usage visible in `.github/workflows/audit.yml:38`. +- **Desired State:** `04-follow.md:11`. Marked Implicit / unverifiable-from-repo (this is inherently outside what a repo snapshot can prove). + +**GAP-026: Legal/jurisdictional incident-reporting-law compliance unverifiable** +- **Category:** Implicit +- **Feature/Behavior:** Ch. 3: "Reporting any security incidents in the country the project team operates in, if required by law." +- **Current State:** No document addresses jurisdiction or legal reporting obligations; the project has no stated legal entity/jurisdiction anywhere in `README.md`, `LICENSE`, or `CONTRIBUTING.md` beyond the Apache-2.0 license text itself. +- **Desired State:** `03-response.md:23`. Marked Implicit — a one-or-few-maintainer OSS project may reasonably have no formal answer yet; this is a genuine silence, not a contradiction. + +**GAP-027: CVE/security-announcement subscription for the desktop-app JS ecosystem is unaddressed by any tooling** +- **Category:** Partial +- **Feature/Behavior:** Ch. 5's "libraries, and dependencies related to your project, tools" scope, applied to `apps/desktop`'s npm stack (React, Vite, TypeScript, Tauri JS bindings, `@pierre/*`). +- **Current State:** The Rust side has a live, scheduled RustSec feed via `cargo-audit` (`.github/workflows/audit.yml:17-20,36`) providing genuine CVE-equivalent coverage for the Rust dependency tree. No equivalent mechanism (`npm audit`, `osv-scanner`, Snyk, or a dependabot npm ecosystem entry) exists for the npm tree, so half the project's dependency surface has the up-to-date-security practice and half does not. +- **Desired State:** `05-up-to-date.md:9-13`: "Are you subscribed to the security announcements mailing lists for all languages, libraries, and dependencies related to your project" and SAST-tooling self-check applying project-wide, not per-ecosystem. + +**GAP-028: CodeQL coverage excludes the desktop-app frontend (TypeScript/JavaScript)** +- **Category:** Partial +- **Feature/Behavior:** Ch. 4's static-analysis-in-CI recommendation and Ch. 5's SAST self-check, applied project-wide. +- **Current State:** `.github/workflows/codeql.yml:22-29`'s matrix only analyzes `language: rust` and `language: actions` — it does not include a `javascript-typescript` entry, so `apps/desktop/src/` (React/TypeScript source) receives no CodeQL static analysis despite being a first-class part of the workspace (P35, `docs/adr/0045-native-desktop-read-model.md`). +- **Desired State:** `04-follow.md:9`: "integrating dependency checks and static analysis in CI, wherever possible" — "wherever possible" reasonably extends to every language actually shipped. + +## Satisfied (current state meets or exceeds the desired state) + +- **SECURITY.md exists with scope, reporting channel, and response timelines.** + `SECURITY.md:31-55` provides an email + GitHub private-reporting channel, a + report-content checklist, and concrete 3-day/7-day/90-day timelines — matching + `02-pipeline.md:18-25`'s content list for channel, timeline, and report format + (legal safe-harbor, bug-bounty-status, and reporter non-disclosure request are + the listed items not yet covered; see GAP-015/GAP-017/GAP-018). +- **Private-reporting channel explicitly named, including GitHub's native + mechanism.** `SECURITY.md:34-38` names both email and GitHub private + vulnerability reporting, matching `02-pipeline.md:7-12`'s example list (modulo + GAP-014's unverifiable enable-state). +- **No public-issue disclosure encouraged.** `SECURITY.md:33` and + `CONTRIBUTING.md:65-66` both explicitly steer vulnerability reports away from + public GitHub issues, consistent with `02-pipeline.md`'s intent. +- **Scheduled RustSec advisory scanning is live and current.** + `.github/workflows/audit.yml` runs `rustsec/audit-check` daily via cron + (`.github/workflows/audit.yml:17-20`) plus on every `Cargo.toml`/`Cargo.lock` + change, and `git log` shows this is actively used and remediated — commit + `d7106e5` "fix(audit): address RustSec issues #53–#68 (#70)" and `d3df9ce` + demonstrate a live triage/fix loop, not a dormant workflow. This satisfies + `05-up-to-date.md:26-27`'s "SAST tooling — Available free tooling" self-check + for the Rust dependency surface. +- **CodeQL static analysis is enabled for Rust and GitHub Actions.** + `.github/workflows/codeql.yml` runs on push/PR to `main` plus a weekly cron, + satisfying `05-up-to-date.md:13`'s SAST-tooling recommendation (for the + languages it covers — see GAP-028 for the gap in coverage). +- **Automated dependency updates are configured (cargo + GitHub Actions + ecosystems).** `.github/dependabot.yml` schedules weekly cargo and + github-actions update PRs, with deliberate, documented exceptions + (`.github/dependabot.yml:11-29,35-40`) — satisfying + `05-up-to-date.md:15,25`'s automated-update self-check for those two + ecosystems (npm is the gap; see GAP-006/GAP-027). +- **CI enforces linting, formatting, and full test suite on every PR.** + `.github/workflows/ci.yml:43-50` runs `cargo fmt --check`, `cargo clippy -D + warnings`, `cargo test --workspace --all-targets`, and `cargo doc` on both + Linux and macOS — a genuine CI-integrated testing practice per + `04-follow.md:7`, even though the *review-before-merge enforcement* half of + that same recommendation is not (GAP-009). +- **A living threat model documents deliberate security boundaries.** + `docs/THREAT-MODEL.md` (326 lines) consolidates known cryptographic/protocol + boundaries per feature (committed secrets, protected paths, TLS, signed + commits, private branches), cross-referenced from `SECURITY.md:13-19` and + `CONTRIBUTING.md:14-15` — this exceeds what the guide explicitly asks for and + functions as strong supporting material for Ch. 6's documentation-currency + goal (modulo the staleness noted in GAP-019) and for pre-audit readiness + (Ch. 7). +- **Forward-looking audit-engagement research already exists.** + `docs/research/cryptography-audit-options.md` (new, untracked at analysis + time) is a concrete, actionable audit-firm shortlist, engagement-scope + proposal, and pre-audit cleanup checklist — directly satisfying + `07-milestones.md:11`'s "source a security audit... Audit Preparation + checklist" recommendation and going beyond a bare self-check into an + execution-ready plan. +- **Cryptography inventory exists implicitly and is well-documented.** + `CLAUDE.md`'s "Stack & tooling" section and the `crypto`/`tlsio` crate + quarantine rules, plus ADR-0008/0009/0010/0032/0042/0043, collectively answer + `07-milestones.md:22-25`'s "Does your project use cryptography? How? Library + or self-rolled?" self-check in detail: library-based (RustCrypto AEAD, + X25519, Ed25519, rustls), never self-rolled primitives, explicitly quarantined + by crate boundary and enforced socially per `CONTRIBUTING.md:39-45`. +- **Network exposure is documented per listener.** `docs/THREAT-MODEL.md` and + ADR-0036/0040/0041/0042 describe `sc serve --http`'s exposure model (bearer + tokens, TLS, connection/timeout caps, loopback-bind-by-default gate) in + detail, substantially answering `07-milestones.md:27-28`'s "Does your project + require internet access? How is it hosted?" self-check for the one listener + surface the project ships. +- **License and contribution licensing terms are explicit.** + `LICENSE` (Apache-2.0) and `CONTRIBUTING.md:68-71`'s explicit inbound-license + statement satisfy general open-source-hygiene expectations the guide assumes + as baseline (not a named self-check item, but consistent with the guide's + overall transparency goal in Ch. 6). + +## Areas Needing Separate Analysis + +- **`08-what-next.md`** — referenced from the guide's README and every chapter + footer, but absent from the cloned guide directory. Its content (likely + covering what to do after completing the self-checks: audit engagement, + community disclosure of the completed assessment) could not be compared. + Re-run this analysis once the file is available. +- **GitHub org-level settings (2FA enforcement, SSO, team permissions, + outside-collaborator audit)** — the `gh api repos/...` calls in this analysis + are scoped to the repository, not the `git-agentic` organization; org-level + security posture (Ch. 4's "operational security... infrastructure", + Ch. 6's "list of access privileges") needs a separate, org-admin-scoped + review. +- **`git-agentic.com` website content** — not fetched or verified; Ch. 2's + `/.well-known/security.txt` mirroring recommendation and Ch. 6's public- + documentation-availability requirement both depend partly on website content + outside this repository's control. +- **`apps/desktop` frontend security practices in depth** — this analysis found + gaps in *coverage* (CI, CodeQL, dependabot) for the npm/TypeScript surface + but did not perform a feature-level security review of the Tauri IPC + boundary, renderer capability restrictions, or the five typed repository + commands referenced in `CLAUDE.md`'s P35 entry; that is a `structural-analyst` + or dedicated frontend-security review task, not a gap-analysis-appropriate + scope. + +## Second-round delta (swarm-informed) + +Second pass performed after adversarial-validator / evidence-based-investigator / +junior-developer / adversarial-security-analyst / devops-engineer swarm review of +the first-pass file. This section covers actor types the first pass under-weighted: +AI-agent contributors operating the repo, non-human principals (CI `GITHUB_TOKEN` +scopes, agent `gh` CLI write authority), external auditors, `sc serve` operators, +and downstream packagers. Every swarm claim below was independently re-verified +against the live repository and GitHub API before being folded in — none were +accepted on the swarm's assertion alone. + +### Recategorizations + +**GAP-009 — mechanism corrected, category unchanged (Partial), evidence rewritten.** +The original finding cited `gh api repos/git-agentic/src-control/branches/main/protection` +returning 404 as proof of "no branch protection." That endpoint only reports the +legacy branch-protection API; the repository in fact uses the newer **rulesets** +API. Re-verified: `gh api repos/git-agentic/src-control/rulesets` returns one +active ruleset (`id 18739705`, `name: "main"`, `enforcement: "active"`, +`bypass_actors: []`, `current_user_can_bypass: "never"`). Its `rules` array +contains `deletion`, `non_fast_forward`, and a `pull_request` rule — so direct +pushes, force-pushes, and branch deletion on `main` ARE actively blocked, and a +PR IS technically required to land any change. This is stronger than the original +finding stated. However, the `pull_request` rule's own parameters show +`"required_approving_review_count": 0` and there is no `required_status_checks` +rule type anywhere in the ruleset — so a PR can be merged with zero approvals and +with red CI (fmt/clippy/test failing) and still land, which is the gap that +survives. Corrected finding: **PR-routing is enforced; review-approval and +CI-gating are not.** Category stays **Partial** (enforcement exists but is +incomplete against `04-follow.md:8`'s "requiring code reviews before merging"), +not Missing as a naive reading of the 404 would have implied, and not fully +resolved either. Nuance carried into GAP-032 below: a solo/near-solo maintainer +literally cannot self-approve their own PR under GitHub's rules, so setting +`required_approving_review_count > 0` alone does not close this without also +adding a second reviewing principal (human or otherwise) — see GAP-032. + +**GAP-014 — upgraded from Missing to Divergent; corrected with conclusive +evidence.** The original finding treated the "is private vulnerability reporting +actually enabled" question as unverifiable from available API scope and +classified it Missing on the strength of `SECURITY.md`'s own text. Re-verified +directly: `gh api repos/git-agentic/src-control/private-vulnerability-reporting` +returns `{"enabled":false}` — conclusive, not inferred. This changes the shape +of the finding: `SECURITY.md:34-38` does not merely omit a recommended channel +(Missing), it **actively directs reporters to a specific named channel +("GitHub's private vulnerability reporting... on this repository") that does not +function** — a report submitted that way is not deliverable through the +mechanism SECURITY.md describes. That is a contradiction between the documented +process and the actual repository configuration, which is the Divergent +definition ("both states address the same concern, but in incompatible ways"). +Recategorized **Missing → Divergent**. The "Satisfied" list entry "Private- +reporting channel explicitly named, including GitHub's native mechanism" is +corrected: only the email channel in `SECURITY.md:36` is currently live; the +GitHub-native half of that same bullet is non-functional and should not have +been credited as satisfied. + +**GAP-003 — evidence line corrected, finding stands.** The original evidence +claimed `grep -rn -i "reproducible"` returns "zero matches" repo-wide. Re-run: +it actually returns three hits outside this audit file itself — +`crates/repo/src/ws.rs:1313` ("never bit-for-bit reproducible by re-encrypting +the same..." — about ciphertext non-determinism, unrelated to build +reproducibility), `apps/desktop/README.md:67` ("reproducible without embedding" +— about a UI/state property, unrelated to build reproducibility), and +`docs/superpowers/specs/2026-06-24-phase2-committed-secrets-design.md:137` +("reproducible" test determinism, unrelated to build reproducibility). None of +the three concern build/compilation reproducibility, so the underlying gap is +unchanged — but the "zero matches" claim was imprecise and is corrected here. +Additionally: mark GAP-003, and the packager-facing readings of GAP-005 (SBOM) +and GAP-020 (third-party library list), as **premature-until-distribution**. +`Cargo.toml:26` sets `publish = false` workspace-wide with the comment +"nothing publishes to crates.io by accident," and no release/packaging workflow +exists anywhere in `.github/workflows/`. Reproducible builds, SBOM generation, +and a curated third-party-library list all exist principally to let a +*downstream consumer* verify what they're receiving — with zero distribution +channels shipped yet, there is no such consumer today. The gaps remain valid +(the guide's self-checks are still unaddressed, and all three become load- +bearing the moment a release workflow ships) but their priority should be read +as tied to the (currently absent) distribution milestone, not as an immediate +operational risk. + +**GAP-006 / GAP-020 — evidence corrected, categories unchanged.** The original +GAP-020 text described the npm dependency surface as living "only implicitly in +`Cargo.lock`... and `apps/desktop/package.json`," which by omission understated +what's committed. Re-verified: `apps/desktop/package-lock.json` **is** committed +(`lockfileVersion: 3`, ~234 resolved packages, per-package `sha512` integrity +hashes). This does not close GAP-006 or GAP-020 — it sharpens them: the lockfile +exists and could enforce integrity, but `grep -n "npm" .github/workflows/*.yml` +confirms (again) that no workflow ever runs `npm ci` (or any npm command), so +the committed integrity hashes are never actually checked against installed +packages in CI. The gap is not "no lockfile" (false) but "a lockfile exists and +is never verified" (true, and arguably a sharper finding than the original). + +**GAP-012 — scope widened in place, no new ID (fold decision).** Swarm item E +("access-privilege inventory omits non-human principals") is folded into +GAP-012 rather than minted as a new gap: it is the same missing artifact (a +documented list of access privileges), just missing a category of principal the +first pass didn't consider. Decision recorded here rather than as GAP-035 to +avoid double-counting the same absent document under two IDs. Widened scope +now on record: GAP-012 covers not only human GitHub-org/npm/DNS/signing-key +access but also **non-human principals** — the CI `GITHUB_TOKEN`'s granted +scopes per workflow (`.github/workflows/audit.yml:23-28` grants +`contents: read, checks: write, issues: write`; `.github/workflows/codeql.yml:11,18-21` +grants `contents: read` repo-wide plus `security-events: write, actions: read, +contents: read` in the analyze job), and any AI-agent principal operating under +`docs/agents/issue-tracker.md`'s `gh` CLI conventions (create/comment/label/close +issues and PRs) — none of which appear in any access-privilege inventory because +no such inventory exists at all yet. + +### Withdrawals + +None. All 28 first-pass findings were re-examined against the swarm's claims and +survive: GAP-009 and GAP-014 are recategorized (not withdrawn — the underlying +gaps still exist, just characterized more precisely); GAP-003/005/020 gain a +distribution-timing caveat but remain open findings; GAP-006/020 gain corrected +evidence but the same conclusion. No first-pass finding was found to be false +positive. + +### New findings + +**GAP-029: Third-party GitHub Actions pinned by mutable tag, not commit SHA** +- **Category:** Missing +- **Feature/Behavior:** Ch. 4's development/build/CI best-practices scope (`04-follow.md:7-9`) and the OpenSSF Scorecard self-check already flagged in GAP-004 — Scorecard's "Pinned-Dependencies" check specifically requires GitHub Actions to be pinned to a full commit SHA, not a mutable tag, to prevent a compromised upstream action from silently injecting code into CI. +- **Current State:** Every third-party action reference across all three workflows uses a mutable tag: `.github/workflows/ci.yml:24` (`actions/checkout@v7`), `:39` (`dtolnay/rust-toolchain@1.96.1`), `:42` (`Swatinem/rust-cache@v2`); `.github/workflows/codeql.yml:31` (`actions/checkout@v7`), `:32` (`github/codeql-action/init@v3`), `:42` (`github/codeql-action/analyze@v3`); `.github/workflows/audit.yml:35` (`actions/checkout@v7`), `:36` (`rustsec/audit-check@v2`). None use a 40-character commit SHA. This was independently proposed by two different augmenters in the swarm, so it was checked first and hardest — confirmed by direct grep of `uses:` lines in all three workflow files, no exceptions found. +- **Desired State:** `04-follow.md:9`: "integrating dependency checks and static analysis in CI, wherever possible," read alongside the OpenSSF Scorecard reference at `04-follow.md:25` this project has not yet run (GAP-004) — Scorecard's Pinned-Dependencies check treats floating-tag Action pins as a specific, named finding. + +**GAP-030: Incident-response scope omits compromised/prompt-injected AI-agent principals** +- **Category:** Missing +- **Feature/Behavior:** Sibling of GAP-011 (no documented security-incident process at all). Sharpened here because the guide's incident-type list (`03-response.md:18-23`: "supply-chain attacks, malware campaigns... infection or other attacks on the project's development or production systems, and data breaches") was written for human-operated projects and does not anticipate — and this repository's own incident process (which doesn't exist; see GAP-011) therefore also does not address — a distinct incident class this project is unusually exposed to: a compromised or prompt-injected AI-agent principal acting with the write authority `docs/agents/issue-tracker.md` and `CLAUDE.md`'s "Agent skills" section (`CLAUDE.md:237-258`) grant (issue/PR creation, labeling, closing, and — per `docs/agents/issue-tracker.md:7-12` — commenting and editing via `gh`). +- **Current State:** `docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`, `docs/agents/domain.md`, `AGENTS.md`, and `CLAUDE.md`'s "Agent skills" section collectively document how agents operate the repository's issue tracker and (per `ROADMAP.md`'s phase log and `docs/superpowers/plans/`) drive substantial engineering work, but no document anywhere addresses what happens if an agent's instructions are compromised (prompt injection via a malicious issue body, a poisoned dependency's doc comments, or a compromised upstream skill) and it takes a harmful repository action. GAP-011 already establishes no incident-response process exists at all; this finding specifically notes the incident-type taxonomy the project would need to write already has a gap even in the abstract, since neither the guide nor any project document contemplates this actor class. +- **Desired State:** `03-response.md:18-23` — the incident-type list this project would need to extend, not just adopt verbatim. + +**GAP-031: No documented boundary keeping private security reports out of the automated/public agent triage pipeline** +- **Category:** Implicit +- **Feature/Behavior:** Sharpens GAP-010 (no internal vulnerability-response documentation). The specific sharpening: this repository already runs agents over its *public* issue tracker by design (`docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`'s `needs-triage`/`ready-for-agent` labels), and `.github/workflows/audit.yml:26-28` grants the workflow `issues: write` specifically to auto-file RustSec findings as issues (per the workflow's own comment: "Scheduled runs file findings as GitHub issues"). No document states a boundary such as "a report received via the private channel in SECURITY.md must never be filed, labeled, or processed through the public agent-triage pipeline" or "an agent triaging public issues must recognize and never act on content resembling an undisclosed vulnerability." +- **Current State:** Checked `SECURITY.md`, `CONTRIBUTING.md`, `docs/agents/*`, and `CLAUDE.md` for any such boundary statement — none exists in either direction (no explicit boundary, but also no evidence any leak has occurred; this is a genuine silence on a real adjacency, not a demonstrated incident). Classified **Implicit** rather than Missing because the guide itself never explicitly asks for this specific boundary — it is a risk that emerges from combining two things the guide does ask for (Ch. 2's private channel, Ch. 3's internal process) with an actor type (autonomous agent triage) the guide doesn't contemplate, so the "gap" is genuinely in the silence between the two chapters as applied to this project's actual operating model, not a direct unmet checklist item. +- **Desired State:** `03-response.md:7-10` (internal handling process, responsible-member assignment) and `02-pipeline.md:16` ("Who handles your pipeline and relevant reports is also important... you may want access to the project's security reporting system to only be available to the software maintainers"), read together against this project's public-agent-triage operating model. + +**GAP-032: No human-in-the-loop requirement for code-review approval** +- **Category:** Missing +- **Feature/Behavior:** Sharpens GAP-009. `04-follow.md:8`'s "requiring code reviews before merging" self-check is satisfiable, as configured, by any principal with write access approving — GitHub's ruleset `pull_request` rule (verified in the GAP-009 recategorization above) restricts *whether* review is required (currently: not required at all, `required_approving_review_count: 0`) but not *who* may provide it. Nothing in the ruleset, `CONTRIBUTING.md`, or any other document requires that the approving reviewer be a human, or be a principal distinct from whatever agent (if any) authored the change. +- **Current State:** `gh api repos/git-agentic/src-control/rulesets/18739705`'s `pull_request` rule object has no `required_reviewers` team/principal restriction (`"required_reviewers": []`) and no code-owner requirement (`"require_code_owner_review": false`). `CONTRIBUTING.md` describes the CI bar (fmt/clippy/test/doc) and PR-based workflow but never states who — human or agent — must review a change, or that agent-authored changes need a human reviewer distinct from the agent. +- **Desired State:** `04-follow.md:8`. The guide's underlying intent (an independent second set of eyes catching what the author missed) implicitly assumes the reviewer is a different *kind* of principal with different failure modes than the author — an assumption this project's all-agent-capable contribution model doesn't yet guarantee. + +**GAP-033: Vendored hand-patched dependency has no provenance record outside a code comment, and would misrepresent an SBOM/library inventory if produced today** +- **Category:** Partial +- **Feature/Behavior:** Sharpens GAP-005 (no SBOM) and GAP-020 (no third-party library list). `Cargo.toml:9-10` carries `[patch.crates-io] glib = { path = "vendor/glib-0.18.5-patched" }` — a hand-patched fork of the upstream `glib` crate, vendored in-tree specifically to carry a fix for **RUSTSEC-2024-0429** ahead of upstream (per the `.github/workflows/audit.yml:44-45` comment: "glib 0.18.5 is patched in-tree for RUSTSEC-2024-0429; cargo-audit matches versions only, so remove this exception with that patch"). `audit.yml:48`'s ignore list force-suppresses `RUSTSEC-2024-0429` for this reason. +- **Current State:** The only record of this patch's existence, rationale, and removal condition is a workflow YAML comment (`audit.yml:39-45`) and the vendored source tree itself (`vendor/glib-0.18.5-patched/PROVENANCE.md` exists inside the vendor directory per the earlier `git show` of commit `d7106e5`'s file list, but is not referenced from any top-level security or dependency document). A version-keyed dependency list or SBOM generated mechanically from `Cargo.lock` today (`Cargo.lock` records `glib 0.18.5` with no marker distinguishing the patched vendor copy from the unpatched upstream crate of the same version) **would misrepresent** this dependency as unpatched upstream `glib 0.18.5`, silently reintroducing the appearance of an unfixed RUSTSEC-2024-0429 exposure to anyone reading the SBOM without also reading the audit workflow's suppression comment. +- **Desired State:** `06-kb.md:9,15-16`: "Creating a Statement Bill of Materials... Being transparent about your organization's supply chain provides context for users to make educated decisions" and self-check "List of third party libraries in project... Create SBOM (if relevant)." An accurate SBOM/library list needs to be capable of representing a vendored, hand-patched fork distinctly from its unpatched upstream namesake — a capability that doesn't exist today because no SBOM/library-list artifact exists at all (GAP-005/GAP-020), and the current sole provenance record (a workflow comment) would not survive being mechanically summarized into one. + +**GAP-034: No operator-facing hardening/incident runbook for `sc serve` deployments** *(low confidence — included per swarm request; borderline in-scope for a guide written for library/application maintainers rather than deployed-service operators)* +- **Category:** Partial +- **Feature/Behavior:** `04-follow.md:11`'s "security of development devices and infrastructure" and `07-milestones.md:27-28`'s exposure self-check ("Does your project require internet access? How is it hosted?"), read against the specific fact that this project ships a listener an end operator runs themselves (`sc serve --http`/`--stdio`), rather than only being a library or CLI consumed locally. +- **Current State:** ADR-0036 (HTTP transport), ADR-0040 (access control: bearer tokens, `--read-only`, fail-closed non-loopback bind gate), ADR-0041 (listener resource limits), and ADR-0042 (in-binary TLS) thoroughly document the *mechanisms* available to an operator (what flags exist, what they do, what the fail-closed defaults are) and `docs/THREAT-MODEL.md` documents the *boundaries* (e.g. plaintext-by-default without `sc+https://`). None of these is a task-oriented runbook a first-time operator would follow ("here is how to stand up `sc serve` safely for a given trust level," "here is what to do if you suspect your listener was scanned/attacked," "here is the minimum flag set for a public bind"). `ROADMAP.md`'s Deferred section (lines ~685-697) further documents known operational gaps in the listener itself (no connection pool cap, no idle-transfer watchdog, no accept-loop backoff) without pairing them with interim operator mitigations. +- **Desired State:** `04-follow.md:11`, `07-milestones.md:27-28`. Flagged low-confidence because the guide is framed throughout around a *project's own* development/build/hosting practices, not around documentation for *third-party operators* of a tool the project ships — whether this counts as an OSTIF-guide gap versus ordinary product documentation is a judgment call this analysis resolves toward inclusion (the exposure self-check is explicit and the project does host a listener) but flags for the reader to weigh. + +### Updated counts (first-pass + delta) + +The second-round delta adds 6 new findings (GAP-029–034) to the original 28, +recategorizes 2 (GAP-009 stays Partial with corrected evidence; GAP-014 moves +Missing → Divergent), corrects evidence on 3 more without changing category +(GAP-003, GAP-006, GAP-020), folds 1 swarm item into an existing gap +(non-human principals → GAP-012, no new ID), and withdraws none. + +| Category | First-pass count | Delta | New total | +|----------|------------------:|------:|----------:| +| Missing | 15 | −1 (GAP-014 out) +3 (GAP-029, 030, 032) | 17 | +| Partial | 8 | +2 (GAP-033, 034) | 10 | +| Divergent | 1 | +1 (GAP-014 in) | 2 | +| Implicit | 4 | +1 (GAP-031) | 5 | +| **Total** | **28** | **+6** | **34** | + +## Third-round delta: live code-scanning evidence (2026-07-18, user-requested) + +After the report was rendered, the user asked for the repository's live code-scanning +surface (`https://github.com/git-agentic/src-control/security/code-scanning`) to be +checked and folded in. Queried via `gh api repos/git-agentic/src-control/code-scanning/ +{alerts,analyses}`. Meanwhile the remote moved past the audit's evidence snapshot +(`d7106e5` → `d6e60ac`): four commits landed on main the same morning — +`e570b8f` "Add scorecard_analysis workflow configuration (#74)", `d6e60ac` +"fix(ci): restore Scorecard workflow (#75)", `8b09a95` "bump github/codeql-action +from 3 to 4 (#72)", `0f3ab3f` dependabot cargo-minor-patch group (#73). + +### State of the code-scanning surface (verified live) + +- **17 open alerts, all from tool `Scorecard`** (numbers 4–20), uploaded + 2026-07-18T08:29:36Z from the new `scorecard_analysis.yml` run on `d6e60ac`. +- **Zero open CodeQL alerts.** Alerts 1–3 are historical CodeQL + `rust/access-invalid-pointer` findings that are no longer open. +- **CodeQL analyses on `main` remain `/language:rust` and `/language:actions` + only** — no `javascript-typescript` category. GAP-028 unchanged. +- The new `scorecard_analysis.yml` is itself exemplary: every action SHA-pinned + with version comments (`actions/checkout@9c091bb2… # v7.0.0`, + `ossf/scorecard-action@4eaacf05… # v2.4.3`, `github/codeql-action/upload-sarif@8aad20d1… # v4.36.2`), + top-level `permissions: read-all`, job-scoped `security-events: write` + + `id-token: write`, `persist-credentials: false`, weekly cron + push, + `publish_results: true`. Scorecard raised no Pinned-Dependencies or + Token-Permissions alert against it — it is the in-repo template for GAP-029. + +### Recategorization + +**GAP-004 — Missing → Partial.** OpenSSF Scorecard now runs (workflow added in +#74/#75, post-dating the first-pass evidence; weekly + on push; SARIF uploaded to +code scanning; `publish_results: true`). What remains open: the 17 findings it +produced are untriaged; the OpenSSF best-practices badge is unaddressed +(`CIIBestPracticesID` score 0 — a named Scorecard check, folded here rather than +minted as a new gap); and the OWASP ASVS half of the original self-check remains +unconsidered (still judged largely N/A for a CLI/VCS). `MaintainedID` score 0 is +informational only ("repository created within the last 90 days") and not +actionable. + +### Live corroborations of existing findings (no category changes) + +- **GAP-029** — corroborated by the tool itself: 8 open `PinnedDependenciesID` + alerts at exactly the predicted locations (`ci.yml:24,39,42`, + `codeql.yml:31,32,42`, `audit.yml:35,36`). Evidence refresh: #72 bumped + `github/codeql-action` v3 → v4 — still a mutable tag; the gap stands at the + same lines. +- **GAP-009 / GAP-032** — corroborated: `CodeReviewID` score 0 ("Found 0/26 + approved changesets") and `BranchProtectionID` score 3 ("branch 'main' does + not require approvers… no status checks found to merge onto branch 'main'… + codeowners review is not required"). +- **GAP-025** — corroborated: `TokenPermissionsID` (high) on `audit.yml:25`, + "topLevel 'checks' permission set to 'write'" — the exact nit the + devops-engineer flagged pre-Scorecard. +- **GAP-001 / GAP-002** — corroborated: `FuzzingID` score 0 ("no fuzzer + integrations found"). +- **GAP-033 — the predicted misrepresentation demonstrably occurred.** + `VulnerabilitiesID` (high, score 0) lists "Project is vulnerable to: + RUSTSEC-2024-0429 / GHSA-wrw7-89jp-8q8g" — Scorecard's OSV check read + `Cargo.lock`'s `glib 0.18.5` and flagged it as an existing vulnerability, + exactly the false-positive GAP-033 predicted a version-keyed consumer would + produce for the patched vendored copy. +- Positive signals for the Satisfied list: `CITestsID` 9/10 (25 of 26 merged + PRs CI-checked) and `SASTID` 9/10 (22 of 26 commits SAST-checked). + +### New finding + +**GAP-035: Accepted-advisory ignore list omits one member of its own accepted +family (RUSTSEC-2024-0413/`atk`), surfaced by independent-scanner disagreement** +- **Category:** Partial +- **Feature/Behavior:** Ch. 5's up-to-date-security posture (`05-up-to-date.md:9-13`) + and Ch. 6's documentation-currency requirement, applied to the advisory- + acceptance record: every accepted advisory should be deliberately listed with + its removal gate, and independent scanners should agree with the documented + posture. +- **Current State:** Scorecard's `VulnerabilitiesID` alert (#18) lists 18 + advisories; the `audit.yml` `ignore:` list documents 17. Set-difference: + **RUSTSEC-2024-0413** (`atk` 0.18.2 — "gtk-rs GTK3 bindings - no longer + maintained", confirmed via OSV API and present in `Cargo.lock`). It is the + same GTK3-unmaintained family as nine already-ignored siblings + (RUSTSEC-2024-0411/0412/0414–0420) whose removal gate ("remove… when Tauri 3 + moves the stack to GTK4") is documented in `audit.yml:39-45` — this member + was simply omitted. The daily `cargo-audit` run does not fail on it because + unmaintained-class advisories warn rather than error, so the omission was + invisible until a second scanner (Scorecard/OSV) counted it. Not a new + vulnerability — an accepted-risk record that is incomplete, now flagged + divergently by two tools. +- **Desired State:** `05-up-to-date.md:9-13` (staying current with advisories); + `06-kb.md:7` (documentation that is current). Remediation: add + RUSTSEC-2024-0413 to the `ignore:` list under the existing GTK3 removal-gate + comment (or restructure the acceptance record per GAP-033's provenance work), + keeping cargo-audit and Scorecard tellings consistent. + +### Updated counts (all three rounds) + +| Category | Second-round total | Third-round delta | New total | +|----------|-------------------:|------:|----------:| +| Missing | 17 | −1 (GAP-004 out) | 16 | +| Partial | 10 | +1 (GAP-004 in) +1 (GAP-035) | 12 | +| Divergent | 2 | — | 2 | +| Implicit | 5 | — | 5 | +| **Total** | **34** | **+1** | **35** | diff --git a/docs/audit/ostif-best-practices-audit.md b/docs/audit/ostif-best-practices-audit.md new file mode 100644 index 00000000..8d81591c --- /dev/null +++ b/docs/audit/ostif-best-practices-audit.md @@ -0,0 +1,690 @@ +--- +title: "Gap Analysis: src-control vs OSTIF Security Best Practices Guide" +comparison_direction: "src-control repository (current state) -> OSTIF/Least Authority Security Best Practices Guide (desired state)" +scope: "The whole repository (code, CI, docs, GitHub configuration via live API) compared against all six OSTIF practice areas; the guide's missing 08-what-next.md chapter and the external git-agentic.com website were excluded." +generated: "2026-07-18" +updated: "2026-07-18 — third evidence round: live code-scanning surface (Scorecard + CodeQL alerts) folded in; G-004 recategorized, G-035 added" +generated_by: "han:gap-analysis" +sections_included: + - executive_summary + - indexed_gaps + - technical_details + - swarm_findings + - actionable_todos +--- + +# Gap Analysis: src-control vs OSTIF Security Best Practices Guide + +## How to Read This Report + +This report compares **the src-control repository** (what exists today) against **the OSTIF Security Best Practices Guide** (what is expected). It is layered, so you can stop at any section and still have a complete picture at that level of detail: + +- **Section 1 — Executive Summary.** The shape and magnitude of the gap in plain language. Read this if you have two minutes. +- **Section 2 — Indexed Gaps.** Every gap, individually titled and explained in plain language, with a stable ID (e.g., `G-007`) you can cite in tickets, threads, and follow-up work. +- **Section 3 — Technical Details.** Engineering-grade fidelity for each gap: where it lives, what would need to change, and how to act on it. +- **Section 4 — Swarm Findings.** Confidence signals, contradictions, and augmentations from a panel of five secondary analyses. Read this to know which gaps are most certain. +- **Section 5 — Actionable TODO List.** The prioritized work plan (T-1 … T-25) mapping every gap to a concrete action, effort estimate, and tier. **If you act on only one section, act on this one.** + +Every gap has a stable ID. Sections 3–5 reference those IDs. The full evidence trail (verbatim analyzer findings, GAP-NNN ↔ G-NNN maps 1:1) is in `docs/audit/gap-analysis-source.md`. + +**Gap categories used throughout:** +- **Missing** — the guide expects it; the repository does not have it. +- **Partial** — present in both, but the repository does not fully satisfy the guide. +- **Divergent** — present in both, but the repository does something materially different (or contradictory). +- **Implicit** — assumed or implied by the guide but not directly checkable from the repository; needs a decision or an out-of-repo check. + +--- + +## 1. Executive Summary + +**Bottom line:** The project is substantially ahead of the guide in the areas it has invested in deliberately — a detailed living threat model, daily automated vulnerability scanning of its core dependencies, automated code analysis of its core language, and an already-drafted plan for a professional audit. But the audit found **35 gaps**, and they cluster in places the project has not yet looked: platform-level protections that are switched off, a security policy document that has drifted out of date and points reporters at a channel that does not work, a desktop application that sits entirely outside every automated safety net, and internal security processes that exist as habit but not as written policy. + +**Same-day update:** the security scorecard the audit recommended (G-004) was added and run before this report was even finished — it now runs weekly, and its first run independently confirmed five of this report's findings at the exact predicted locations, demonstrated the bundled-component misrepresentation trap (G-033) live, and surfaced one new discrepancy (G-035). Its 17 open findings await triage. + +**Magnitude at a glance:** + +| Category | Count | Plain-language meaning | +|-------------|-------|-------------------------------------------------------------------------| +| Missing | 16 | Things the guide expects that are not present today. | +| Partial | 12 | Things that exist but do not fully meet expectations. | +| Divergent | 2 | Things that exist but behave differently than documented or expected. | +| Implicit | 5 | Expectations that cannot be verified from the repository and need a decision. | +| **Total** | **35** | | + +**The shape of the gap (five themes):** + +- **The hosting platform's built-in protections are mostly off.** Secret leak scanning, automatic security-fix suggestions, the private vulnerability-reporting channel, required review approvals, and merge gating on passing checks are all disabled or unconfigured — each one is a switch or a small settings change, verified directly against the live platform. +- **The public security policy is stale and partly broken.** The document reporters and users read to understand the project's guarantees describes an older version of the encryption design, and it directs vulnerability reporters to a named private channel that is confirmed to be switched off — a report sent that way is undeliverable today. +- **The desktop application is invisible to every safety net.** The automated testing, dependency scanning, vulnerability alerting, and code analysis that protect the core system do not cover the desktop app's separate technology ecosystem at all — that half of the project ships with no automated checks whatsoever. +- **Security process lives in practice, not on paper.** There is no written internal procedure for handling a vulnerability report, no incident-response plan, no inventory of who (and what) holds which access, and no standing rule for when a release or new dependency triggers a security review. +- **The project's unusual operating model creates gaps the guide cannot see.** This repository is heavily operated by AI agents. The guide assumes human teams, so nothing addresses a compromised or manipulated agent as an incident type, nothing prevents an agent from approving another agent's change, and nothing keeps privately reported vulnerabilities out of the automated public triage pipeline. + +**What this means for the work ahead:** The good news is that most of the highest-confidence gaps are cheap: roughly a third of the entire list closes with platform toggles, one-line configuration additions, and a single revision of the security policy document. A second tranche is documentation work — writing down processes and inventories that mostly already exist as practice. Only a few items (fuzz testing infrastructure, reproducible builds, a release pipeline with supply-chain attestations) are genuinely large, and several of those are deliberately deferred because the project does not yet distribute anything for a consumer to verify. The work plan in Section 5 sequences all of this. + +**What is already in good shape** (so this report is fair): the security policy document exists with a working email channel, report-format guidance, and concrete response timelines; core-language dependency scanning runs daily and is demonstrably acted on; automated code analysis covers the core language **with zero open findings** (three historical memory-safety findings were fixed); the new weekly scorecard confirms nearly all merged changes are CI-checked and analysis-checked; scheduled dependency-update proposals are configured for two of the three ecosystems; formatting, linting, and the full test suite run on every proposed change; a thorough threat model and a professional-audit preparation plan already exist; and the cryptography is library-based, never self-rolled, and architecturally quarantined. Two earlier credits were corrected during validation: the platform-native private reporting channel named in the policy is in fact disabled (only email works), and the test suite *runs* on every change but a failing run does not technically block a merge. + +**Where to look next:** Section 2 lists every gap individually. Section 3 has the technical detail engineers need. Section 4 reports how confident the analysis is and where secondary checks disagreed. Section 5 is the prioritized todo list. + +--- + +## 2. Indexed Gaps + +**Index (scan view):** + +| ID | Category | Title (plain language) | +|-------|-----------|-------------------------------------------------------------------------------| +| G-001 | Missing | No fuzz or property-based testing of untrusted-input handling | +| G-002 | Missing | Not enrolled in the free continuous-fuzzing service | +| G-003 | Missing | No reproducible-build capability | +| G-004 | Partial | Security scorecard now runs (added same-day); findings untriaged, standards review open² | +| G-005 | Missing | No software bill of materials | +| G-006 | Missing | Desktop app's dependencies are never checked or tested by automation | +| G-007 | Missing | Platform secret-leak scanning and push protection are switched off | +| G-008 | Missing | Automatic security-fix proposals are switched off | +| G-009 | Partial | Changes must go through a proposal, but approval and passing checks are not required | +| G-010 | Missing | No written internal procedure for handling a vulnerability report | +| G-011 | Missing | No written security-incident response plan | +| G-012 | Missing | No inventory of who and what holds which access | +| G-013 | Missing | No record of security-announcement subscriptions | +| G-014 | Divergent | The security policy names a private reporting channel that is switched off | +| G-015 | Partial | No legal safe-harbor statement for good-faith researchers | +| G-016 | Missing | No machine-readable security contact file for the website | +| G-017 | Partial | No statement on whether a bug bounty exists | +| G-018 | Partial | Reporters are never asked to hold findings in confidence | +| G-019 | Divergent | The security policy describes an outdated version of the product | +| G-020 | Partial | No readable inventory of third-party components | +| G-021 | Missing | No statement about sensitive data and the impossibility of true deletion | +| G-022 | Partial | No standing rule for when releases or new dependencies trigger security review | +| G-023 | Implicit | Whether the website mirrors the disclosure policy is unverified | +| G-024 | Implicit | Whether maintainers are actually subscribed to security feeds is unverifiable | +| G-025 | Implicit | Developer-device and infrastructure hygiene is largely unverifiable | +| G-026 | Implicit | Legal reporting obligations are unaddressed | +| G-027 | Partial | Half the project's dependencies have no vulnerability feed at all | +| G-028 | Partial | Automated code analysis skips the desktop app's language | +| G-029 | Missing | Automation building blocks are referenced by movable labels, not fingerprints¹ | +| G-030 | Missing | Incident planning ignores the compromised-AI-agent scenario¹ | +| G-031 | Implicit | Nothing keeps private reports out of the automated public triage pipeline¹ | +| G-032 | Missing | Nothing requires a human in the review loop¹ | +| G-033 | Partial | A hand-patched bundled component has no visible provenance record¹ | +| G-034 | Partial | No hardening guide for people who run the server component¹ | +| G-035 | Partial | The accepted-advisory list omits one member of its own accepted family² | + +¹ *Surfaced by the validation swarm (G-029 independently by both the security and operations augmenters; G-030/031/032/034 by the actor-perspective sweep; G-033 jointly by the actor sweep and the security augmenter) and confirmed by the analyzer's second pass.* +² *Updated/added in the third evidence round (2026-07-18): the live code-scanning surface was checked at the user's request after the scorecard workflow landed on the same day.* + +> IDs are stable for the life of this report. Cite them as `G-NNN` in tickets and follow-up work. + +--- + +### G-001 — No fuzz or property-based testing of untrusted-input handling +- **Category:** Missing +- **Expected:** A wide testing range including fuzzing (feeding random malformed input to find crashes) and property-based testing. +- **Current:** Only conventional example-based tests run, locally and in automation. +- **Why it matters:** The project ships a network server that parses data sent by strangers. A crash or memory blow-up on malformed input is a way for an attacker to knock the server over remotely. +- **Additional context (swarm):** This is not aspirational here — the project's own design records already name a residual weakness in exactly the input-parsing path a fuzzer would exercise, so there is a concrete, pre-motivated first target. The property-testing half is nearly free with existing tooling; the fuzzing half needs one new scheduled job. *(Third round: the live scorecard independently scored fuzzing 0/10 — "no fuzzer integrations found.")* +- **Confidence:** High — both validators independently confirmed the absence; two augmenters added targets and effort; corroborated live by the scorecard. + +### G-002 — Not enrolled in the free continuous-fuzzing service +- **Category:** Missing +- **Expected:** Use of the free industry service that continuously fuzzes open-source projects. +- **Current:** No enrollment and no fuzz targets to enroll (see G-001). +- **Why it matters:** Continuous fuzzing catches regressions long after a one-time effort would have stopped looking. +- **Additional context (swarm):** The operations reviewer judged full enrollment disproportionate for a pre-1.0, effectively single-maintainer project and recommended a lighter self-hosted equivalent first; enrollment only makes sense once local fuzzing exists and proves fruitful. +- **Confidence:** High — both validators confirmed; deferral guidance is a priority judgment, not a dispute of the gap. + +### G-003 — No reproducible-build capability +- **Category:** Missing +- **Expected:** Where feasible, builds that can be independently recreated bit-for-bit, so anyone can prove nothing was injected during compilation. +- **Current:** No reproducibility tooling or verification anywhere. +- **Why it matters:** Reproducibility is the strongest defense against a tampered build reaching users. +- **Additional context (swarm):** The actor sweep flagged this as **premature**: the project currently distributes nothing — no package registry publishing, no downloadable builds — so there is no consumer who could perform the comparison. It becomes load-bearing the moment a first release ships. +- **Confidence:** High — both validators confirmed the gap (one corrected a minor evidence overstatement; the finding stands). + +### G-004 — Security scorecard now runs; findings untriaged, standards review open +- **Category:** Partial *(recategorized from Missing in the third evidence round — the scorecard workflow was added the same day this audit ran)* +- **Expected:** Running the industry's automated security-posture scorecard and considering the applicable security-verification standard. +- **Current:** The scorecard workflow landed on the trunk the morning of this audit (after the evidence snapshot) and has completed its first weekly-scheduled run, publishing results to the platform's scanning dashboard. Its 17 open findings are untriaged; the related best-practices badge is unpursued; the verification-standard half remains unconsidered (and is largely aimed at web applications). +- **Why it matters:** The dashboard now continuously tracks many of this report's other gaps automatically — its first run independently confirmed five of them at the exact predicted locations. The remaining work is triaging what it found. +- **Additional context (third round):** The new workflow is itself a model of the practices this report asks for — every building block pinned by fingerprint, minimal permissions — making it the in-repo template for fixing G-029. +- **Confidence:** High — verified live against the running scanning surface. + +### G-005 — No software bill of materials +- **Category:** Missing +- **Expected:** A shareable, machine-readable inventory of everything the software is built from. +- **Current:** The raw dependency-lock records exist but are never transformed into a bill of materials. +- **Why it matters:** When a major vulnerability lands in a common component, a bill of materials is how anyone — including the maintainer — answers "are we affected?" in minutes instead of days. +- **Additional context (swarm):** Two agents independently flagged a trap: one bundled component is a hand-patched copy of a third-party library, and a mechanically generated bill of materials would misrepresent it as the unpatched original (see G-033). Generate the document only with that annotation in place. +- **Confidence:** High — both validators confirmed; two augmenters enriched. + +### G-006 — Desktop app's dependencies are never checked or tested by automation +- **Category:** Missing +- **Expected:** Dependency checks and automated testing in the build pipeline for every part of the project. +- **Current:** Automation builds and tests only the core system. The desktop application — a full second technology ecosystem — is never installed, tested, type-checked, or audited by any automated process. +- **Why it matters:** The desktop app renders repository content on screen; a compromised or vulnerable component there runs code on the user's machine. Today nothing would notice. +- **Additional context (swarm):** The security reviewer found the app's pinned dependency list (with integrity fingerprints) is already committed, so scanning could start today with zero groundwork — and noted that because automation never installs the app, those integrity fingerprints are never actually verified anywhere. Two of the rendering components are pre-release, small-publisher packages that deserve watching. +- **Confidence:** High — all four checking agents confirmed. + +### G-007 — Platform secret-leak scanning and push protection are switched off +- **Category:** Missing +- **Expected:** Sound operational practices for handling secrets, which for a platform-hosted project includes the platform's own leak scanning as a baseline. +- **Current:** All of the hosting platform's secret-scanning features, including the one that blocks a leaked credential before it lands, are confirmed disabled. +- **Why it matters:** The project has its own excellent commit-time secret scanner — but that scanner does not cover the path where content is exported to the hosting platform's own format. The platform's scanning is the intended backstop for exactly that surface, and it is off. +- **Additional context (swarm):** The security reviewer verified the project's first-party secret handling is genuinely strong (tokens hashed at rest, constant-time comparisons), which narrows this gap precisely to the platform surface — the most likely leak being a developer's own identity key file, a known footgun for this tool. +- **Confidence:** High — the live platform state was independently reproduced by the validator. + +### G-008 — Automatic security-fix proposals are switched off +- **Category:** Missing +- **Expected:** Automated updates enabled wherever safely possible. +- **Current:** Scheduled version-update proposals exist for two ecosystems, but the separate platform feature that automatically proposes a fix when a *vulnerability* is announced is confirmed disabled. +- **Why it matters:** Detection without auto-remediation means every security fix waits for a human to notice a flag. +- **Additional context (swarm):** The security reviewer found a sharper edge: the update configuration deliberately ignores major-version bumps across the entire cryptography stack. Combined with this disabled feature, a critical advisory requiring a major upgrade of a core encryption component would surface through *no* automated channel — the project's highest-value attack target has its weakest alerting. +- **Confidence:** High — live platform state independently reproduced. + +### G-009 — Changes must go through a proposal, but approval and passing checks are not required +- **Category:** Partial +- **Expected:** Requiring code review before changes merge. +- **Current:** A platform rule does force every change through a formal proposal and blocks direct or forced pushes — stronger than the first analysis believed. But the rule requires zero approvals, and a proposal with failing checks can still be merged. +- **Why it matters:** The proposal step exists, but nothing guarantees a second look or a green test run before code lands in the trunk of a security-sensitive project. +- **Additional context (swarm):** The validator corrected the original evidence (the protection exists under a newer mechanism the first pass didn't query). The operations reviewer added the honest nuance that a solo maintainer cannot approve their own proposal under platform rules, so requiring approvals needs a second reviewing principal first — but requiring passing checks costs nothing and closes the bigger hole. *(Third round: the live scorecard independently confirmed both halves — zero of the last 26 merged changes had an approval, and no status checks gate merging.)* +- **Confidence:** High — contradicted-then-corrected during validation, then independently corroborated by a second live tool. + +### G-010 — No written internal procedure for handling a vulnerability report +- **Category:** Missing +- **Expected:** A documented internal process: who takes ownership, acknowledgment, tracking, triage, remediation planning, coordinated communication, and verification with the reporter. +- **Current:** The public policy tells reporters how to reach the project and what timelines to expect, but nothing documents what the maintainer actually does upon receipt. +- **Why it matters:** An undocumented process depends on one person's memory under pressure, and every future maintainer starts from zero. +- **Confidence:** High — both validators confirmed. + +### G-011 — No written security-incident response plan +- **Category:** Missing +- **Expected:** An internal process for handling security incidents — supply-chain attacks, infrastructure compromise, data breaches — distinct from vulnerability reports. +- **Current:** No such document exists anywhere. +- **Why it matters:** "What do we do if a maintainer key is compromised or a dependency turns out to be backdoored" is a question to answer calmly in advance, not during the incident. +- **Confidence:** High — both validators confirmed. + +### G-012 — No inventory of who and what holds which access +- **Category:** Missing +- **Expected:** A maintained list of access privileges. +- **Current:** No document records who holds administrative, publishing, domain, or signing-key access — and, after the swarm widened the scope, nothing records the *non-human* principals either: the automation tokens and the AI agents that hold write authority and make most of the day-to-day changes. +- **Why it matters:** Access you haven't inventoried is access you can't revoke in an incident, and it's a continuity risk for a small team. +- **Additional context (swarm):** The security reviewer added the project-specific top item: escrow-key custody is a standing ability to decrypt every private branch before publication — categorically more sensitive than any administrative role, and it belongs at the top of the list. +- **Confidence:** High — both validators confirmed; two augmenters widened scope. + +### G-013 — No record of security-announcement subscriptions +- **Category:** Missing +- **Expected:** Subscriptions to security announcements for all languages, libraries, dependencies, and tools in use. +- **Current:** Automated advisory scanning covers the core ecosystem daily, but no document records any human subscription practice for the broader surface (the desktop framework, the second ecosystem, the toolchain). +- **Why it matters:** Automation catches what its database knows; a maintainer subscribed to the right feeds hears about emerging issues before databases update. +- **Confidence:** High — both validators confirmed the documentation absence. + +### G-014 — The security policy names a private reporting channel that is switched off +- **Category:** Divergent *(upgraded from Missing after conclusive verification)* +- **Expected:** A working private reporting pipeline, with the platform's private-reporting feature as a recommended option. +- **Current:** The policy explicitly offers the platform's private vulnerability-reporting feature as a channel — and that feature is confirmed disabled. A report submitted the documented way is undeliverable. Only the email channel works. +- **Why it matters:** This is the single most user-facing defect in the report: the document that exists to help someone quietly report a security hole gives them a dead end. +- **Additional context (swarm):** The validator turned the original inference into proof by querying the setting directly. The related credit in the "already in good shape" list was corrected accordingly. +- **Confidence:** High — conclusively verified against the live platform. + +### G-015 — No legal safe-harbor statement for good-faith researchers +- **Category:** Partial +- **Expected:** The disclosure policy should state legal authorization for good-faith security research. +- **Current:** The policy covers channels, report format, and timelines, but never says the project won't pursue action against researchers acting in good faith. +- **Why it matters:** Researchers increasingly skip projects that don't offer safe harbor; the absence deters exactly the people you want reporting. +- **Confidence:** High — both validators read the full policy. + +### G-016 — No machine-readable security contact file for the website +- **Category:** Missing +- **Expected:** Mirroring the disclosure policy at the standard well-known web location. +- **Current:** No such file or template exists in the repository; the website is hosted elsewhere. +- **Why it matters:** The well-known location is where automated tooling and researchers look first. +- **Confidence:** High — both validators confirmed nothing in-repo feeds such a file. + +### G-017 — No statement on whether a bug bounty exists +- **Category:** Partial +- **Expected:** The policy should state the existence *or explicit absence* of a bug bounty, with conditions. +- **Current:** The policy is silent in both directions. +- **Why it matters:** Reporters plan around expectations; silence invites mismatched ones. +- **Confidence:** High — both validators confirmed. + +### G-018 — Reporters are never asked to hold findings in confidence +- **Category:** Partial +- **Expected:** The policy should request non-disclosure to third parties during the coordination window. +- **Current:** The project commits itself to a coordinated timeline but never asks the reporter for the reciprocal half. +- **Why it matters:** Coordinated disclosure only works if both sides know the terms. +- **Confidence:** High — both validators confirmed. + +### G-019 — The security policy describes an outdated version of the product +- **Category:** Divergent +- **Expected:** Current documentation detailing function, safe usage, and security goals. +- **Current:** The policy has not been touched since launch while the security design advanced through three major revisions; it still describes the older encryption scheme and omits the newer secure transport. The project's own recent research notes admit this. +- **Why it matters:** From the reader's chair: "the one document meant to tell me the current security guarantees is telling me the wrong ones." +- **Additional context (swarm):** The validator strengthened this from self-assessment to hard history: the policy has exactly one edit ever, while the threat model advanced five times since. +- **Confidence:** High — verifiable from the document's change history. + +### G-020 — No readable inventory of third-party components +- **Category:** Partial +- **Expected:** A readable list of third-party libraries, tools, and practices. +- **Current:** Key components appear as prose inside architecture rationale; the complete picture lives only in machine-oriented lock records, and the desktop ecosystem is not mentioned in the overview documents at all. +- **Why it matters:** Users and auditors deciding whether to trust the software need to see what it's made of without reverse-engineering lock files. +- **Additional context (swarm):** Present-day value is mainly for the upcoming professional audit (the packager audience doesn't exist until something is distributed); the hand-patched bundled component (G-033) must appear as a distinct class in any inventory. +- **Confidence:** High — both validators confirmed. + +### G-021 — No statement about sensitive data and the impossibility of true deletion +- **Category:** Missing +- **Expected:** An explicit answer to "does this store personal or sensitive data?" +- **Current:** No document addresses it — for a product whose core purpose is storing secrets, protected content, and private branches. +- **Why it matters:** This product's history model means committed data can never be truly erased — revoked recipients keep what they already had, and rotation is not deletion. A user weighing legal erasure obligations against a history-preserving tool needs that stated plainly before they commit sensitive data, not discovered after. +- **Additional context (swarm):** The security reviewer stressed this must disclose the no-true-delete retention model directly, not be a boilerplate disclaimer. The actor sweep noted the most affected reader is the end user at the moment of deciding what to commit. +- **Confidence:** High — both validators confirmed zero coverage. + +### G-022 — No standing rule for when releases or new dependencies trigger security review +- **Category:** Partial +- **Expected:** Planning security effort around milestones — releases, major features, new third-party components. +- **Current:** Security-focused work demonstrably happens (a dedicated hardening phase, an audit-preparation plan), but each instance was an ad-hoc decision; no standing policy says "changes of kind X trigger a review." +- **Why it matters:** Ad-hoc security effort stops the day attention moves elsewhere; a written trigger survives. +- **Additional context (swarm):** The operations reviewer split this honestly: a lightweight written checklist is proportionate now; a full release pipeline with provenance attestations is deferred until something actually ships. +- **Confidence:** High — both validators confirmed. + +### G-023 — Whether the website mirrors the disclosure policy is unverified +- **Category:** Implicit +- **Expected:** Documentation available at all relevant locations including the project website. +- **Current:** The website exists but is outside this repository; its content was not fetched by any pass. +- **Why it matters:** Needs a five-minute manual check by someone with website access. +- **Confidence:** Low — unverifiable from the repository by design. + +### G-024 — Whether maintainers are actually subscribed to security feeds is unverifiable +- **Category:** Implicit +- **Expected:** Maintainers subscribed to relevant announcement lists. +- **Current:** Nothing in a repository can prove or disprove a personal subscription. +- **Why it matters:** The documentable half is covered by G-013's fix; the rest is an honesty check only the maintainer can do. +- **Confidence:** Low — unverifiable by design. + +### G-025 — Developer-device and infrastructure hygiene is largely unverifiable +- **Category:** Implicit +- **Expected:** Sound operational security for development devices and infrastructure. +- **Current:** What *is* visible looks good: automation runs on platform-hosted throwaway machines, holds only the minimal automatic token, and defaults to read-only permissions. Organization-level settings and device practices are outside repo scope. +- **Why it matters:** Mostly a confirm-and-document task, plus one small permission-tightening nit the reviewers spotted — which the live scorecard has since flagged as a high-severity finding of its own (a write permission granted at the top of one automation script instead of scoped to the step that needs it). +- **Confidence:** Low overall (organization/device half is unverifiable by design) — but the permission nit is now High, confirmed by two independent sources. + +### G-026 — Legal reporting obligations are unaddressed +- **Category:** Implicit +- **Expected:** Incident reporting compliant with the operating jurisdiction's law, where required. +- **Current:** No stated legal entity or jurisdiction anywhere; a genuine silence, unremarkable for a small open-source project. +- **Why it matters:** Becomes relevant if the project formalizes; a maintainer/legal decision, not an engineering task. +- **Confidence:** Low — unverifiable by design. + +### G-027 — Half the project's dependencies have no vulnerability feed at all +- **Category:** Partial +- **Expected:** Vulnerability awareness for *all* languages, libraries, and dependencies. +- **Current:** The core ecosystem has a live daily advisory feed that is demonstrably acted on. The desktop ecosystem — including the desktop framework's own security-advisory stream — has no detection mechanism whatsoever. +- **Why it matters:** A publicly announced vulnerability in a desktop component would sit unnoticed indefinitely. +- **Additional context (swarm):** One modern scanning tool can cover both ecosystems from the already-committed lock records in a single step. +- **Confidence:** High — all four checking agents confirmed. + +### G-028 — Automated code analysis skips the desktop app's language +- **Category:** Partial +- **Expected:** Static analysis in automation "wherever possible." +- **Current:** The analysis service scans the core language and the automation scripts, but not the desktop app's language. +- **Why it matters:** The desktop renderer is exactly where untrusted repository content gets drawn on screen — the classic injection surface. The app's built-in content restrictions are a good mitigation, but they shouldn't be the only line of defense. +- **Additional context (swarm):** The fix is a one-line addition that ships independently of everything else — the cheapest coverage win in the report. +- **Confidence:** High — both validators confirmed the configuration. + +### G-029 — Automation building blocks are referenced by movable labels, not fingerprints +- **Category:** Missing *(surfaced by the swarm — proposed independently by both augmenters)* +- **Expected:** Build-pipeline best practice (and a named check on the scorecard in G-004) is to reference third-party automation components by immutable fingerprint. +- **Current:** Every third-party building block in the automation pipeline is referenced by a movable label that its publisher — or someone who compromises its publisher — can silently repoint at different code. +- **Why it matters:** A repointed label executes attacker code inside the project's automation with that automation's privileges. This exact attack happened at ecosystem scale in 2025 and leaked credentials from thousands of projects. Because the update service already understands fingerprint references, fixing this costs nothing ongoing. +- **Additional context (third round):** The live scorecard now raises eight open findings for this, at exactly the locations this report predicted, and the just-added scorecard workflow itself demonstrates the correct fingerprint-pinned pattern to copy. One building block was version-bumped the same morning — still by movable label, so the gap stands. +- **Confidence:** High — proposed independently twice, confirmed by direct inspection, now corroborated live by the scorecard. + +### G-030 — Incident planning ignores the compromised-AI-agent scenario +- **Category:** Missing *(surfaced by the actor-perspective sweep)* +- **Expected:** An incident process covering attacks on the project's development systems. +- **Current:** AI agents hold real write authority in this repository and do much of the work, yet no document contemplates a manipulated agent — tricked through crafted content into introducing a flaw or taking a harmful action — as an incident type with its own response (revoke agent credentials, audit agent-authored changes, revert). +- **Why it matters:** This is the incident class this project is *unusually* exposed to and the guide, written for human teams, cannot see. The response playbook differs meaningfully from the human-compromise cases. +- **Confidence:** Medium — single-source proposal, no contradiction, sibling of the well-confirmed G-011. + +### G-031 — Nothing keeps private reports out of the automated public triage pipeline +- **Category:** Implicit *(surfaced by the actor-perspective sweep)* +- **Expected:** Reports handled privately by designated people, tracked internally. +- **Current:** The project's default triage is automated and public — agents process the public issue tracker, and automation auto-files findings there. No written boundary says a privately received vulnerability report must never enter that pipeline. **Important caveat:** no leak has occurred or been demonstrated; the automated filings to date concern already-public advisories. The gap is the absence of a guardrail, not an incident. +- **Why it matters:** From the reporter's chair: "I want to report quietly, but this project's triage runs bots over public issues — what guarantees my report doesn't become the next auto-filed public ticket?" +- **Confidence:** Low — genuine but single-source and resting on an interaction of policies rather than a direct checklist item. + +### G-032 — Nothing requires a human in the review loop +- **Category:** Missing *(surfaced by the actor-perspective sweep)* +- **Expected:** Required code review before merging — whose intent is an independent second set of eyes with different failure modes than the author. +- **Current:** No rule — platform or written — requires the reviewer to be human, or even distinct in kind from the author. In an agent-operated repository, "reviewed" can be satisfied by one agent approving another agent's change, which shares the author's failure modes. +- **Why it matters:** The guide's control assumes something this project's operating model doesn't guarantee. Closing G-009 with approval counts alone would not close this. +- **Confidence:** Medium — the platform facts it rests on were verified by the validator; the framing is single-source. + +### G-033 — A hand-patched bundled component has no visible provenance record +- **Category:** Partial *(surfaced jointly by the actor sweep and the security augmenter)* +- **Expected:** Supply-chain transparency — inventories and bills of materials that give users accurate context. +- **Current:** One third-party component is bundled in-tree as a hand-patched copy carrying a security fix ahead of its upstream, and the advisory scanner is configured to suppress the corresponding alert. The only records of this are a comment inside an automation script and a note inside the bundled folder itself — nothing at the level a security reader or tool would find. Any mechanically generated inventory today would misrepresent this component as the unpatched original. +- **Why it matters:** This is a correctness trap for G-005 and G-020: publish an inventory without the annotation and it will either falsely alarm (component looks vulnerable) or falsely reassure (component looks like clean upstream when it is a local fork). +- **Additional context (third round):** **The predicted trap has now occurred in a real tool run.** The scorecard's first scan read the raw dependency records and reported the patched component as an existing vulnerability — the exact false alarm this gap warned any version-keyed consumer would produce. +- **Confidence:** High — two independent proposers; the misrepresentation is now demonstrated, not predicted. + +### G-034 — No hardening guide for people who run the server component +- **Category:** Partial *(surfaced by the actor-perspective sweep; flagged borderline in scope)* +- **Expected:** Attention to infrastructure security and hosting exposure. +- **Current:** The security *mechanisms* of the server component are thoroughly documented at the design level, but no task-oriented guide tells a first-time operator how to stand it up safely for a given trust level or what to do if their instance is attacked. +- **Why it matters:** Operators of the server are the actor whose infrastructure is on the line; design documents aimed at contributors don't serve them. +- **Confidence:** Low — single-source, self-flagged as the weakest-tier finding; arguably product documentation rather than an OSTIF-guide obligation. + +### G-035 — The accepted-advisory list omits one member of its own accepted family +- **Category:** Partial *(added in the third evidence round, surfaced by disagreement between two live scanners)* +- **Expected:** Staying current with advisories means every deliberately accepted one is on the documented accepted-risk list with its removal condition — and independent scanners should agree with that documented posture. +- **Current:** The new scorecard's vulnerability check counts 18 known advisories in the dependency tree; the project's daily advisory scanner documents 17 accepted ones with removal conditions. The difference is a single advisory for an unmaintained desktop-toolkit binding — the *same family* as nine advisories already on the accepted list with a documented removal condition. This one member was simply left off, and the omission was invisible because the daily scanner only warns (rather than fails) on that advisory class. +- **Why it matters:** Not a new vulnerability — an accepted-risk record that is incomplete. Until fixed, the two scanners tell different stories, and anyone comparing them (an auditor, a future maintainer) has to rediscover why. +- **Confidence:** High — reconciled directly against both tools' live output and the dependency records. + +> Engineers are the audience. Each entry adds technical fidelity to its Section 2 gap. Gaps with no entry (G-023, G-024, G-026) require a maintainer decision or an out-of-repo check rather than technical action — expected for Implicit items. + +#### G-001 — Technical detail +- **Locations:** `crates/repo/src/wire.rs` (frame/length parsing); pack ingest via `crates/repo/src/stdio_transport.rs` / `transport.rs`; `crates/gitio/src/import.rs`; sealed-object/manifest parsing in `crates/repo/src/private.rs`; `.github/workflows/ci.yml:47-48`; `CONTRIBUTING.md:22-26` +- **Relevant identifiers:** canonical length-prefixed encoding (CLAUDE.md core invariant); `MAX_OBJECT_SIZE` (P28/ADR-0039) +- **Specifics:** No `proptest`/`quickcheck`/`cargo-fuzz` dependency or target exists anywhere in the workspace. ADR-0039 self-identifies a residual weakness: the wire frame-length header can allocate up to the cap before a chunk boundary is enforced. +- **Remediation direction:** (1) proptest roundtrip on the canonical encoding: `encode(decode(x)) == x` and `decode` never panics on arbitrary bytes — runs on the pinned stable toolchain with zero CI change. (2) One `cargo-fuzz` target on the `wire.rs` decode entry point in a separate nightly-toolchain scheduled job. Widen to pack ingest and git import after. +- **Effort signal:** Small (proptest) / Medium (cargo-fuzz nightly job) — split per the devops review. +- **Risks / dependencies:** None for proptest. cargo-fuzz needs nightly + sanitizers; keep it out of the merge-gating path. + +#### G-002 — Technical detail +- **Locations:** (absent) no `.clusterfuzzlite/` or `fuzz/` directory +- **Specifics:** OSS-Fuzz onboarding requires fuzz targets (G-001) plus a `projects/` PR against google/oss-fuzz and ongoing external triage. +- **Remediation direction:** Defer. Intermediate step: ClusterFuzzLite running the same cargo-fuzz targets in-repo CI on PRs. +- **Effort signal:** Large — external onboarding and standing triage burden. +- **Risks / dependencies:** Strictly downstream of G-001. Reopen trigger: targets exist and local fuzzing finds real bugs. + +#### G-003 — Technical detail +- **Locations:** `Cargo.toml:26` (`publish = false`); `.github/workflows/` (no release workflow) +- **Specifics:** No `--remap-path-prefix`, `SOURCE_DATE_EPOCH`, or attestation tooling. Nothing is distributed, so no consumer can perform a comparison today. +- **Remediation direction:** Defer until a first distributed artifact. Rust-core determinism is tractable then; the Tauri bundle is the hard case (platform installers are notoriously non-deterministic). +- **Effort signal:** Large — and near-zero present value per the swarm. +- **Risks / dependencies:** Blocked behind a release pipeline (G-022 deferred half / T-24). + +#### G-004 — Technical detail +- **Locations:** `.github/workflows/scorecard_analysis.yml` (added on `main` in #74/#75, post-dating the audit's evidence snapshot `d7106e5`; weekly cron + push; `publish_results: true`; SARIF → code scanning); 17 open Scorecard alerts (#4–#20) on the code-scanning surface, uploaded 2026-07-18T08:29Z from commit `d6e60ac` +- **Specifics:** The workflow itself is fully SHA-pinned (`ossf/scorecard-action@4eaacf05… # v2.4.3`, `actions/checkout@9c091bb2… # v7.0.0`, `github/codeql-action/upload-sarif@8aad20d1… # v4.36.2`), `permissions: read-all` top-level with job-scoped `security-events: write` + `id-token: write`, `persist-credentials: false`. First-run check scores: PinnedDependencies 2, BranchProtection 3, CodeReview 0, Fuzzing 0, Vulnerabilities 0, TokenPermissions 9, SAST 9, CITests 9; `CIIBestPracticesID` (OpenSSF badge) 0; `MaintainedID` 0 is informational only (repo < 90 days old). +- **Remediation direction:** Triage the 17 open alerts (this report's todos cover the substantive ones: T-2/T-9/T-13/T-20/T-26); optionally pursue the OpenSSF best-practices badge; skip deep OWASP ASVS investment (web-app standard; minimal applicable subset). +- **Effort signal:** Small — the setup half is done; alert triage remains. +- **Risks / dependencies:** None. + +#### G-005 — Technical detail +- **Locations:** `Cargo.lock` (workspace root); `apps/desktop/package-lock.json` +- **Remediation direction:** `cargo-cyclonedx` (or `cargo sbom` for SPDX) + `@cyclonedx/cyclonedx-npm`/`npm sbom` as CI artifacts — both lockfiles are committed, so inputs exist. **Must** carry the G-033 provenance annotation for `vendor/glib-0.18.5-patched` before being published anywhere. +- **Effort signal:** Small for the CI artifact; release-attachment deferred with G-022's pipeline. +- **Risks / dependencies:** G-033 is a correctness precondition. + +#### G-006 — Technical detail +- **Locations:** `.github/workflows/ci.yml` (Rust-only); `apps/desktop/package.json` (declares `typecheck`: `tsc -b`, `test`: `vitest run`); `apps/desktop/package-lock.json` (lockfileVersion 3, ~234 packages, sha512 integrity hashes — never verified because no workflow runs any npm command) +- **Remediation direction:** One `desktop` CI job: `npm ci` → `npm audit --audit-level=high` (or `osv-scanner`) → `npm run typecheck` → `npm run test`. +- **Effort signal:** Small — scripts and lockfile already exist. +- **Risks / dependencies:** Watch items: `@pierre/trees@1.0.0-beta.5`, `@pierre/theming@0.0.2` (pre-release, small-publisher, in the content-rendering path). + +#### G-007 — Technical detail +- **Locations:** GitHub repo settings (live API: `security_and_analysis` — `secret_scanning`, `secret_scanning_push_protection`, non-provider patterns, validity checks all `disabled`) +- **Specifics:** The P5 scanner (ADR-0017) gates sc-commit content only; the git export/mirror bridge (P9/P18, ADR-0016/0028) materializes content into GitHub-hosted git where only GitHub's scanning applies. First-party token hygiene is strong (`crates/repo/src/serve_tokens.rs:104-131`, BLAKE3-at-rest + constant-time compare) — the risk is leaked identity keys (`scl-sk-`) or PATs on the git side. +- **Remediation direction:** Enable secret scanning + push protection in repo settings. +- **Effort signal:** Trivial — toggles. + +#### G-008 — Technical detail +- **Locations:** GitHub repo settings (`dependabot_security_updates: disabled`, live-verified); `.github/dependabot.yml:11-29` (semver-major ignores across `x25519-dalek`, `ed25519-dalek`, `chacha20poly1305`, `sha2`, `hkdf`, `rand_core`, `rand_chacha`) +- **Specifics:** A critical advisory requiring a major bump on an AEAD/signature crate surfaces through neither the scheduled version PRs (major ignored) nor security updates (disabled); daily cargo-audit only flags. +- **Remediation direction:** Enable dependency graph → Dependabot alerts → security updates. Consider whether the RustCrypto major-version ignore should carve out security advisories. +- **Effort signal:** Trivial — one-click setting. + +#### G-009 — Technical detail +- **Locations:** Live ruleset `id 18739705` on `main`: rules `deletion`, `non_fast_forward`, `pull_request` with `required_approving_review_count: 0`, `required_reviewers: []`, `require_code_owner_review: false`; **no** `required_status_checks` rule. Corroborated by live Scorecard alerts #14 (`CodeReviewID` score 0: "Found 0/26 approved changesets") and #4 (`BranchProtectionID` score 3: "does not require approvers… no status checks found to merge onto branch 'main'") +- **Remediation direction:** Add `required_status_checks` (the `ci` + `codeql` checks, require branches up to date). Hold `required_approving_review_count > 0` until a second reviewing principal exists (a solo maintainer cannot self-approve) — that half is tracked as G-032/T-16. +- **Effort signal:** Small — ruleset edit. +- **Risks / dependencies:** Rests on live GitHub configuration; **reverify the ruleset state before acting** (validator flag). + +#### G-010 — Technical detail +- **Locations:** `SECURITY.md:31-59` (external-facing only); `docs/agents/issue-tracker.md` (no security handling) +- **Remediation direction:** Write the internal response process: named responsible role, acknowledgment step, private tracking location, triage/impact analysis, remediation planning, third-party comms, reporter verification. Incorporate the G-031 boundary (below). +- **Effort signal:** Small–Medium — documentation. + +#### G-011 — Technical detail +- **Locations:** (absent) — `docs/THREAT-MODEL.md` is cryptographic/protocol scope, not operational +- **Remediation direction:** Write an incident-response doc covering: maintainer key compromise, backdoored dependency discovered post-hoc, org/account takeover, data breach — **plus the compromised-agent class (G-030)**: revoke agent credentials, audit agent-authored commits, revert. +- **Effort signal:** Medium — documentation with real decisions. + +#### G-012 — Technical detail +- **Locations:** (absent) — proposed `docs/agents/ACCESS.md` +- **Specifics:** Must cover humans (GitHub org/repo admin, DNS for git-agentic.com, signing-key custody, crates.io — currently N/A with `publish = false`) **and** non-human principals: per-workflow `GITHUB_TOKEN` scopes (`audit.yml:23-28` grants `checks: write`, `issues: write`; `codeql.yml` grants `security-events: write`) and agent `gh`-CLI write authority. **Escrow-key custody first** — a standing decrypt privilege over every private branch pre-publish (THREAT-MODEL, ADR-0044). +- **Effort signal:** Small — a single page; resist over-engineering. + +#### G-013 — Technical detail +- **Locations:** (absent) +- **Remediation direction:** Short doc listing feeds and who watches them: RustSec-announce, Tauri GHSA, npm/OSV for the desktop tree, GitHub advisory notifications, toolchain announcements. +- **Effort signal:** Small. + +#### G-014 — Technical detail +- **Locations:** `SECURITY.md:34-38`; live API `private-vulnerability-reporting` → `{"enabled": false}` +- **Remediation direction:** **Maintainer decision:** enable the toggle (preferred — it's the better channel) or remove the claim from SECURITY.md. Either way the text and the configuration must agree. Bundle with the G-019 rewrite (same file, same PR). +- **Effort signal:** Trivial (toggle) — or part of the T-8 SECURITY.md PR. + +#### G-015 / G-017 / G-018 — Technical detail (single SECURITY.md revision) +- **Locations:** `SECURITY.md` (full file, 59 lines) +- **Remediation direction:** In one revision add: a good-faith safe-harbor statement; an explicit bug-bounty status ("no bounty at this time" suffices); a reporter non-disclosure request mirroring the existing 90-day project commitment. +- **Effort signal:** Small — one document PR shared with G-014/G-019. + +#### G-016 — Technical detail +- **Locations:** (absent); website is out-of-repo +- **Remediation direction:** Add an RFC 9116 `security.txt` template in-repo; deploying to `/.well-known/` on git-agentic.com is a website task (pairs with the G-023 manual check). +- **Effort signal:** Trivial in-repo; website deployment external. + +#### G-019 — Technical detail +- **Locations:** `SECURITY.md` (single commit `77fb32e` ever; describes pre-P32/P33 design; still frames protected paths as convergent encryption; omits `sc+https://`); `docs/THREAT-MODEL.md` (5 later commits through P32/P33/P34); `docs/research/cryptography-audit-options.md:139-140` (project's own admission) +- **Remediation direction:** Reconcile SECURITY.md with P32 (TLS) and P33 (randomized sealing) — already a named precondition in the audit-prep research note. Same PR as G-014/015/017/018. +- **Effort signal:** Small. + +#### G-020 — Technical detail +- **Locations:** `CLAUDE.md` "Stack & tooling" (prose, no npm tree); `Cargo.lock`; `apps/desktop/package-lock.json` +- **Remediation direction:** One human-readable inventory doc spanning both ecosystems, flagging vendored/patched deps (G-033) as a distinct class. Can be partially generated, then annotated. +- **Effort signal:** Small. + +#### G-021 — Technical detail +- **Locations:** (absent) — zero matches for PII/personal-data/GDPR anywhere in docs +- **Remediation direction:** A data-handling statement covering: what sensitive data the system stores (secrets, protected content, private branches), where it lives, what leaves the machine, and — explicitly — the append-only / rotation-≠-erasure retention model (ADR-0019, THREAT-MODEL) and its tension with erasure regimes. +- **Effort signal:** Small — the source material all exists in ADRs/THREAT-MODEL. + +#### G-022 — Technical detail +- **Locations:** `CONTRIBUTING.md` (no release/security cadence); `ROADMAP.md` P28 (reactive precedent) +- **Remediation direction:** Now: a checklist in CONTRIBUTING.md — "new dependency, or any change touching `crypto`/`tlsio`/transport → threat-model + audit pass before merge." Deferred: tag-triggered release pipeline with SLSA provenance (`slsa-framework/slsa-github-generator`) once a first artifact ships, attaching the G-005 SBOM. +- **Effort signal:** Small (checklist) / Large (pipeline, deferred). + +#### G-025 — Technical detail +- **Locations:** `.github/workflows/audit.yml:23-28` (workflow-top-level `checks: write` + `issues: write` — applies to every step incl. checkout). Corroborated by live Scorecard alert #5 (`TokenPermissionsID`, high severity, on `audit.yml:25`) +- **Remediation direction:** Scope write permissions to the job/step that needs them; confirm org-level 2FA; document the baseline ("GitHub-hosted ephemeral runners only, `GITHUB_TOKEN` only, no long-lived cloud keys"). +- **Effort signal:** Small — confirm-and-document. + +#### G-027 — Technical detail +- **Locations:** `.github/dependabot.yml` (no `npm` ecosystem entry); `.github/workflows/audit.yml` (Rust-only feed) +- **Remediation direction:** Add `package-ecosystem: npm`, `directory: /apps/desktop` to dependabot.yml — same PR as the G-006 CI job. Alternative single-tool path: `osv-scanner` over both lockfiles. +- **Effort signal:** Trivial. + +#### G-028 — Technical detail +- **Locations:** `.github/workflows/codeql.yml:22-29` (matrix: `rust`, `actions` only) +- **Remediation direction:** Add `- language: javascript-typescript` / `build-mode: none` to the matrix, reusing the existing `paths-ignore`. Needs no npm install; ships independently of G-006 (devops adjudication: do **not** chain them). +- **Effort signal:** Trivial — one matrix entry. + +#### G-029 — Technical detail +- **Locations:** `.github/workflows/ci.yml:24,39,42`; `codeql.yml:31,32,42`; `audit.yml:35,36` — all `uses:` refs are mutable tags (`actions/checkout@v7`, `dtolnay/rust-toolchain@1.96.1`, `Swatinem/rust-cache@v2`, `github/codeql-action/{init,analyze}@v4` after #72's v3→v4 bump — still a tag, `rustsec/audit-check@v2`). Corroborated by 8 open live Scorecard `PinnedDependenciesID` alerts (#6–#13) at exactly these lines. +- **Specifics:** Third-party pins first (`Swatinem/rust-cache`, `rustsec/audit-check`, `dtolnay/rust-toolchain`); GitHub-owned `actions/*`/`github/*` are lower blast-radius. Token scopes in reach of a compromised action: `issues: write`, `checks: write` (audit), `security-events: write` (codeql). Precedent: tj-actions/changed-files, CVE-2025-30066. +- **Remediation direction:** Pin every action to a full 40-char commit SHA with a `# vX` comment — copy the pattern from the repo's own `scorecard_analysis.yml`, which already does this correctly. The existing `github-actions` dependabot ecosystem keeps SHAs updated — zero ongoing cost. +- **Effort signal:** Small. + +#### G-030 — Technical detail +- **Locations:** `docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`, `CLAUDE.md` "Agent skills" (agent write authority); no incident doc (G-011) +- **Remediation direction:** Include an agent-compromise section in the G-011 incident doc: detection signals (anomalous agent commits/labels), response (revoke agent credentials/sessions, audit agent-authored changes since last-known-good, revert), and injection-source review (issue bodies, dependency docs, upstream skills). +- **Effort signal:** Folded into G-011's Medium. + +#### G-031 — Technical detail +- **Locations:** `docs/agents/issue-tracker.md` + `triage-labels.md` (public agent triage by design); `.github/workflows/audit.yml:26-28` (`issues: write`, auto-files findings) +- **Remediation direction:** One boundary rule in the G-010 process doc: "reports received via the private channel are never filed, labeled, or processed through the public/agent triage pipeline; agents triaging public issues must stop and escalate on content resembling an undisclosed vulnerability." +- **Effort signal:** Trivial — a paragraph, folded into T-16. +- **Risks / dependencies:** No demonstrated leak; guardrail-in-advance. + +#### G-032 — Technical detail +- **Locations:** Ruleset 18739705 (`required_reviewers: []`, count 0); `CONTRIBUTING.md` (no reviewer-identity requirement) +- **Remediation direction:** Written policy: agent-authored changes require a human reviewer distinct from the author (enforce via ruleset review-count + CODEOWNERS when a second principal exists). Distinct from G-009's status-check fix. +- **Effort signal:** Small (policy now) — enforcement grows with the team. + +#### G-033 — Technical detail +- **Locations:** `Cargo.toml:9-10` (`[patch.crates-io] glib = { path = "vendor/glib-0.18.5-patched" }`); `audit.yml:39-48` (RUSTSEC-2024-0429 ignore + "matches versions only" comment); `vendor/glib-0.18.5-patched/PROVENANCE.md` (exists but unreferenced from any top-level doc) +- **Specifics:** `Cargo.lock` records `glib 0.18.5` with no marker distinguishing the patched vendor copy — any mechanical SBOM/inventory misrepresents it. **Demonstrated live:** Scorecard alert #18 (`VulnerabilitiesID`) now reports "Project is vulnerable to: RUSTSEC-2024-0429 / GHSA-wrw7-89jp-8q8g" — the OSV check read the lockfile version and produced exactly the predicted false positive against the patched copy. +- **Remediation direction:** Surface the provenance (patch content, rationale, removal trigger = upstream fix) in the G-020 inventory and as an annotation in any G-005 SBOM; link PROVENANCE.md from a top-level security doc. +- **Effort signal:** Small. + +#### G-034 — Technical detail +- **Locations:** ADR-0036/0040/0041/0042 (mechanisms); `docs/THREAT-MODEL.md` (boundaries); `ROADMAP.md` Deferred (~685-697, known listener gaps without interim mitigations) +- **Remediation direction:** Deferred: a task-oriented `sc serve` operator guide (minimum flag set per trust level, token/TLS-key custody, incident steps). Reopen when operators deploy at scale or user-facing ops docs are written. +- **Effort signal:** Medium. + +#### G-035 — Technical detail +- **Locations:** Live Scorecard alert #18 (`VulnerabilitiesID`: 18 advisories) vs `.github/workflows/audit.yml:48` on `origin/main` (`ignore:` list: 17 advisories). Set-difference: **RUSTSEC-2024-0413** (`atk` 0.18.2 in `Cargo.lock`; "gtk-rs GTK3 bindings - no longer maintained", confirmed via the OSV API) +- **Specifics:** Same GTK3-unmaintained family as the nine ignored siblings (RUSTSEC-2024-0411/0412/0414–0420) whose removal gate ("remove… when Tauri 3 moves the stack to GTK4") is documented in `audit.yml:39-45`. cargo-audit doesn't fail on it because unmaintained-class advisories warn rather than error — so the omission surfaced only when Scorecard's OSV check counted it. +- **Remediation direction:** Add `RUSTSEC-2024-0413` to the `ignore:` list under the existing GTK3 removal-gate comment (one line), keeping the two scanners' stories consistent; longer-term, the G-033/T-11 provenance work is where the acceptance record should live. +- **Effort signal:** Trivial — one list entry. +- **Risks / dependencies:** None; the Scorecard alert itself will only close via dismissal or the GTK4 migration, since its OSV check does not honor cargo-audit ignores. + +--- + +## 4. Swarm Findings + +### How this section relates to sections 2 and 3 + +Entries are grouped by the kind of signal the swarm produced and reference the affected gap IDs. Use this section to gauge confidence and spot disagreements worth a second look before acting. + +### Swarm composition + +- **Validators run:** + - `evidence-based-investigator` — independent repo-side re-verification of every cited file and grep; no API access, so the live-platform halves of G-007/008/009/014 were explicitly left to the other validator. + - `adversarial-validator` — full re-verification *with* live API access; independently reproduced the security-settings block, the ruleset configuration, and the private-reporting toggle. Produced the one material counter-finding (G-009's mechanism). +- **Augmenters run:** + - `junior-developer` (actor-perspective sweep) — enumerated 10 actor classes; surfaced the AI-agent-contributor and non-human-principal classes the human-framed guide structurally cannot see (→ G-030/031/032/034, and G-033 jointly). + - `adversarial-security-analyst` — supply-chain, secrets, disclosure, and crypto-custody exploit context (→ G-029 jointly). + - `devops-engineer` — effort estimates and do-now/do-soon/defer ranking calibrated to a pre-1.0, solo-maintainer, source-only project (→ G-029 jointly). +- **Total runs:** 5, plus a second analyzer pass that independently re-verified every swarm claim before minting G-029…G-034 (none were accepted on assertion alone), and a project-manager synthesis run consolidating this section. + +### Confirmations + +- **G-001…G-008, G-010…G-013, G-015…G-022, G-027, G-028** — confirmed independently by **both validators** via direct grep/find/git-history checks; every spot-checked citation matched file content exactly. The augmenters added named targets, effort estimates, and severity refinements on top (see Augmentations). +- **G-007 / G-008** — the adversarial validator reproduced the exact live disabled-settings block the investigator could only confirm repo-side. Two-agent confirmation, one with live proof. +- **G-014** — upgraded from inference to proof: the private-reporting toggle queried directly, `{"enabled": false}`. Conclusive. +- **G-019** — strengthened: the security policy has exactly one commit ever, while the threat model advanced five times through three major design revisions — git-verifiable drift, not just the project's own self-assessment. +- **G-029** — proposed **independently by two augmenters**, therefore checked first and hardest; confirmed by direct inspection of every automation reference with no exceptions. +- **G-033** — surfaced jointly by two agents from different vantages (auditor-transparency and supply-chain-correctness); the patch and its alert-suppression are directly cited in the repository. + +### Contradictions + +- **G-009** — **Disagreement:** the primary analysis's evidence (legacy branch-protection query returning "not protected" → "nothing prevents a direct push") was **wrong**; an active ruleset blocks direct pushes, force-pushes, and deletion for everyone with no bypass. **Adjudication:** mechanism corrected in the second pass; the surviving gap holds (zero required approvals, no required status checks — a proposal with failing checks can merge). Category stays Partial. Rests on live platform configuration — **reverify before acting** (T-9). +- **Satisfied over-credit #1** — **Disagreement:** the first pass credited "private-reporting channel explicitly named, including the platform's native mechanism" as satisfied; the validator proved the platform-native half is disabled. **Adjudication:** only the email channel is live; credit corrected in Section 1 and tracked as G-014 (Divergent). +- **Satisfied over-credit #2** — **Disagreement:** "CI *enforces* linting, formatting, and the full test suite on every PR" overstated — the checks run on every proposal but a red run does not block merge (no required-status-checks rule). **Adjudication:** downgraded to "runs" in Section 1; the enforcement half lives in G-009/T-9, not as a new gap. + +### Augmentations + +- **G-001** — security: the fuzz recommendation has a concrete, pre-motivated target — the project's own design record admits a residual input-length weakness in the wire parser. devops: malformed-input crashes are a remote denial-of-service on the server component; decoder targets before generic property tests. +- **G-002** — devops: use the lightweight self-hosted continuous-fuzzing route before the external service; the external service is disproportionate for a pre-1.0 solo project. +- **G-003 / G-005 / G-020 (packager angle)** — actor sweep: the most-affected actor (downstream packager / binary consumer) does not exist yet — nothing is published or distributed. Premature-until-distribution; present-day value survives only via the auditor vantage (G-033). +- **G-004** — devops: cheapest forcing-function in the set; its dashboard automatically tracks G-001, G-009, G-022, and G-029 thereafter. +- **G-006 / G-027** — security: one modern scanner covers both ecosystems from the two committed lockfiles; the desktop framework's own advisory stream currently has no detection path; two pre-release small-publisher rendering components deserve watching. The committed integrity fingerprints are never actually verified because automation never installs the app. +- **G-007** — security: first-party secret handling is strong (hashed at rest, constant-time comparison), which narrows this gap precisely to the platform backstop for the export/mirror path — most plausibly a developer's own identity key file, a documented footgun of this tool. +- **G-008** — security: the update configuration ignores major-version bumps across the entire cryptography stack; combined with the disabled toggle, the highest-value attack target has the weakest automated alerting in the repository. +- **G-009 / G-032** — devops: a solo maintainer cannot approve their own proposal under platform rules, so approval requirements need a second reviewing principal first; require passing checks now, approvals when the team grows. +- **G-012** — security: escrow-key custody — a standing ability to decrypt every private branch before publication — belongs at the top of the inventory, above any administrative role. Actor sweep: the inventory must include non-human principals, who make most of the writes. +- **G-019 / G-021** — actor sweep: the most-affected reader is the end user consulting the policy to decide what is safe to commit, not the auditor. +- **G-021** — security: the statement must plainly disclose the no-true-delete retention model (rotation is not erasure; revoked recipients keep what they had) — the exact tension a user weighing legal erasure obligations needs stated up front. +- **G-028** — security: the desktop renderer is where untrusted repository content crosses into a browser-engine view — the classic injection surface; content-security restrictions are a mitigation, not a substitute for analysis. devops: one-line addition, ships independently. +- **G-029** — security: not theoretical — the same movable-label attack compromised a widely used automation component in 2025 (CVE-2025-30066), leaking credentials across thousands of projects. devops: the update service already maintains fingerprint pins, so the fix has zero ongoing cost. +- **G-030 / G-031 / G-032** — actor sweep: all three exist because the guide assumes human teams; this repository's agent-operated model is the actor class the guide structurally cannot see. + +### Post-swarm live-evidence addendum (third round, 2026-07-18) + +After the swarm ran and the report was first rendered, the live code-scanning surface was checked at the user's request — and it had changed the same morning: a scorecard workflow (recommended by G-004/T-1) had just been added and completed its first run. That run acts as an unplanned sixth, fully independent check on this report: + +- **Corroborated at the exact predicted locations:** G-029 (8 pinned-dependencies alerts on the same file lines), G-009/G-032 (0 of 26 merged changes approved; no status checks gate merging), G-025's permission nit (high-severity token-permissions alert on the same line), G-001/G-002 (fuzzing scored 0). +- **Demonstrated, not just predicted:** G-033 — the scanner reported the patched bundled component as an existing vulnerability, the exact false positive this report warned about. +- **Changed:** G-004 recategorized Missing → Partial (the scorecard now runs; its findings await triage). +- **New:** G-035 — reconciling the scanner's 18-advisory count against the audit workflow's 17-entry accepted list exposed one undocumented member of an already-accepted advisory family. +- **Clean signals:** zero open code-analysis alerts (three historical memory-safety findings fixed); test-coverage and analysis-coverage checks scored 9/10. + +### Confidence summary + +| Confidence | Gap IDs | Interpretation | +|------------|---------|----------------| +| **High** (27) | G-001, G-002, G-003, G-004, G-005, G-006, G-007, G-008, G-009, G-010, G-011, G-012, G-013, G-014, G-015, G-016, G-017, G-018, G-019, G-020, G-021, G-022, G-027, G-028, G-029, G-033, G-035 | Confirmed by both validators and/or two independent sources with reproduced evidence (G-009 and G-029/G-033 additionally corroborated by the live scorecard run); safe to act on. | +| **Medium** (2) | G-030, G-032 | Solid fact base; single-augmenter sharpenings without contradiction (G-032's platform facts verified; its policy framing single-source). | +| **Low** (6) | G-023, G-024, G-025, G-026, G-031, G-034 | Unverifiable-from-repo by design, or single-source with self-flagged caveats; adjudicate or check manually before investing. | + +--- + +## 5. Actionable TODO List + +The prioritized work plan, consolidated by the project-manager synthesis from the devops ranking, the security severity notes, and the actor sweep's premature-until-distribution flags, updated in the third evidence round. Every one of the 35 gaps traces to a todo or to the explicit "not an engineering task" list at the end. + +### Tier: Now — small effort, high value, actionable on a source-only repo today + +| # | Closes | Action | Effort | +|---|--------|--------|--------| +| T-1 | G-004 | ~~Add the `ossf/scorecard-action` workflow~~ **Partly done** (landed same-day as #74/#75, before this report was finished). Remaining: triage the 17 open Scorecard alerts — the substantive ones map to T-2, T-9, T-13, T-20, T-26; `MaintainedID` is informational; decide on the OpenSSF badge. | Small | +| T-2 | G-029 | Pin all GitHub Actions to full 40-char commit SHAs (third-party first: `Swatinem/rust-cache`, `rustsec/audit-check`, `dtolnay/rust-toolchain`). Copy the pattern from the repo's own `scorecard_analysis.yml`, which is already correctly SHA-pinned. Closes 8 open Scorecard alerts. Dependabot already maintains SHA pins — no ongoing cost. | Small | +| T-3 | G-028 | Add `- language: javascript-typescript` / `build-mode: none` to the CodeQL matrix. Ships independently — do not chain to T-4. | Trivial | +| T-4 | G-006, G-027 (detection) | Add a `desktop` CI job: `npm ci` → `npm audit --audit-level=high` (or `osv-scanner`) → `npm run typecheck` → `npm run test`. The renderer currently has no CI at all. | Small | +| T-5 | G-027 | Add `package-ecosystem: npm` / `directory: /apps/desktop` to `.github/dependabot.yml` (same PR as T-4). | Trivial | +| T-6 | G-008 | Enable the Dependabot security-updates toggle (dependency graph + alerts first). The only automated safety net the npm tree and the major-version-ignored RustCrypto stack would get. | Trivial | +| T-7 | G-007 | Enable GitHub secret scanning + push protection — the backstop for the git export/mirror surface the in-house scanner doesn't cover. | Trivial | +| T-8 | G-014, G-019, G-015, G-017, G-018 | **Single SECURITY.md PR:** enable private vulnerability reporting (or remove the claim — maintainer decision); reconcile stale pre-P32/P33 claims; add safe-harbor language, bug-bounty status, and a reporter non-disclosure request. | Small | +| T-9 | G-009 | Extend the `main` ruleset with required status checks (`ci`, `codeql`; branches up to date). Hold required-approval count at 0 until a second reviewing principal exists (see T-16). **Reverify live ruleset state first.** Closes the substantive half of Scorecard alerts #4/#14. | Small | +| T-26 | G-035 | Add `RUSTSEC-2024-0413` (`atk`, GTK3-unmaintained family) to `audit.yml`'s `ignore:` list under the existing GTK3 removal-gate comment, so cargo-audit and Scorecard tell one consistent story. | Trivial | + +### Tier: Soon — small-to-medium; auditor and documentation value now + +| # | Closes | Action | Effort | +|---|--------|--------|--------| +| T-10 | G-005, G-033 | Generate a two-ecosystem SBOM as a CI artifact (`cargo-cyclonedx` + npm), **with the patched-glib provenance annotation** — publishing without it misrepresents the dependency. | Small | +| T-11 | G-020, G-033 | Write a human-readable third-party inventory spanning both ecosystems; vendored/patched deps as a distinct class; link `vendor/glib-0.18.5-patched/PROVENANCE.md` from a top-level doc. | Small | +| T-12 | G-001 (start) | Add a proptest roundtrip on the canonical encoding (`encode(decode(x)) == x`; no panic on arbitrary bytes). Free on the pinned stable toolchain; guards a core invariant. | Small | +| T-13 | G-001 (advance), G-002 (setup) | One `cargo-fuzz` nightly target on the `wire.rs` decode path — ADR-0039's self-identified weakness; remote-DoS blast radius on `sc serve`. | Medium | +| T-14 | G-012 | Write a single-page `docs/agents/ACCESS.md`: escrow-key custody at the top, then human roles (admin, DNS, signing keys), then non-human principals (per-workflow token scopes, agent `gh` authority). | Small | +| T-15 | G-022 | Add a release/security-review checklist to CONTRIBUTING.md: "new dependency, or any change touching `crypto`/`tlsio`/transport → threat-model + audit pass before merge." | Small | +| T-16 | G-010, G-031, G-032 | Document the internal vulnerability-response process, including (a) the boundary keeping private reports out of the public agent-triage pipeline and (b) a human-in-the-loop review requirement for agent-authored changes. | Small–Medium | +| T-17 | G-011, G-030 | Document the security-incident response process, including the compromised / prompt-injected agent class (revoke agent credentials, audit agent-authored commits, revert). | Medium | +| T-18 | G-021 | Write the sensitive-data statement disclosing the no-true-delete / rotation-≠-erasure retention model. | Small | +| T-19 | G-013, G-024 (doc half) | Document maintainer security-feed subscriptions (RustSec, Tauri GHSA, npm/OSV, GitHub advisories, toolchain). | Small | +| T-20 | G-025 | Record the CI/infra opsec baseline (ephemeral hosted runners, `GITHUB_TOKEN` only), confirm org 2FA, and scope `audit.yml`'s write permissions from workflow-level to job/step. | Small | +| T-21 | G-016 | Add an RFC 9116 `security.txt` template; deploying to `/.well-known/` is a website task (pairs with the G-023 manual check). | Trivial | + +### Tier: Deferred — disproportionate now; reopen on a concrete trigger + +| # | Closes | Action | Effort | Reopen trigger | +|---|--------|--------|--------|----------------| +| T-22 | G-002 | OSS-Fuzz onboarding (use ClusterFuzzLite in-repo first). | Large | T-13 targets exist **and** local fuzzing finds real bugs. | +| T-23 | G-003 | Reproducible-build tooling (Rust core first; the Tauri bundle is the hard case). | Large | First distributed release artifact exists. | +| T-24 | G-022 (pipeline half) | Full release pipeline with SLSA build-track provenance, attaching the T-10 SBOM. | Large | First published artifact (crates.io or signed desktop bundle). | +| T-25 | G-034 | Operator-facing `sc serve` hardening/incident runbook. | Medium | Operators deploy at scale, or user-facing ops docs get written. | + +### Not engineering tasks — maintainer decisions / out-of-repo checks (so all 35 gaps trace) + +- **G-023** — five-minute manual check: does git-agentic.com mirror the disclosure policy (and can it host the T-21 `security.txt`)? +- **G-026** — jurisdiction/legal-entity question; a maintainer/legal decision, not a todo. +- **G-024** — the documentable half is T-19; whether a human is actually subscribed is an honesty check only the maintainer can perform. +- **G-025** — beyond T-20's confirm-and-document, device-level hygiene is out of repo scope. +- **G-031** — no standalone task; folded into T-16 as the boundary paragraph. + +### Flagged for the maintainer (from the project-manager synthesis) + +1. **G-014 is a live broken instruction, not a missing feature** — a report filed via the documented platform channel is undeliverable *today*. Decide enable-vs-edit; it is the highest-integrity item in T-8. +2. **Any SBOM generated before G-033's annotation misrepresents the patched glib** — a correctness trap, not a nicety. T-10 encodes the ordering. +3. **G-009 rests on live platform configuration** (ruleset 18739705) — reverify before implementing T-9. +4. **The crypto core has the weakest auto-alerting in the repo** (major-version ignores + disabled security updates). T-6 is the cheapest partial mitigation; consider a security-advisory carve-out in the ignore list. +5. **The two corrected over-credits** (dead private-reporting channel; CI runs-but-does-not-gate) are already reflected in Section 1 of this report. +6. **(Third round) The Scorecard `VulnerabilitiesID` alert (#18) will not close by fixing anything** — 17 of its 18 advisories are documented accepted risks and the 18th becomes one via T-26; its OSV check does not honor cargo-audit ignores, so expect to dismiss it with a comment pointing at `audit.yml`'s removal gates (or live with a standing 0-score on that check until the GTK4 migration). +7. **(Third round) Do not treat the same-day scorecard PRs (#74/#75) as closing T-1's intent** — the forcing function only works if someone actually triages what it surfaces; 17 alerts are open and this report's todo mapping is the triage. + +--- + +*End of report. Cite gaps as `G-NNN` — IDs are stable for the life of this report. Full evidence trail: `docs/audit/gap-analysis-source.md`.*