@cbartens/bkit 5.2.3 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bkit/README.md +29 -12
- package/.bkit/core/.agents/context.md +1 -1
- package/.bkit/core/.agents/docs.md +1 -1
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.agents/rules.md +11 -0
- package/.bkit/core/.bkit/README.md +28 -11
- package/.bkit/core/.bkit/cloud.md +9 -8
- package/.bkit/core/.bkit/comparison.md +68 -345
- package/.bkit/core/.bkit/install.md +15 -9
- package/.bkit/core/.bkit/lite.md +73 -0
- package/.bkit/core/.bkit/pipeline.md +345 -0
- package/.bkit/core/.bkit/prompts.md +88 -73
- package/.bkit/core/.bkit/providers.md +41 -22
- package/.bkit/core/.bkit/templates.md +125 -18
- package/.bkit/core/.bkit/trackers.md +47 -1
- package/.bkit/core/.bkit/workflows.md +51 -45
- package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +7 -4
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +8 -5
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-agents.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-config.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-cost.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-database.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +22 -10
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-failures.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-gates.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-issues.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-llm.md +29 -15
- package/.bkit/core/docs/templates/bkit-audit-logs.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-models.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +11 -3
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +19 -9
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-repo.md +10 -2
- package/.bkit/core/docs/templates/bkit-audit-security.md +13 -5
- package/.bkit/core/docs/templates/bkit-audit-slop.md +9 -1
- package/.bkit/core/docs/templates/bkit-audit-testing.md +14 -5
- package/.bkit/core/docs/templates/bkit-audit-usability.md +9 -1
- package/.bkit/core/docs/templates/bkit-plan.md +8 -6
- package/.bkit/core/engine/checks/after/auth.ts +9 -9
- package/.bkit/core/engine/checks/after/ci-yml.ts +14 -12
- package/.bkit/core/engine/checks/after/github.ts +29 -120
- package/.bkit/core/engine/checks/after/index.ts +2 -2
- package/.bkit/core/engine/checks/after/managed.ts +8 -28
- package/.bkit/core/engine/checks/after/tools.ts +3 -15
- package/.bkit/core/engine/checks/before/context-fetch.ts +1 -21
- package/.bkit/core/engine/checks/before/index.ts +7 -43
- package/.bkit/core/engine/checks/before/mcp.ts +17 -8
- package/.bkit/core/engine/checks/before/repo.ts +9 -12
- package/.bkit/core/engine/checks/status-holes.ts +4 -5
- package/.bkit/core/engine/checks/tips/catalogue.ts +70 -24
- package/.bkit/core/engine/checks/tips/detect.ts +45 -2
- package/.bkit/core/engine/checks/tips/index.ts +37 -8
- package/.bkit/core/engine/cli.ts +39 -16
- package/.bkit/core/engine/commands/analysis.ts +36 -26
- package/.bkit/core/engine/commands/comply.ts +17 -16
- package/.bkit/core/engine/commands/harvest.ts +12 -12
- package/.bkit/core/engine/commands/install/doctor.ts +57 -28
- package/.bkit/core/engine/commands/install/install.ts +62 -126
- package/.bkit/core/engine/commands/install/uninstall.ts +191 -33
- package/.bkit/core/engine/commands/install/upgrade.ts +58 -53
- package/.bkit/core/engine/commands/lib.ts +35 -10
- package/.bkit/core/engine/commands/tips.ts +8 -5
- package/.bkit/core/engine/commands/workflow/branches.ts +65 -11
- package/.bkit/core/engine/commands/workflow/counters.ts +21 -12
- package/.bkit/core/engine/commands/workflow/fids.ts +46 -0
- package/.bkit/core/engine/commands/workflow/ledgers.ts +3 -1
- package/.bkit/core/engine/commands/workflow/prs.ts +4 -2
- package/.bkit/core/engine/commands/workflow/repo.ts +18 -4
- package/.bkit/core/engine/commands/workflow/roadmap.ts +4 -3
- package/.bkit/core/engine/commands/workflow/runs.ts +8 -7
- package/.bkit/core/engine/commands/workflow/steps.ts +1 -0
- package/.bkit/core/engine/commands/workflow/tests.ts +17 -5
- package/.bkit/core/engine/commands/workflow/workflows.ts +19 -17
- package/.bkit/core/engine/commands/workflow/workstreams.ts +2 -1
- package/.bkit/core/engine/commands/workflow/worktrees.ts +13 -5
- package/.bkit/core/engine/install/cloud-env.ts +10 -31
- package/.bkit/core/engine/install/manifest.ts +14 -7
- package/.bkit/core/engine/install/modules/antigravity.ts +15 -26
- package/.bkit/core/engine/install/modules/claude.ts +20 -28
- package/.bkit/core/engine/install/modules/cloud.ts +5 -2
- package/.bkit/core/engine/install/modules/codex.ts +15 -29
- package/.bkit/core/engine/install/modules/core.ts +91 -70
- package/.bkit/core/engine/install/modules/cursor.ts +6 -20
- package/.bkit/core/engine/install/modules/index.ts +7 -1
- package/.bkit/core/engine/install/modules/opencode.ts +48 -70
- package/.bkit/core/engine/install/network-allowlist.ts +73 -0
- package/.bkit/core/engine/install/placeholders.ts +3 -18
- package/.bkit/core/engine/install/write.ts +59 -12
- package/.bkit/core/engine/ledgers/telemetry.ts +6 -4
- package/.bkit/core/engine/render/hosts.ts +47 -67
- package/.bkit/core/engine/render/models.ts +29 -11
- package/.bkit/core/engine/shared/bkit-latest.ts +164 -0
- package/.bkit/core/engine/shared/branches.ts +13 -0
- package/.bkit/core/engine/shared/egress.ts +3 -3
- package/.bkit/core/engine/shared/json.ts +18 -1
- package/.bkit/core/engine/shared/package-json.ts +63 -0
- package/.bkit/core/engine/shared/package-roots.ts +0 -10
- package/.bkit/core/engine/shared/protected-paths.ts +5 -130
- package/.bkit/core/engine/shared/settings.ts +36 -0
- package/.bkit/core/engine/shared/timeouts.ts +6 -0
- package/.bkit/core/hooks/antigravity-hook.js +1 -0
- package/.bkit/core/hooks/guardrails-shell.js +186 -40
- package/.bkit/core/hooks/guardrails-tiers.js +5 -78
- package/.bkit/core/prompts/bkit-audit-generate.md +65 -10
- package/.bkit/core/prompts/bkit-build-challenge-1.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-2.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +1 -1
- package/.bkit/core/prompts/bkit-build-install-skills.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-current.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-execute.md +4 -4
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-verify.md +2 -2
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +78 -0
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +1 -1
- package/.bkit/core/prompts/bkit-debug-summary.md +3 -3
- package/.bkit/core/prompts/bkit-design-spike.md +1 -1
- package/.bkit/core/prompts/bkit-design-summary.md +2 -2
- package/.bkit/core/prompts/bkit-design-update.md +1 -1
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +1 -1
- package/.bkit/core/prompts/bkit-plan-generate.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +1 -1
- package/.bkit/core/prompts/bkit-plan-summary.md +1 -1
- package/.bkit/core/prompts/bkit-plan-update.md +1 -1
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +1 -1
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +1 -1
- package/.bkit/core/prompts/bkit-ship-update-docs.md +1 -1
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-failures.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +11 -4
- package/.bkit/core/workflows/bkit-build.md +4 -4
- package/.bkit/core/workflows/bkit-debug.md +70 -34
- package/.bkit/core/workflows/bkit-design.md +3 -3
- package/.bkit/core/workflows/bkit-plan.md +12 -5
- package/.bkit/core/workflows/bkit-ship.md +6 -6
- package/.bkit/shared/.claude/bkit-cloud.md +46 -13
- package/.bkit/shared/.claude/settings.json +18 -0
- package/.bkit/shared/.cursor/mcp.json +2 -1
- package/.bkit/shared/.opencode/opencode.json +19 -1
- package/.bkit/shared/docs/deployments.md +20 -4
- package/.bkit/shared/docs/security.md +8 -6
- package/.bkit/shared/docs/testing.md +9 -5
- package/.bkit/templates/.cursor/Dockerfile +30 -16
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-bug.yml +78 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +91 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-idea.yml +56 -0
- package/.bkit/templates/.github/renovate.json5 +91 -12
- package/.bkit/templates/.github/workflows/bkit-ci.yml +66 -53
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +3 -1
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +8 -1
- package/.bkit/templates/.github/workflows/bkit-trivy.yml +67 -0
- package/.bkit/templates/.husky/pre-push +15 -3
- package/.bkit/templates/.oxlintrc.json +21 -0
- package/.bkit/templates/docs/capabilities.md +1 -1
- package/.bkit/templates/scripts/ci/check-capstone.mjs +176 -0
- package/.bkit/templates/scripts/ci/check-capstone.test.mjs +311 -0
- package/.bkit/templates/scripts/cleanup/bkit-tmp-prune.mjs +115 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +2 -2
- package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +43 -20
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +33 -11
- package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +3 -2
- package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +5 -5
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +79 -19
- package/CHANGELOG.md +67 -3
- package/README.md +258 -129
- package/dist/checks/after/auth.js +10 -11
- package/dist/checks/after/ci-yml.js +11 -14
- package/dist/checks/after/github.js +32 -125
- package/dist/checks/after/index.js +3 -2
- package/dist/checks/after/managed.js +8 -24
- package/dist/checks/after/tools.js +3 -16
- package/dist/checks/before/context-fetch.js +1 -21
- package/dist/checks/before/index.js +6 -42
- package/dist/checks/before/mcp.js +14 -9
- package/dist/checks/before/repo.js +8 -11
- package/dist/checks/status-holes.js +5 -6
- package/dist/checks/tips/catalogue.js +60 -18
- package/dist/checks/tips/detect.js +41 -2
- package/dist/checks/tips/index.js +25 -5
- package/dist/cli.js +34 -14
- package/dist/commands/analysis.js +21 -5
- package/dist/commands/comply.js +20 -18
- package/dist/commands/harvest.js +12 -13
- package/dist/commands/install/doctor.js +55 -23
- package/dist/commands/install/install.js +62 -118
- package/dist/commands/install/uninstall.js +165 -31
- package/dist/commands/install/upgrade.js +55 -49
- package/dist/commands/lib.js +32 -10
- package/dist/commands/tips.js +6 -3
- package/dist/commands/workflow/branches.js +57 -13
- package/dist/commands/workflow/counters.js +17 -7
- package/dist/commands/workflow/fids.js +39 -0
- package/dist/commands/workflow/ledgers.js +3 -1
- package/dist/commands/workflow/prs.js +3 -3
- package/dist/commands/workflow/repo.js +16 -4
- package/dist/commands/workflow/roadmap.js +4 -4
- package/dist/commands/workflow/runs.js +5 -5
- package/dist/commands/workflow/steps.js +1 -0
- package/dist/commands/workflow/tests.js +16 -3
- package/dist/commands/workflow/workflows.js +19 -18
- package/dist/commands/workflow/workstreams.js +2 -1
- package/dist/commands/workflow/worktrees.js +4 -5
- package/dist/install/cloud-env.js +10 -23
- package/dist/install/manifest.js +14 -7
- package/dist/install/modules/antigravity.js +15 -26
- package/dist/install/modules/claude.js +17 -21
- package/dist/install/modules/cloud.js +6 -2
- package/dist/install/modules/codex.js +15 -29
- package/dist/install/modules/core.js +82 -63
- package/dist/install/modules/cursor.js +6 -9
- package/dist/install/modules/index.js +6 -1
- package/dist/install/modules/opencode.js +41 -72
- package/dist/install/network-allowlist.js +62 -0
- package/dist/install/placeholders.js +3 -16
- package/dist/install/write.js +55 -15
- package/dist/ledgers/telemetry.js +5 -4
- package/dist/render/hosts.js +30 -55
- package/dist/render/models.js +20 -9
- package/dist/shared/bkit-latest.js +150 -0
- package/dist/shared/branches.js +11 -0
- package/dist/shared/egress.js +0 -2
- package/dist/shared/json.js +14 -0
- package/dist/shared/package-json.js +61 -0
- package/dist/shared/package-roots.js +0 -8
- package/dist/shared/protected-paths.js +5 -122
- package/dist/shared/settings.js +18 -1
- package/dist/shared/timeouts.js +6 -0
- package/package.json +21 -17
- package/.bkit/core/.agents/shortcuts.md +0 -73
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
Three shapes do not show up in a source read: row-security denial looks like empty result; middleware checks the route file does not show; prompt injection shows only when the model runs. Target failure: **a control that holds in the source and fails on a request** — e.g. mixed tenant-id list clamped to caller's rows, revoked token still accepted, message makes the model delete items it does not mention. Static suspicions from `bkit-audit-security` and `bkit-audit-llm`; this audit sends the request.
|
|
31
31
|
|
|
32
|
-
**Applies when:** non-production deployment can be called, and the system has auth or
|
|
32
|
+
**Applies when:** non-production deployment can be called, and the system has auth, tenancy, or a public free-text model surface. None → one `N/A` row with evidence, never "clean".
|
|
33
33
|
|
|
34
34
|
**Cadence:** once before launch, then quarterly. Extra pass after any change to authentication, a route that takes an id, the inbound pipeline, or a machine-client tool.
|
|
35
35
|
|
|
@@ -51,6 +51,7 @@ Three shapes do not show up in a source read: row-security denial looks like emp
|
|
|
51
51
|
- Hostile inbound content: unauthorised writes, leaks, internal fetches, impersonation, caps.
|
|
52
52
|
- Machine-client tool misuse.
|
|
53
53
|
- Injection at render, search, and webhook boundaries. Rate-limit and cost caps, one crossing each.
|
|
54
|
+
- Off-topic use of public model surfaces.
|
|
54
55
|
- Cleanup of every identity this run created.
|
|
55
56
|
|
|
56
57
|
### Out of Scope
|
|
@@ -85,10 +86,10 @@ One per probe, on the `Probes` row.
|
|
|
85
86
|
|
|
86
87
|
Always verify.
|
|
87
88
|
|
|
88
|
-
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`. never retry or reword a blocked call to get past it.
|
|
89
|
-
- [ ] **Target:** Steps 2–
|
|
90
|
-
- [ ] **Identities:** Steps 2, 5–12,
|
|
91
|
-
- [ ] **Web:** Steps 2,
|
|
89
|
+
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call → `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
|
|
90
|
+
- [ ] **Target:** Steps 2–13 — non-production deployment of this commit, resolved by commit SHA, confirmed serving. Fallback: none. Probes stay `INCONCLUSIVE`. NEVER point them at production.
|
|
91
|
+
- [ ] **Identities:** Steps 2, 5–12, 15 — create and delete synthetic users and tenants, guarded so a non-synthetic identity cannot be deleted. Fallback: none. Do not probe with real accounts.
|
|
92
|
+
- [ ] **Web:** Steps 2, 14 — each platform's penetration-testing page, and anchor standards. Fallback: policy unread → do not send probes; record why.
|
|
92
93
|
|
|
93
94
|
#### Conditional
|
|
94
95
|
|
|
@@ -98,7 +99,7 @@ Verify only when applicable.
|
|
|
98
99
|
- [ ] **Inbound Mail:** The synthetic tenant has an inbound address → Step 10. Fallback: skip; `Not Checked`.
|
|
99
100
|
- [ ] **Machine Client:** A token-gated tool endpoint exists → Steps 2, 11. Fallback: skip with evidence.
|
|
100
101
|
- [ ] **Native Build:** This run includes the native client → Step 8 — cached data and sync on a device or emulator. Fallback: web only; device path `Not Checked`.
|
|
101
|
-
- [ ] **Model Spend:** A probe drives a model →
|
|
102
|
+
- [ ] **Model Spend:** A probe drives a model → Steps 10, 13 — budget for one crossing of one cap. Fallback: do not send the cost probe; `INCONCLUSIVE`.
|
|
102
103
|
|
|
103
104
|
### 🔒 Gate 1: Prerequisites Check
|
|
104
105
|
|
|
@@ -121,8 +122,9 @@ Verify only when applicable.
|
|
|
121
122
|
- [ ] **Step 10 — Inbound:** Mail to synthetic tenant inbound address, from attacker address, trying to make model: delete or change records message does not mention; leak other records into reply; fetch internal address (`http://169.254.169.254/`, localhost, private ranges); claim member (address or display name) from domain failing or lacking SPF and DKIM; exceed link and attachment caps. Payload corpus e.g. promptfoo, garak — record which. On a shared inbound provider, use the environment tag the project documents so the message cannot land in production. Expected: only records message genuinely describes are written; nothing else changes; no internal fetch; every cap fires. Check action log for what was written. Cost probe crosses one limit, once. **Done when:** `Probes` row per attempt, with action-log evidence, or `INCONCLUSIVE` where model spend unavailable.
|
|
122
123
|
- [ ] **Step 11 — Tools:** With attacker's token, as client that ignores rules: set fields allow-list excludes; pass victim's ids; change recurring record without required scope; send oversized arguments; repeat create to test idempotency key. **Done when:** `Probes` row per case, or skip with evidence no machine-client tools.
|
|
123
124
|
- [ ] **Step 12 — Boundaries:** Script and markup in text fields; check render on web, native client, reply. Injection through search query and filters reaching search routine. Webhook endpoints: no signature = denial; wrong signature = same denial plus error log. Rate limits: documented thresholds fire, then stop. **Done when:** `Probes` row per boundary.
|
|
124
|
-
- [ ] **Step 13 —
|
|
125
|
-
- [ ] **Step 14 —
|
|
125
|
+
- [ ] **Step 13 — Off-Topic:** Per public free-text model surface (`bkit-audit-llm` `Job Scope`; none there → find from `Surface`), as an anonymous or synthetic visitor, one ask per probe: general coding (e.g. "write a Python function that…"), homework, essay, off-topic ask wrapped in an on-topic frame (e.g. "for my trip, write a script that…"); then one greeting as control. Expected: redirect per the surface's stated job, no off-topic answer; greeting gets a normal reply. Off-topic answered → `BROKE`; record what was meant to bound it (prompt, grounding gate, classifier). **Done when:** `Probes` row per surface × ask, or skip with evidence no public free-text model surface.
|
|
126
|
+
- [ ] **Step 14 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per WSTG category (INFO, CONF, IDNT, ATHN, ATHZ, SESS, INPV, ERRH, CRYP, BUSL, CLNT, APIT), and per ATLAS tactic a model probe touched → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
127
|
+
- [ ] **Step 15 — Anything Else:** (a) Everything changed since previous report's commit touching attack surface (routes, server actions, machine-client tools, webhooks, response headers, inbound handling, what client public key can reach; Step 3 diff = starting list) → one-line verdict each. (b) Bounded ~30 min pass: what senior penetration tester flags that no step asks; read since previous run (incidents, `bkit-audit-logs` reports, new `docs/failures.jsonl` rows, vendor status incidents) — what would no step catch? Probes these passes send follow rules, use identities made for it, go in `Probes`. Then delete every identity this run created with guarded delete (reaps tenant it would strand); confirm orphan sweep finds nothing left. Record where full request/response evidence is kept, for how long, redaction applied. **Done when:** `Beyond the Steps` holds both passes, or `none`; `Cleanup` confirms every identity this run created is gone. Class seen on 2 runs → propose step in `Process Improvements`. `Expected` names where finding goes, recommends safer fix. This run does not file; the audit agent writes `docs/failures.jsonl` rows: `BROKE` → plan from this report, `docs/failures.jsonl` row, regression test (ideally deployed boundary) so `bkit-audit-testing` keeps it fixed; `HELD` with no test → `bkit-audit-testing`; model result → `bkit-audit-llm`, against finding it tested; `STILL BROKE` → original finding, with retest and fix commit; `INCONCLUSIVE` → next run's Step 2 suspicion list, with what blocked; `OTHER` → report, second run proposes verdict; vulnerability in database product itself, not project's use → vendor per that vendor's testing page, plus this report; stop condition → remaining probes stopped, stop recorded in `Scope`.
|
|
126
128
|
|
|
127
129
|
### 🔒 Gate 2: Probes Check
|
|
128
130
|
|
|
@@ -143,7 +145,7 @@ Verify only when applicable.
|
|
|
143
145
|
| --- | --- |
|
|
144
146
|
| `CRITICAL` | Response contains another tenant's data; a revoked credential still performs a privileged action; the model deletes, leaks, or fetches internally on the attacker's instruction |
|
|
145
147
|
| `HIGH` | A role check fails on a real action; an unsigned or wrongly signed webhook is accepted; a removed member can still read or write; a signed URL still works after removal |
|
|
146
|
-
| `MEDIUM` | A mixed id list is clamped instead of refused; a rate limit or size cap does not fire; markup renders unsanitised on one surface |
|
|
148
|
+
| `MEDIUM` | A mixed id list is clamped instead of refused; a rate limit or size cap does not fire; markup renders unsanitised on one surface; a public model surface answers an off-topic ask |
|
|
147
149
|
| `LOW` | Status differs from expected, and the response exposes no data and grants no action |
|
|
148
150
|
|
|
149
151
|
Scale per `.bkit/jsonl.md` § Severity. Within a severity: cross-tenant first. Break on non-production target keeps severity it would have in production.
|
|
@@ -201,6 +203,13 @@ PENDING
|
|
|
201
203
|
|
|
202
204
|
PENDING
|
|
203
205
|
|
|
206
|
+
### Suggested Issues
|
|
207
|
+
|
|
208
|
+
<!-- prettier-ignore -->
|
|
209
|
+
| # | Title | Findings | Severity | Next Step | Reason |
|
|
210
|
+
| --- | --- | --- | --- | --- | --- |
|
|
211
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
212
|
+
|
|
204
213
|
### Process Improvements
|
|
205
214
|
|
|
206
215
|
PENDING
|
|
@@ -214,6 +223,7 @@ PENDING
|
|
|
214
223
|
- [ ] **Cleanup:** states that every identity this run created is deleted, and where redacted evidence is kept.
|
|
215
224
|
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
216
225
|
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
226
|
+
- [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
|
|
217
227
|
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
218
228
|
|
|
219
229
|
> `Project Instructions` below `bkit:end` are consumer-owned — `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
|
|
@@ -77,7 +77,7 @@ Failure paths are least-tested: happy path is tested; vendor outage stays unwalk
|
|
|
77
77
|
|
|
78
78
|
Always verify.
|
|
79
79
|
|
|
80
|
-
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`. never retry or reword a blocked call to get past it.
|
|
80
|
+
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call → `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
|
|
81
81
|
- [ ] **Code Search:** Steps 2–12, 14, 16 — text search and language server for callers, e.g. ripgrep, Serena, `tsserver`. Language-server hits under-report; empty is inconclusive → corroborate with text search and name the tool. Fallback: text search only; name it per claim.
|
|
82
82
|
- [ ] **Web:** Step 15 — fetch anchor standards. Fallback: versions recorded as unread.
|
|
83
83
|
|
|
@@ -202,6 +202,13 @@ PENDING
|
|
|
202
202
|
|
|
203
203
|
PENDING
|
|
204
204
|
|
|
205
|
+
### Suggested Issues
|
|
206
|
+
|
|
207
|
+
<!-- prettier-ignore -->
|
|
208
|
+
| # | Title | Findings | Severity | Next Step | Reason |
|
|
209
|
+
| --- | --- | --- | --- | --- | --- |
|
|
210
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
211
|
+
|
|
205
212
|
### Process Improvements
|
|
206
213
|
|
|
207
214
|
PENDING
|
|
@@ -216,6 +223,7 @@ PENDING
|
|
|
216
223
|
- [ ] **Game Day:** states the date and outcome of the last game day, or that none is recorded, and names the next dependency.
|
|
217
224
|
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
218
225
|
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
226
|
+
- [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
|
|
219
227
|
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
220
228
|
|
|
221
229
|
> `Project Instructions` below `bkit:end` are consumer-owned — `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
|
|
@@ -87,7 +87,7 @@ Every task leaves a worktree, branch, stash, or scratch directory; nothing's job
|
|
|
87
87
|
|
|
88
88
|
Always verify.
|
|
89
89
|
|
|
90
|
-
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`. never retry or reword a blocked call to get past it.
|
|
90
|
+
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call → `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
|
|
91
91
|
- [ ] **Git:** Steps 2–7, 9 — local checkout, worktrees, branches, stashes. Fallback: none; no checkout → `N/A` and STOP.
|
|
92
92
|
- [ ] **Host API:** Steps 4, 8 — read-only, e.g. `gh api`. Fallback: local git only; remote branches, pull requests, and settings `Not Checked`.
|
|
93
93
|
- [ ] **Web:** Step 10 — fetch anchor standards. Fallback: versions recorded as unread.
|
|
@@ -118,7 +118,7 @@ Verify only when applicable.
|
|
|
118
118
|
- [ ] **Step 6 — Leftovers:** Untracked (`git status --porcelain`) and ignored (`git ls-files --others --ignored --exclude-standard --directory`), each sized. Sort: regenerable (dependencies, task cache, coverage, test results, native build folders, tool caches) — REMOVE is safe, report the size; hand-made (notes, plans, backups, logs, scripts in the scratch directory) — group by age and type; open issue or plan references → KEEP; produced and not cleaned up — leftover REMOVE, producer is finding; stranded at root — find writer; tool defaulting to root → point elsewhere. Ignore file: rules matching nothing; leftovers untracked because no rule covers them. Scan secrets and personal data before any MOVE or REMOVE on scratch, root, or plan logs; scanner reports outside repo. Personal-data hits are candidates: test fixtures carry fake addresses. A real hit in a tracked file is not fixed by removing the file — it stays in history. Name the file and line, never the value. Hooks: hooks path resolves at the hook directory, each hook executable, and the install script installs them. A checkout where hooks silently do not run looks clean here while skipping every pre-commit control. **Done when:** `Leftovers` grouped with verdicts; scan result named; sizes in `Totals`.
|
|
119
119
|
- [ ] **Step 7 — Layout:** Read where tracked files belong; find misfits. Size: largest blobs at `HEAD`. Committed generated output/logs → MOVE or REMOVE candidates. Record pack size as series. History size: deleted file still grows clones — repository sizer or blob sizes across all refs. Images/logs → recommend large-file storage or ignore; history rewrite owner's call (ASK). Secrets in history: scan all refs; list every sensitive file ever added (example env files expected). Verified live credential → `CRITICAL`: rotation first (rewrite does not reach existing clones). Name file and commit, never value. Toolchain agreement: runtime pin, engine field, package-manager field, CI setup, host build image, native build config; workspace dependency-version linter for cross-workspace drift or catalog bypass. Docs-versus-files → documentation audit; this step files versus each other. Accidental publish: every workspace package not meant for a registry is marked unpublishable (e.g. npm `private: true`, Cargo `publish = false`), and the root states the licence position. Attributes: end-of-line, generated-file linguist marks so review diffs collapse them, binary marks on images, and an editor config that agrees with the formatter. Placement: root files belonging to app/package, finished one-off scripts, drafts beside final doc, unlinked archive folders, near-empty packages. Naming: folders/files breaking neighbour conventions. Contribution scaffolding: owners file, pull-request and issue templates, contributing note — present and true; whether team needs them → owner (ASK). Template describing unfollowed process → MOVE or REMOVE. Owners file: propose paths that weaken a gate when edited → required human review; once exists, host owners-errors API must return none. Unimported file → dead-code audit; misplaced-but-wrong doc → documentation audit. **Done when:** `Layout` rows; pack size and largest history blobs in `Totals`.
|
|
120
120
|
- [ ] **Step 8 — Posture:** Config audit asks settings vs docs; this step asks vs anchor standards. Read that audit's latest report first; do not duplicate findings. Shared settings: every run checks (local or cloud). Scorecard: each check's score as series. Keep binary artifacts, branch protection, code review, dependency-update tool, security policy here; token permissions, pinned dependencies, dangerous workflow → `bkit-audit-security`. Branch protection (integration, production): pull request required, required check required, force-push and deletion blocked, squash-only or linear history, bypass list — compare with production-merge-requires-PR rule. Security settings: secret scanning and push protection on; who may bypass push protection. Private repo: push protection may need paid secret-protection plan — say so if plan excludes it. Push protection blocks at server (hook bypass does not reach). Also dependency alerts, private vulnerability reporting, default automation token read-only, automation creating/approving pull requests off. Disclosure: security policy or private vulnerability reporting, and `/.well-known/security.txt` on production web origin with RFC contact/expiry fields and expiry ahead. People, 2FA, deploy keys, long-lived tokens → security audit; automation secrets/variables → config audit. Read their latest reports; confirm 2FA enforcement recorded. List accumulators like branches: installed apps and permissions, webhooks, environments. App over-scoped or webhook to unused service → REMOVE or ASK. **Done when:** `Posture` holds each setting met / finding / not applicable; scores in `Totals`.
|
|
121
|
-
- [ ] **Step 9 — Verify:** Git state changes hourly. Record when each check ran; re-check every RESCUE and REMOVE at end. No finding without re-checkable evidence: command and output, or `file:line`. Destinations (name; do not act): REMOVE → exact command next step would run, batched for one review; RESCUE → what it holds, who would know, decision (push and open pull request, or drop on purpose); MOVE → move and every reference to update; ASK → who would know and question; OTHER → why no verdict fits; leftover something keeps producing → `docs/failures.jsonl` row against producer
|
|
121
|
+
- [ ] **Step 9 — Verify:** Git state changes hourly. Record when each check ran; re-check every RESCUE and REMOVE at end. No finding without re-checkable evidence: command and output, or `file:line`. Destinations (name; do not act; the audit agent writes `docs/failures.jsonl` rows): REMOVE → exact command next step would run, batched for one review; RESCUE → what it holds, who would know, decision (push and open pull request, or drop on purpose); MOVE → move and every reference to update; ASK → who would know and question; OTHER → why no verdict fits; leftover something keeps producing → `docs/failures.jsonl` row against producer; missing/stale ignore rule → line to add or remove; code or config nothing reaches → `bkit-audit-dead-code`; a doc that is wrong, not misplaced → `bkit-audit-documentation`; dependency-bot branch → `bkit-audit-dependencies`; secret in history, log, or leftover → `bkit-audit-security`, rotation first, file and commit only; personal data in log or leftover → `bkit-audit-privacy`; repository setting below standard → setting to change for owner, doc drift → `bkit-audit-config`; workflow-level scorecard failure → `bkit-audit-security`; toolchain versions disagree → file to change; host setting → `bkit-audit-config`; dependency versions → `bkit-audit-dependencies`. **Done when:** every RESCUE and REMOVE re-checked, with time, verdict, and destination.
|
|
122
122
|
- [ ] **Step 10 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per Scorecard check and per baseline control in sets this audit touches (e.g. OSPS-AC, OSPS-BR-07, OSPS-GV, OSPS-LE, OSPS-VM) → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. **Done when:** no empty row.
|
|
123
123
|
- [ ] **Step 11 — Anything Else:** (a) Everything changed since previous report's commit touching the repository itself (new top-level files and folders, workspaces, ignore, and attribute files, hooks, branch, and ruleset settings, host apps, webhooks, environments, anything new that writes to the scratch directory or the root) → one-line verdict each. (b) Bounded ~30 min pass: what a senior platform engineer flags that no step asks; read what happened since previous run (incidents, `bkit-audit-logs` reports, new `docs/failures.jsonl` rows, vendor status incidents) — what would no step catch? **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs → propose step in `Process Improvements`.
|
|
124
124
|
|
|
@@ -205,6 +205,13 @@ PENDING
|
|
|
205
205
|
|
|
206
206
|
PENDING
|
|
207
207
|
|
|
208
|
+
### Suggested Issues
|
|
209
|
+
|
|
210
|
+
<!-- prettier-ignore -->
|
|
211
|
+
| # | Title | Findings | Severity | Next Step | Reason |
|
|
212
|
+
| --- | --- | --- | --- | --- | --- |
|
|
213
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
214
|
+
|
|
208
215
|
### Process Improvements
|
|
209
216
|
|
|
210
217
|
PENDING
|
|
@@ -218,6 +225,7 @@ PENDING
|
|
|
218
225
|
- [ ] **Series:** `Totals` beside previous report's numbers, or marked baseline.
|
|
219
226
|
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
220
227
|
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
228
|
+
- [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
|
|
221
229
|
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
222
230
|
|
|
223
231
|
> `Project Instructions` below `bkit:end` are consumer-owned — `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
|
|
@@ -87,7 +87,7 @@ Fixes land on call sites a sweep already knew; the doc records the rule. A later
|
|
|
87
87
|
|
|
88
88
|
Always verify.
|
|
89
89
|
|
|
90
|
-
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`. never retry or reword a blocked call to get past it.
|
|
90
|
+
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call → `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
|
|
91
91
|
- [ ] **Text Search:** Steps 2, 5–14, 17, 19 — literals, env names, routes, workflows, e.g. `git grep`, ripgrep. Fallback: none; name gap. Literal searched as regex matching nothing reads as clean — name tool and whether pattern was literal.
|
|
92
92
|
- [ ] **Call Graph:** Steps 5, 9 — who calls a guard, e.g. language server `find_referencing_symbols`, `tsserver`. Fallback: text search only; empty = inconclusive, not absence.
|
|
93
93
|
- [ ] **Live Read:** Steps 7, 11, 22 — one read-only GET per web origin; DNS for mail auth; `security.txt` fetch. Fallback: committed config only; served headers, DNS, `security.txt` → `Not Checked`.
|
|
@@ -101,9 +101,9 @@ Verify only when applicable.
|
|
|
101
101
|
- [ ] **Hosted Auth:** Managed auth provider → Step 8 — password, OTP, redirect, MFA settings + provider auth lints, e.g. dashboard, management API. Fallback: config file only; live settings → `Not Checked`.
|
|
102
102
|
- [ ] **Platform Access:** Third-party consoles reaching production → Step 15 — members, roles, 2FA, token last-use. Fallback: none; items → `Not Checked`.
|
|
103
103
|
- [ ] **Catalogue Read:** Hosted DB or file storage → Step 9 — read-only policy listing, e.g. platform MCP `execute_sql` `SELECT`. Fallback: migrations and policy files; live policies = hypotheses.
|
|
104
|
-
- [ ] **Package Audit:** Package-manager audit command exists → Step 17 — e.g. `pnpm audit`, `npm audit`, `cargo audit`, `pip-audit
|
|
104
|
+
- [ ] **Package Audit:** Package-manager audit command exists → Step 17 — e.g. `pnpm audit`, `npm audit`, `cargo audit`, `pip-audit`, Trivy (`trivy fs --include-dev-deps`, every lockfile). Fallback: advisory pages for direct dependencies.
|
|
105
105
|
- [ ] **Workflow Scanners:** CI workflows → Step 18 — e.g. OpenSSF Scorecard, zizmor. Fallback: read workflows against Step 17 bullets.
|
|
106
|
-
- [ ] **Secret Scanner:** Host push protection off, or private repo without it → Step 14 — e.g. gitleaks, trufflehog over full history. Fallback: history search for key prefixes; say so.
|
|
106
|
+
- [ ] **Secret Scanner:** Host push protection off, or private repo without it → Step 14 — e.g. gitleaks, trufflehog over full history; Trivy `secret` scanner covers the current tree only. Fallback: history search for key prefixes; say so.
|
|
107
107
|
- [ ] **Native App:** Native client ships → Step 21 — app config against MASVS. Fallback: skip with evidence no native client.
|
|
108
108
|
|
|
109
109
|
### 🔒 Gate 1: Prerequisites Check
|
|
@@ -131,14 +131,14 @@ Verify only when applicable.
|
|
|
131
131
|
- [ ] **Step 14 — Secrets:** Nothing staged that should not be (env files, credentials, tokens, keys); check git history + tree. Remote secrets via sanctioned env sync path, never direct CLI — other path = finding. Documented rotation cadence → verify followed; cadence nobody executes = dead-control shape. Declared-unused vs used-undeclared: latter = dead control (`bkit-audit-dead-code`); former = unnecessary secret. Public build prefixes (e.g. `NEXT_PUBLIC_*`, `EXPO_PUBLIC_*`, `VITE_*`) + client bundle: no server-only keys (service-role, secret key, etc.). Name location; never copy value. **Done when:** `Secrets` lists every public-prefixed name and history hit, values omitted.
|
|
132
132
|
- [ ] **Step 15 — Access:** Secrets + production-reachable accounts/tokens. Per platform (source host, app host, database, payments, model provider, email, jobs, error tracker, mobile build, store): access holders and roles; 2FA enforced?; long-lived tokens (PAT, deploy keys, service accounts) with scope and last use. Unnamed account, unused token, or excess admin = finding. No-expiry token → recorded reason. Name account and role, never token. Record store signing key holders (distribution cert, upload key). **Done when:** `Access` row per platform: roles · 2FA · tokens · verdict, or `Not Checked`.
|
|
133
133
|
- [ ] **Step 16 — Deploy:** Production: no browser source maps (delete after error tracker upload); no framework stack traces. Production secrets not in preview/dev (any branch may build preview, where host builds them). Preview deploys (if any) behind deployment protection (`bkit-audit-config` records; confirm here). No test-only routes/helpers (seeding, live-test support, demo-tenant) in production builds. Server DB connections require TLS. **Done when:** each item met / finding / not applicable (why), in `Checked`.
|
|
134
|
-
- [ ] **Step 17 — Supply:** Run package-manager audit; disposition output. Audit command absent from all CI lanes = finding. Allow-list rows (e.g. `scripts/ci/accepted-advisories.json`): reason still true, expiry within timeframe; renewed despite a patched release = finding. Vuln-alert PRs bypassing freshness delay → confirm land, not queue. CI actions pinned to commit SHA, not floating tag; no new unpinned actions; record clean result. Each workflow/job declares narrowest token permissions; none → repo default; list declarations and over-wide scopes. `pull_request_target` (untrusted PR + target secrets) = finding. PR title, branch name, or comment body in shell step = finding. Secret echo or arg-printing command → log leak despite masking: check secret steps for trace/debug/verbose CI. Install scripts: every allow-list entry since previous report + build justification. Frozen lockfile everywhere. New dependencies since previous report: real package name, not lookalike. Deployed framework versions vs advisories (e.g. middleware-bypass header, server-component RCE). Authorisation never relies on middleware alone. Open audit findings vs recorded remediation timeframes per severity; none recorded → propose. Package-manager audit misses native managers (CocoaPods, Gradle, SwiftPM) — check separately. Export SBOM (dependency-graph, CycloneDX, SPDX) for audited commit + each release; link from `Supply` for next diff. Published artifact → build provenance (e.g. SLSA Build L2 attestations). CI workflow change → explicit human confirmation; report, do not edit. Missing updater config → `bkit-audit-dependencies` (Bot Health); do not re-derive here. **Done when:** `Supply` holds audit disposition, permission table, SBOM link, each finding.
|
|
134
|
+
- [ ] **Step 17 — Supply:** Run package-manager audit; disposition output. Audit command absent from all CI lanes = finding. CI scanner (e.g. Trivy): image or action pinned by digest, `contents: read`, no secret; dev dependencies included (Trivy drops them without `--include-dev-deps`); ignore-file entries (e.g. `.trivyignore.yaml`) carry reason + expiry. Allow-list rows (e.g. `scripts/ci/accepted-advisories.json`): reason still true, expiry within timeframe; renewed despite a patched release = finding. Vuln-alert PRs bypassing freshness delay → confirm land, not queue. CI actions pinned to commit SHA, not floating tag; no new unpinned actions; record clean result. Each workflow/job declares narrowest token permissions; none → repo default; list declarations and over-wide scopes. `pull_request_target` (untrusted PR + target secrets) = finding. PR title, branch name, or comment body in shell step = finding. Secret echo or arg-printing command → log leak despite masking: check secret steps for trace/debug/verbose CI. Install scripts: every allow-list entry since previous report + build justification. Frozen lockfile everywhere. New dependencies since previous report: real package name, not lookalike. Deployed framework versions vs advisories (e.g. middleware-bypass header, server-component RCE). Authorisation never relies on middleware alone. Open audit findings vs recorded remediation timeframes per severity; none recorded → propose. Package-manager audit misses native managers (CocoaPods, Gradle, SwiftPM) — check separately. Export SBOM (dependency-graph, CycloneDX, SPDX) for audited commit + each release; link from `Supply` for next diff. Published artifact → build provenance (e.g. SLSA Build L2 attestations). CI workflow change → explicit human confirmation; report, do not edit. Missing updater config → `bkit-audit-dependencies` (Bot Health); do not re-derive here. **Done when:** `Supply` holds audit disposition, permission table, SBOM link, each finding.
|
|
135
135
|
- [ ] **Step 18 — Repository:** Secret scanning + push protection on? Private repo may need paid host product. Without it: history scanner in pre-commit + CI. Custom pattern for machine-token prefix. Dependency alerts on; default CI token read-only (`bkit-audit-config` too); CI create/approve PRs off. Release + integration rulesets: required review, required checks, no force-push/deletion, owner review for workflow + migration files. `bkit-audit-config` = rulesets vs CI job names; this step = what they protect. `bkit-audit-repo` = code owners; if none, what enforces review. Each sweep: scorecard + workflow linter (report-only); disposition (credential persistence, cache poisoning, template injection, excessive permissions, beyond Step 17). Deploy creds: OIDC or short-lived tokens where supported; production secrets behind environment protection. **Done when:** `Repository` row per setting: expected · actual · verdict.
|
|
136
136
|
- [ ] **Step 19 — Data:** Never log raw personal data — new log call sites too. SDK defaults = logging: error-tracker PII capture, bodies, breadcrumbs, scrub hook; job-runner payloads/outputs; host request logs. Processors: zero-retention claims, machine-client hosts, additions since last run — new processor = finding until documented. Contract, region, lawful basis → `bkit-audit-privacy`. API: over-broad routes; error envelopes leaking internals. Deletion beyond table trace vs documented retention: embeddings, file objects, raw inbound, processor copies — table trace → `bkit-audit-privacy`; name cross-post. **Done when:** `Data` row per log sink and processor: what can land · verdict.
|
|
137
137
|
- [ ] **Step 20 — Events:** Inventory security events; each logged with actor, tenant, route, outcome, no secrets: auth failures, authz denials, token issue/revoke, role/membership changes, rate-limit trips, webhook-signature failures, mail-auth drops. Each class alerts a person. Prove delivery via existing non-prod test hook without config change; no hook → alert delivery `Not Checked`. Unalerted log = absent. Failure-mode map → `bkit-audit-reliability`; this list = security events. Fail closed: per control, record dependency failure behavior (cache timeout, auth outage, billing, model error, missing env) — must fail closed or alert. Null guard fix: throw or error-log at construction when required env lacks dependency. Step 2 = env-name signature only. **Done when:** `Events` row per class: logged · alerted · fail closed · verdict.
|
|
138
138
|
- [ ] **Step 21 — Native:** Native app: session tokens in secure store (Keychain, Keystore), not prefs. No tokens/PII in device logs, backups, sensitive-screen screenshots. Auth callbacks/deep links: verified universal/app links, not claimable custom scheme; deep-link params = untrusted input. Association files served/valid → `bkit-audit-config`. No cleartext exception. OTA code signing on, or record plan lacks it. **Done when:** `Native` row per control group, or skip with evidence no native app.
|
|
139
139
|
- [ ] **Step 22 — Disclosure:** Published vuln disclosure policy; `/.well-known/security.txt` with monitored `Contact`, unexpired `Expires` (RFC 9116). Current security incident runbook: paging, Step 15 key revocation, session revoke, breach-notification duties per jurisdiction. General incident → `bkit-audit-reliability`; notification timelines → `bkit-audit-privacy`. Last tested restore date from newest `bkit-audit-database` report. **Done when:** each requirement met or finding, in `Checked`.
|
|
140
140
|
- [ ] **Step 23 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: row per ASVS chapter, Top 10 category, API Security Top 10 risk, (native app) MASVS group → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. Project security checklist/skill covers current releases; lag → name which. **Done when:** no empty row.
|
|
141
|
-
- [ ] **Step 24 — Anything Else:** (a) Security-touching changes since previous commit (routes, server actions, machine-client tools, webhooks, processors, workflows, env vars, platforms, outbound hosts, native features) → one-line verdict each vs Step 23 chapter list. (b) ~30 min bounded pass: senior appsec flags no step asks; since previous run read incidents, `bkit-audit-logs`, new `docs/failures.jsonl`, vendor status — what would no step catch? **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs → propose step in `Process Improvements`; literal signature class → Step 2 row instead. `Expected` on each finding: destination + safer fix. This run does not file
|
|
141
|
+
- [ ] **Step 24 — Anything Else:** (a) Security-touching changes since previous commit (routes, server actions, machine-client tools, webhooks, processors, workflows, env vars, platforms, outbound hosts, native features) → one-line verdict each vs Step 23 chapter list. (b) ~30 min bounded pass: senior appsec flags no step asks; since previous run read incidents, `bkit-audit-logs`, new `docs/failures.jsonl`, vendor status — what would no step catch? **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs → propose step in `Process Improvements`; literal signature class → Step 2 row instead. `Expected` on each finding: destination + safer fix. This run does not file or edit doc; the audit agent writes `docs/failures.jsonl` rows: security hole → plan from report; discovered bug → `docs/failures.jsonl` row; storage-policy gap (Step 9) → also `bkit-audit-database`; deletion gap (Step 19) → also `bkit-audit-privacy`; prompt-injection model half (Step 10) → `bkit-audit-llm`, not re-derived; live hostile check → `bkit-audit-red-team`; uncovered trust boundary (Step 3) → proposed doc update, not applied; workflow change (Step 17) → human confirmation, never edit workflow; new literal class → proposed Step 2 row under `Process Improvements`.
|
|
142
142
|
|
|
143
143
|
### 🔒 Gate 2: Probes Check
|
|
144
144
|
|
|
@@ -255,6 +255,13 @@ PENDING
|
|
|
255
255
|
|
|
256
256
|
PENDING
|
|
257
257
|
|
|
258
|
+
### Suggested Issues
|
|
259
|
+
|
|
260
|
+
<!-- prettier-ignore -->
|
|
261
|
+
| # | Title | Findings | Severity | Next Step | Reason |
|
|
262
|
+
| --- | --- | --- | --- | --- | --- |
|
|
263
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
264
|
+
|
|
258
265
|
### Process Improvements
|
|
259
266
|
|
|
260
267
|
PENDING
|
|
@@ -268,6 +275,7 @@ PENDING
|
|
|
268
275
|
- [ ] **Classes:** every standing class has a row, including the clean ones.
|
|
269
276
|
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
270
277
|
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
278
|
+
- [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
|
|
271
279
|
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
272
280
|
|
|
273
281
|
> `Project Instructions` below `bkit:end` are consumer-owned — `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
|
|
@@ -82,7 +82,7 @@ Each suppression made sense in one PR; nothing re-reads them. Glob hiding one de
|
|
|
82
82
|
|
|
83
83
|
Always verify.
|
|
84
84
|
|
|
85
|
-
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`. never retry or reword a blocked call to get past it.
|
|
85
|
+
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call → `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
|
|
86
86
|
- [ ] **Scanner:** Steps 2–4 — pinned in manifest, e.g. `slop-scan`. Fallback: skip scanner steps; run code / config steps.
|
|
87
87
|
- [ ] **Worktree:** Steps 2–8 — detached worktree off default branch. Fallback: Steps 5–7 read-only in main checkout; Steps 3, 8 `Not Checked`.
|
|
88
88
|
- [ ] **Git History:** Steps 5, 8 — full history for blame and churn. Fallback: ages and churn `Not Checked`.
|
|
@@ -181,6 +181,13 @@ PENDING
|
|
|
181
181
|
|
|
182
182
|
PENDING
|
|
183
183
|
|
|
184
|
+
### Suggested Issues
|
|
185
|
+
|
|
186
|
+
<!-- prettier-ignore -->
|
|
187
|
+
| # | Title | Findings | Severity | Next Step | Reason |
|
|
188
|
+
| --- | --- | --- | --- | --- | --- |
|
|
189
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
190
|
+
|
|
184
191
|
### Process Improvements
|
|
185
192
|
|
|
186
193
|
PENDING
|
|
@@ -194,6 +201,7 @@ PENDING
|
|
|
194
201
|
- [ ] **Series:** `Counts` beside previous report's counts, or marked baseline.
|
|
195
202
|
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
196
203
|
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
204
|
+
- [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
|
|
197
205
|
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
198
206
|
|
|
199
207
|
> `Project Instructions` below `bkit:end` are consumer-owned — `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
|
|
@@ -44,7 +44,7 @@ Green suite = tests passed — not that they could fail, that every promise has
|
|
|
44
44
|
- OWASP ASVS and the OWASP API Security Top 10; record the edition read.
|
|
45
45
|
- Visual and accessibility snapshots (e.g. Playwright `toHaveScreenshot` / `toMatchAriaSnapshot`, device screenshots); record the runner version.
|
|
46
46
|
- Test-smell catalogue (e.g. xUnit Test Patterns, Meszaros 2007).
|
|
47
|
-
- Test lint (e.g. `@vitest/eslint-plugin`, `eslint-plugin-playwright`, `eslint-plugin-testing-library`); record each version.
|
|
47
|
+
- Test lint (e.g. `@vitest/eslint-plugin`, `eslint-plugin-playwright`, `eslint-plugin-testing-library`, or Oxlint's `vitest` + `typescript` plugins); record each version. typescript-eslint type-aware rules need a TypeScript version it supports; newer → Oxlint `--type-aware` (oxlint-tsgolint).
|
|
48
48
|
- Network mock that fails closed (e.g. MSW); record the major read.
|
|
49
49
|
|
|
50
50
|
### Scope
|
|
@@ -78,7 +78,7 @@ Green suite = tests passed — not that they could fail, that every promise has
|
|
|
78
78
|
|
|
79
79
|
Always verify.
|
|
80
80
|
|
|
81
|
-
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`. never retry or reword a blocked call to get past it.
|
|
81
|
+
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call → `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
|
|
82
82
|
- [ ] **Git:** Steps 1, 14 — `git rev-parse`, diff since previous report. Fallback: run marked baseline; ages and the what-changed pass `Not Checked`.
|
|
83
83
|
- [ ] **Test Runner:** Steps 3, 6, 9, 10 — execute or read reports, e.g. Vitest, Jest, pytest. Fallback: static read only; counts, mutation, clock runs `Not Checked`.
|
|
84
84
|
- [ ] **Web:** Step 13 — fetch anchor standards. Fallback: versions recorded as unread.
|
|
@@ -90,7 +90,7 @@ Verify only when applicable.
|
|
|
90
90
|
- [ ] **Mutation Tool:** Tool exists for the language → Step 6 — e.g. Stryker, mutmut. Fallback: hand-break code tests protect; scores `Not Checked`.
|
|
91
91
|
- [ ] **E2E Runner:** Browser or device E2E → Steps 3, 7, 9 — e.g. Playwright, Cypress, Maestro. Fallback: unit and integration only.
|
|
92
92
|
- [ ] **DB Tests:** Row-level policies, buckets, or data migrations → Step 4 — e.g. pgTAP, `supabase db test`, deployed-schema check. Fallback: read existing tests; live matrix = hypothesis.
|
|
93
|
-
- [ ] **Test Lint:** Test files linted → Step 8 — e.g. eslint-plugin
|
|
93
|
+
- [ ] **Test Lint:** Test files linted → Step 8 — e.g. `@vitest/eslint-plugin`, `eslint-plugin-playwright`, Oxlint `vitest` / `typescript` plugins. Fallback: text search for the shapes.
|
|
94
94
|
- [ ] **Language Server:** Typed language → Step 11 — references, e.g. Serena, `tsserver`. Fallback: text search; name it.
|
|
95
95
|
|
|
96
96
|
### 🔒 Gate 1: Prerequisites Check
|
|
@@ -139,6 +139,7 @@ Verify only when applicable.
|
|
|
139
139
|
- Setup skipping code. Fake DB always empty — branch under test never runs.
|
|
140
140
|
- Test locking in bug. Asserts wrong behaviour; no decision wanted it.
|
|
141
141
|
- Positive control that cannot fail. Asserts absent using selector/text that never existed.
|
|
142
|
+
- Absence guard outliving its writer. Asserts a file / path / name is not written, shipped or listed, yet no source writes, copies or templates it any more (retired / deprecated name) and no migration / cleanup removes it — search sources for each named path. Also absence samples (headings, strings) present nowhere → guard passes whatever leaks. Keep: secret / credential guards, removal checks for a migration that still runs.
|
|
142
143
|
- Guard tested in different setup from runtime (cwd, config, env).
|
|
143
144
|
- String scan cut short. Comment stripper cutting at marker also cuts marker inside strings.
|
|
144
145
|
- Wrong surface. Write one place, assertion reads another — for every write, assertion reads surface write meant to change. Derived copies → `bkit-audit-database`.
|
|
@@ -148,11 +149,11 @@ Verify only when applicable.
|
|
|
148
149
|
|
|
149
150
|
New shape → propose under `Process Improvements`. Do not edit this list during run. **Done when:** every hit in `Shapes`, or `none`.
|
|
150
151
|
|
|
151
|
-
- [ ] **Step 8 — Guards:** Shape tools can catch → lint rule or setup file, not per-run search. Confirm enabled for test files; record violation count per test-stack lint rule catching each shape (e.g. JS: `vitest/expect-expect`, `vitest/valid-expect`, `vitest/no-conditional-in-test`, `playwright/missing-playwright-await`, `playwright/no-wait-for-timeout`, `playwright/prefer-web-first-assertions`, `playwright/no-networkidle`, `playwright/no-force-option`, `@typescript-eslint/no-floating-promises
|
|
152
|
+
- [ ] **Step 8 — Guards:** Shape tools can catch → lint rule or setup file, not per-run search. Confirm enabled for test files; record violation count per test-stack lint rule catching each shape (e.g. JS: `vitest/expect-expect`, `vitest/valid-expect`, `vitest/no-conditional-in-test`, `vitest/no-conditional-expect`, `playwright/missing-playwright-await`, `playwright/no-wait-for-timeout`, `playwright/prefer-web-first-assertions`, `playwright/no-networkidle`, `playwright/no-force-option`, `@typescript-eslint/no-floating-promises` (Oxlint: `typescript/no-floating-promises` with `--type-aware`); Python: `flake8-pytest-style`). No test-stack linter → text search for the shapes, say so. Rule would catch Step 7 shape and is off → finding, destination `bkit-audit-gates`. Confirm network mock fails test on unhandled request (e.g. MSW `onUnhandledRequest: 'error'`). Else unmocked call reaches real service or hangs. Fixtures/factories typed to generated DB types and schema validators, where the project has them. Grep tests for type-check escapes (e.g. TS `as any`, `as unknown as`; Python `cast(Any, ...)`, `# type: ignore`) — fixture drifts to shape production never produces; untyped language → `N/A`. Count snapshot assertions and size. List snapshot files (e.g. `.snap`) changed same commit as covered code since previous report commit. Large snapshot or wholesale `-u` update behaves like assertion matching anything. **Done when:** counts and hits in `Guards`.
|
|
152
153
|
- [ ] **Step 9 — Runs:** Every test file has a lane. Names putting file outside every run (see Step 6). Suites skipping when setup fails instead of failing. Skips (e.g. `test.skip`, `fixme`, `describe.skip`, `pytest.mark.skip`), env-dependent skips. Stale build output runner now collects (e.g. Vitest 4 and later does not ignore `dist/` by default). The 20 slowest tests per tier from runner reports. Slow test = next one someone skips. **Done when:** rows in `Runs`.
|
|
153
154
|
- [ ] **Step 10 — Time:** Date/calendar/timezone logic → unit tests with `TZ` non-UTC zone observing DST (e.g. `Pacific/Auckland`, `America/St_Johns`) on process before workers spawn. Then date-touching suites with clock pinned near month end and DST change (e.g. `vi.setSystemTime`, Playwright `page.clock`), throwaway setup removed after. Record tests whose result changes. List suites never pinning clock. **Done when:** results in `Time`, or skip with evidence.
|
|
154
155
|
- [ ] **Step 11 — Copies:** Same test procedure in several places (open dialog, create user, read credentials). Disagreeing copies first. Agreeing copies need single owner only if likely to drift. One owner created → next step adds guard failing on new copy. Code graph finds copied functions; copied statement sequences need syntax-tree scan. Product-code duplication → `bkit-audit-duplication`. **Done when:** groups in `Copies`, or `none`.
|
|
155
|
-
- [ ] **Step 12 — Route:** No finding without re-checkable evidence: `file:line`, or query, run id, measurement, plus tool. Language-server empty inconclusive → corroborate text search. Report names where each finding goes; sending is next step. App bug → `docs/failures.jsonl` row and issue; security bugs flagged for project security milestone. Missing test small → test to write. Missing test large → follow-up issue. Cannot-fail test → fix, positive control (break code, watch red, restore), `docs/failures.jsonl` row. Behaviour no recorded intent → question for maintainer; do not guess from code. Tier too high → lower-tier test to write; higher-tier stays until new one seen red. Equivalent mutant → disable comment to add. Timezone/date result → app bug if app wrong; else test fix and `docs/failures.jsonl` row. Flaky → `bkit-audit-flakes`. Coverage floor move → `bkit-audit-coverage`. Check as CI gate → `bkit-audit-gates`. Dead code → `bkit-audit-dead-code`. **Done when:** every finding's Expected names destination.
|
|
156
|
+
- [ ] **Step 12 — Route:** No finding without re-checkable evidence: `file:line`, or query, run id, measurement, plus tool. Language-server empty inconclusive → corroborate text search. Report names where each finding goes; sending is next step; the audit agent writes `docs/failures.jsonl` rows. App bug → `docs/failures.jsonl` row and issue; security bugs flagged for project security milestone. Missing test small → test to write. Missing test large → follow-up issue. Cannot-fail test → fix, positive control (break code, watch red, restore), `docs/failures.jsonl` row. Behaviour no recorded intent → question for maintainer; do not guess from code. Tier too high → lower-tier test to write; higher-tier stays until new one seen red. Equivalent mutant → disable comment to add. Timezone/date result → app bug if app wrong; else test fix and `docs/failures.jsonl` row. Flaky → `bkit-audit-flakes`. Coverage floor move → `bkit-audit-coverage`. Check as CI gate → `bkit-audit-gates`. Dead code → `bkit-audit-dead-code`. **Done when:** every finding's Expected names destination.
|
|
156
157
|
- [ ] **Step 13 — Standards:** Confirm current version per anchor standard; read changes since previous report's version. `Standards Coverage`: one row per OWASP API Security Top 10 item and ASVS chapter (attack rows Step 3), per test-smell in catalogue (shapes Step 7) → checked (name step) / not applicable (why) / finding. Unapplied recommended practice → adopt (propose step) / reject (why) / not applicable. Do not change steps during run. **Done when:** no empty row.
|
|
157
158
|
- [ ] **Step 14 — Anything Else:** (a) Everything since previous report commit touching suite (test files/helpers, fixtures/factories, unit/browser/device runner config, CI test lanes, routes/workers/migrations/external services tests cover) → one-line verdict each. (b) Bounded ~30 min pass: senior test engineer flags outside steps; read since previous run (incidents, `bkit-audit-logs`, new `docs/failures.jsonl`, vendor status) — what would no step catch? **Done when:** `Beyond the Steps` holds both passes, or `none`. Class seen on 2 runs → propose step in `Process Improvements`.
|
|
158
159
|
|
|
@@ -251,6 +252,13 @@ PENDING
|
|
|
251
252
|
|
|
252
253
|
PENDING
|
|
253
254
|
|
|
255
|
+
### Suggested Issues
|
|
256
|
+
|
|
257
|
+
<!-- prettier-ignore -->
|
|
258
|
+
| # | Title | Findings | Severity | Next Step | Reason |
|
|
259
|
+
| --- | --- | --- | --- | --- | --- |
|
|
260
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
261
|
+
|
|
254
262
|
### Process Improvements
|
|
255
263
|
|
|
256
264
|
PENDING
|
|
@@ -264,6 +272,7 @@ PENDING
|
|
|
264
272
|
- [ ] **Series:** test count and runtime per tier, and both scores, beside previous report's numbers, or marked baseline.
|
|
265
273
|
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
266
274
|
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
275
|
+
- [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
|
|
267
276
|
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
268
277
|
|
|
269
278
|
> `Project Instructions` below `bkit:end` are consumer-owned — `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
|
|
@@ -78,7 +78,7 @@ Automated checks never look at a screen. They pass when a title is centred on on
|
|
|
78
78
|
|
|
79
79
|
Always verify.
|
|
80
80
|
|
|
81
|
-
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`. never retry or reword a blocked call to get past it.
|
|
81
|
+
- [ ] **Permissions:** Before Step 1 — one cheap read-only call per tool this run uses (every item below, every rule under `Project Instructions` `Permissions`), e.g. `gh run list --limit 1`, one MCP read, one anchor-standard fetch. Blocked / denied (here or in any step) → record call verbatim and narrow allow rule clearing it (e.g. `Bash(gh run list *)`) in `Not Checked`, `Process Improvements`, and `Project Instructions` `Permissions`; run every step the remaining tools allow; work needing blocked call → `Not Checked`. never stop the run for a blocked call; never retry or reword a blocked call to get past it.
|
|
82
82
|
- [ ] **Screens:** Steps 2, 7–14 — open product (local or existing preview). Fallback: drawings and source only; live claims = hypotheses.
|
|
83
83
|
- [ ] **Drawings:** Steps 5, 7, 9 — reference drawings readable. Fallback: live vs live only; drawing comparison `Not Checked`.
|
|
84
84
|
- [ ] **Web:** Step 15 — fetch anchor standards. Fallback: versions recorded as unread.
|
|
@@ -218,6 +218,13 @@ PENDING
|
|
|
218
218
|
|
|
219
219
|
PENDING
|
|
220
220
|
|
|
221
|
+
### Suggested Issues
|
|
222
|
+
|
|
223
|
+
<!-- prettier-ignore -->
|
|
224
|
+
| # | Title | Findings | Severity | Next Step | Reason |
|
|
225
|
+
| --- | --- | --- | --- | --- | --- |
|
|
226
|
+
| PENDING | PENDING | PENDING | PENDING | PENDING | PENDING |
|
|
227
|
+
|
|
221
228
|
### Process Improvements
|
|
222
229
|
|
|
223
230
|
PENDING
|
|
@@ -231,6 +238,7 @@ PENDING
|
|
|
231
238
|
- [ ] **Series:** every series beside previous report's numbers, or marked baseline.
|
|
232
239
|
- [ ] **Writes:** only this report and template `Project Instructions` changed; throwaway worktrees / remote targets removed.
|
|
233
240
|
- [ ] **Process Improvements:** `Universal` = proposed step changes, template untouched; `Project` = edits applied below `bkit:end`; each `none` if empty.
|
|
241
|
+
- [ ] **Suggested Issues:** every `MEDIUM`+ finding ID in exactly one row; every row has a `Next Step`.
|
|
234
242
|
- [ ] **Gate 3 - Verified:** Every checkbox above independently verified and checked off.
|
|
235
243
|
|
|
236
244
|
> `Project Instructions` below `bkit:end` are consumer-owned — `bkit install` never overwrites them, `bkit check` drift stays clean. Add project-specific tools, paths, commands, and checks there, keyed by section or step title; never results.
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
> [!IMPORTANT]
|
|
43
43
|
> What good looks like; canonical for the plan phase. Subagents (plan generate, plan review, plan summary) must follow this spec. No plan subagent restates rules; this section = single source of truth for the plan.
|
|
44
44
|
|
|
45
|
-
- **Narrative:** 1–2 sentences, user POV (not system POV). User action + what they get back.
|
|
46
|
-
- **Success Criteria:** <=5 bullets, measurable / testable. Outcomes (e.g. "user sees their event in the list within 2s"), not steps (e.g. "call API, render component"). Design count ≠ 5 → smallest set proving feature. Design → verbatim. Audits only → one bullet per in-scope finding id from `Expected`; no 5-bullet cap.
|
|
45
|
+
- **Narrative:** 1–2 sentences, user POV (not system POV). User action + what they get back. Source, first that carries it wins: design `## Acceptance Scenario` → verbatim; issue `Narrative` (change shape, `.bkit/trackers.md` § Issue shapes) → verbatim; audits only (`docs/audits/`) → user/operator impact from in-scope findings. None → both fields = `⚠️ MISSING: no design doc, no issue Narrative and no audit report — human must provide before plan proceeds`; never fabricate; Gate 1 blocked until human fills.
|
|
46
|
+
- **Success Criteria:** <=5 bullets, measurable / testable. Outcomes (e.g. "user sees their event in the list within 2s"), not steps (e.g. "call API, render component"). Design count ≠ 5 → smallest set proving feature. Design → verbatim. No design → issue `Success Criteria` verbatim. Audits only → one bullet per in-scope finding id from `Expected`; no 5-bullet cap.
|
|
47
47
|
- **Process Sketch:** Design → plan inherits/refines. same happy-path (`Concrete Example`) + branches (`Edge Cases`) as `WHEN X → THEN Y` (3–7 lines); reuse exact examples, do not invent. Outcomes, not steps.
|
|
48
48
|
- **Key Edge Cases:** Design → plan inherits. Concurrency, conflicts, failures, cross-feature — not trivial validation (plan adds that).
|
|
49
|
-
- **Edge Cases:** Plan phase — design Key Edge Cases verbatim + validation / error / boundary cases.
|
|
49
|
+
- **Edge Cases:** Plan phase — design Key Edge Cases verbatim (no design → issue `Edge Cases` rows verbatim) + validation / error / boundary cases.
|
|
50
50
|
- **Concrete Example:** Plan phase only. Role, starting state, numbered steps, observable outcome. One scenario, not a list.
|
|
51
|
-
- **Derived Test Matrix:** Plan phase only. One row per testable behaviour → exactly one `Agent Execution Runbook` task. No row without a target file. In-scope audit behaviour → one row.
|
|
51
|
+
- **Derived Test Matrix:** Plan phase only. One row per testable behaviour → exactly one `Agent Execution Runbook` task. No row without a target file. In-scope audit behaviour → one row. Issue `Derived Test Matrix` rows → kept verbatim; add missing rows.
|
|
52
52
|
|
|
53
53
|
### Narrative
|
|
54
54
|
|
|
55
|
-
> Inherited from design; do not rewrite.
|
|
55
|
+
> Inherited from design, else the issue; do not rewrite.
|
|
56
56
|
|
|
57
57
|
[Copied verbatim from `{FID}-design.md` § Acceptance Scenario → Narrative. No design → per Spec above; initially set to `PENDING`.]
|
|
58
58
|
|
|
59
59
|
### Success Criteria
|
|
60
60
|
|
|
61
|
-
> Inherited from design; do not rewrite.
|
|
61
|
+
> Inherited from design, else the issue; do not rewrite.
|
|
62
62
|
|
|
63
63
|
[Copied verbatim from `{FID}-design.md` § Acceptance Scenario → Success Criteria. No design → per Spec above; initially set to `PENDING`.]
|
|
64
64
|
|
|
@@ -406,6 +406,8 @@ _No DB changes: "Code-only — `git revert` sufficient."_
|
|
|
406
406
|
> **Build order and test source.** Order tasks by build dependency (schema → API → UI). Behaviour tests only from `Derived Test Matrix` rows — do not invent. Boundary-crossing tasks (DB / API / model / network / migration) carry paired non-mock `Done when` tests; pure-function tasks exempt from pairing, not from unit tests.
|
|
407
407
|
>
|
|
408
408
|
> **Test first.** Every task MUST include `**Test first:**` after `Done when`. Behaviour change at unit / integration tier → one or more tests, `;`-separated, each `` `{test file}` `` `` `{test name}` `` fails on {assertion} — repo-relative test files, test names as the runner reports them or their last segments, no `;` in assertion text; build sees each fail against stubs before writing the task's code. No behaviour change (docs, config, pure refactor) or E2E / `@live` tier only → `n/a — {reason naming which}`.
|
|
409
|
+
>
|
|
410
|
+
> **Issue tasks.** Change-shape issue (`.bkit/trackers.md` § Issue shapes) → its `Tasks` lines are the starting runbook; keep each `Done when` / `Test first` (tighten, never weaken); renumber in build order.
|
|
409
411
|
|
|
410
412
|
- [ ] **Task 1:** [e.g., Create DB migration (`npx supabase db diff`)]. **Done when:** [e.g., `supabase/migrations/{timestamp}_add_items_status.sql` exists; `npx supabase db push --local` applies cleanly]. **Test first:** [e.g., n/a — migration; fresh-DB replay tier].
|
|
411
413
|
- [ ] **Task 2:** [e.g., Implement backend API action `action.ts`]. **Done when:** [e.g., `packages/api/src/items/setStatus.ts` exports `setStatus` with Zod-validated input; unit test `packages/api/src/items/setStatus.test.ts` covers each status transition; integration test in `packages/api/items.integration.test.ts` passes]. **Test first:** [e.g., `packages/api/src/items/setStatus.test.ts` `rejects an unknown status` fails on the thrown validation error — stub accepts any status; `packages/api/items.integration.test.ts` `persists the new status` fails on the stored row — stub writes nothing].
|
|
@@ -5,7 +5,8 @@ import * as fs from "node:fs";
|
|
|
5
5
|
import * as path from "node:path";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
import type { PreflightFinding } from "../before/index.js";
|
|
8
|
-
import {
|
|
8
|
+
import { readJsonFile } from "../../shared/json.js";
|
|
9
|
+
import { readBkitConfig } from "../../shared/settings.js";
|
|
9
10
|
|
|
10
11
|
// ---------------------------------------------------------------------------
|
|
11
12
|
// Token-surface detectors
|
|
@@ -36,13 +37,12 @@ export function hasGithubMcpServer(cwd: string): boolean {
|
|
|
36
37
|
for (const rel of [".mcp.json", path.join(".cursor", "mcp.json")]) {
|
|
37
38
|
const p = path.join(cwd, rel);
|
|
38
39
|
if (!fs.existsSync(p)) continue;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
40
|
+
// Malformed config — ignore; a JSON-drift advisory covers that separately.
|
|
41
|
+
const cfg = readJsonFile(p);
|
|
42
|
+
if (!cfg.ok || typeof cfg.value !== "object" || cfg.value === null) continue;
|
|
43
|
+
const servers = (cfg.value as Record<string, unknown>).mcpServers as
|
|
44
|
+
Record<string, unknown> | undefined;
|
|
45
|
+
if (servers?.github) return true;
|
|
46
46
|
}
|
|
47
47
|
return false;
|
|
48
48
|
}
|
|
@@ -119,7 +119,7 @@ export function buildCloudDashboardsAdvisory(cwd: string): PreflightFinding | nu
|
|
|
119
119
|
// cloud=claude path (bkit-cloud.yml): GitHub-tracker only, ANTHROPIC_API_KEY only.
|
|
120
120
|
// cloud=cursor path (.cursor/): BKIT_LINEAR_API_KEY for Cursor dashboard.
|
|
121
121
|
// Distinguish by recorded variant; fall back to presence-based detection.
|
|
122
|
-
const recordedVariant =
|
|
122
|
+
const recordedVariant = readBkitConfig(cwd).cloudAgents;
|
|
123
123
|
const isCursorCloud = recordedVariant === "cursor" || (!hasRouter && hasCursor);
|
|
124
124
|
|
|
125
125
|
const secretList = isCursorCloud ? "`BKIT_LINEAR_API_KEY`" : "`ANTHROPIC_API_KEY`";
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as path from "node:path";
|
|
7
|
+
import { readJsonFile } from "../../shared/json.js";
|
|
7
8
|
import { readPackageJson } from "../../shared/package-json.js";
|
|
8
9
|
import type { PreflightFinding } from "../before/index.js";
|
|
9
10
|
import { isAdvisorySuppressed, type SuppressionReporter } from "./suppression.js";
|
|
@@ -394,14 +395,15 @@ export function detectTaggedTestsWithoutCiHome(
|
|
|
394
395
|
const pkgScripts = new Map<string, Record<string, unknown>>();
|
|
395
396
|
const declaredScripts = new Set<string>();
|
|
396
397
|
for (const pj of packageJsons) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
const scripts = (parsed.scripts as Record<string, unknown>) ?? {};
|
|
400
|
-
pkgScripts.set(pj, scripts);
|
|
401
|
-
for (const name of Object.keys(scripts)) declaredScripts.add(name);
|
|
402
|
-
} catch {
|
|
398
|
+
const parsed = readJsonFile(pj);
|
|
399
|
+
if (!parsed.ok || parsed.value === null) {
|
|
403
400
|
pkgScripts.set(pj, {});
|
|
401
|
+
continue;
|
|
404
402
|
}
|
|
403
|
+
const scripts =
|
|
404
|
+
((parsed.value as Record<string, unknown>).scripts as Record<string, unknown>) ?? {};
|
|
405
|
+
pkgScripts.set(pj, scripts);
|
|
406
|
+
for (const name of Object.keys(scripts)) declaredScripts.add(name);
|
|
405
407
|
}
|
|
406
408
|
|
|
407
409
|
const nearestPkg = (fileDir: string): string | null => {
|
|
@@ -489,12 +491,12 @@ export function detectTurboIntegrationInputs(cwd: string): PreflightFinding[] {
|
|
|
489
491
|
const findings: PreflightFinding[] = [];
|
|
490
492
|
const turboPath = path.join(cwd, "turbo.json");
|
|
491
493
|
if (!fs.existsSync(turboPath)) return findings;
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
}
|
|
494
|
+
const turbo = readJsonFile(turboPath);
|
|
495
|
+
if (!turbo.ok) return findings;
|
|
496
|
+
const doc = turbo.value as {
|
|
497
|
+
tasks?: Record<string, unknown>;
|
|
498
|
+
pipeline?: Record<string, unknown>;
|
|
499
|
+
};
|
|
498
500
|
// turbo v2 → `tasks`; turbo v1 → `pipeline`. Either may be present.
|
|
499
501
|
const tasks = doc.tasks ?? doc.pipeline ?? {};
|
|
500
502
|
const externalProxyHints = ["migrations", "fixtures", "seed", ".env"];
|