@kenkaiiii/ggcoder 5.107.0 → 5.109.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/README.md +1 -1
- package/assets/skills/bulletproof/SKILL.md +3 -1
- package/assets/skills/bulletproof/references/agent-surface.md +4 -4
- package/assets/skills/bulletproof/references/audit-protocol.md +1 -1
- package/assets/skills/bulletproof/references/platform-playbooks.md +1 -1
- package/assets/skills/bulletproof/references/provenance.md +26 -2
- package/assets/skills/bulletproof/references/secure-defaults.md +1 -1
- package/assets/skills/bulletproof/references/supply-chain.md +2 -2
- package/assets/skills/bulletproof/references/threat-landscape.md +1 -0
- package/assets/skills/bulletproof/references/verification.md +1 -1
- package/assets/skills/compliance-guard/SKILL.md +3 -1
- package/assets/skills/compliance-guard/references/eu-uk.md +8 -7
- package/assets/skills/compliance-guard/references/provenance.md +25 -2
- package/assets/skills/compliance-guard/references/us.md +4 -4
- package/assets/skills/durable/SKILL.md +4 -2
- package/assets/skills/durable/references/agent-db-safety.md +8 -1
- package/assets/skills/durable/references/backups-and-runtime.md +8 -8
- package/assets/skills/durable/references/migrations-and-schema.md +5 -5
- package/assets/skills/gg-guide/SKILL.md +2 -0
- package/assets/skills/gg-guide/references/chat-motion-goals.md +7 -1
- package/assets/skills/gg-guide/references/checklist-and-safety.md +17 -0
- package/assets/skills/gg-guide/references/code-mode.md +32 -1
- package/assets/skills/gg-guide/references/getting-started.md +15 -0
- package/assets/skills/gg-guide/references/ken-and-autopilot.md +15 -1
- package/assets/skills/gg-guide/references/mcp-and-skills.md +21 -1
- package/assets/skills/gg-guide/references/models-and-sign-in.md +21 -1
- package/assets/skills/gg-guide/references/sessions-and-history.md +22 -11
- package/assets/skills/gg-guide/references/settings.md +12 -0
- package/assets/skills/gg-guide/references/troubleshooting-and-data.md +9 -0
- package/assets/skills/lean/SKILL.md +3 -1
- package/assets/skills/lean/references/playbooks.md +5 -5
- package/dist/app-sidecar/session-routes.js +0 -1
- package/dist/app-sidecar/session-routes.js.map +1 -1
- package/dist/app-sidecar.js +0 -6
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli.js +9 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session.js +46 -42
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/mcp/defaults.d.ts +7 -0
- package/dist/core/mcp/defaults.js +10 -0
- package/dist/core/mcp/defaults.js.map +1 -1
- package/dist/core/mcp/index.d.ts +1 -1
- package/dist/core/mcp/index.js +1 -1
- package/dist/core/mcp/index.js.map +1 -1
- package/dist/core/prompt-commands.js +1 -1
- package/dist/core/prompt-commands.js.map +1 -1
- package/dist/core/skills.d.ts +10 -8
- package/dist/core/skills.js +29 -5
- package/dist/core/skills.js.map +1 -1
- package/dist/tools/browser-session.d.ts +16 -1
- package/dist/tools/browser-session.js +87 -3
- package/dist/tools/browser-session.js.map +1 -1
- package/dist/ui/App.js +56 -51
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/SkillsOverlay.js +1 -1
- package/dist/ui/components/SkillsOverlay.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Switch any time with `/model`.
|
|
|
50
50
|
| **Gemini** | Gemini 4 Hydrogen, 4 Argon, 4 Carbon, 3.8 Flash, 3.6 Flash, 3.5 Flash Lite, 3.1 Flash Lite, 3.5 Flash, 3.1 Pro (Preview) | API key (Google AI Studio) |
|
|
51
51
|
| **xAI** | Grok 4.7 | API key |
|
|
52
52
|
| **Kimi** | Kimi K3, K2.8 Preview, K2.7 Code, K2.7 Code HighSpeed | Kimi Code plan key or Moonshot API key |
|
|
53
|
-
| **Z.AI** | GLM-5.3, GLM-5.3-Flash
|
|
53
|
+
| **Z.AI** | GLM-5.4 (Coding Plan), GLM-5.3 (API key), GLM-5.3-Flash | Coding Plan key or API key |
|
|
54
54
|
| **MiniMax** | MiniMax M3.1 Flash, M3 | M Plan key or API key |
|
|
55
55
|
| **Xiaomi** | MiMo-V2.6-Pro, MiMo-V2.6-Flash, MiMo-V2.6-Pro-UltraSpeed | Token Plan key or API Credits key |
|
|
56
56
|
| **DeepSeek** | DeepSeek V4 Pro, V4.1 Flash | API key |
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bulletproof
|
|
3
3
|
description: "Use to secure code an attacker can reach: finding and fixing ways someone could break in, steal secrets or reach another user's data. Do NOT use for local-only scripts, legal questions or performance."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "2026.11.22"
|
|
4
6
|
# Checklist audits only (Security, Dependencies, Secrets / Performance); hidden from routine coding after the 27 Oct 2026 skill-value bench.
|
|
5
7
|
hidden: true
|
|
6
8
|
license: Apache-2.0. Content is defensive engineering guidance, not a security certification or a penetration test. See references/provenance.md.
|
|
7
|
-
compatibility: Works offline from the bundled references, a snapshot dated 22 October 2026. Versions, CVEs and incident details decay fast; re-verify date-sensitive claims with web access before stating them as current. Never certifies that software is secure.
|
|
9
|
+
compatibility: Works offline from the bundled references, a snapshot dated 22 October 2026, partly re-verified 22 November 2026. Versions, CVEs and incident details decay fast; re-verify date-sensitive claims with web access before stating them as current. Never certifies that software is secure.
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
# Bulletproof
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Load this when the project calls a model, exposes tools to a model, runs an agent, serves or consumes MCP, or ships a chat feature. Also load it when hardening a developer tool, because a developer tool is an agent target.
|
|
4
4
|
|
|
5
|
-
Standards [V]: **OWASP Top 10 for LLM Applications (2025)
|
|
5
|
+
Standards [V]: **OWASP Top 10 for LLM Applications 2026** (published 4 Aug 2026 and renumbered from 2025, so always cite an ID with its year) — LLM01:2026 Prompt Injection, LLM02:2026 Sensitive Information Disclosure, LLM03:2026 Excessive Agency, LLM04:2026 Supply Chain, LLM05:2026 Data and Model Poisoning, LLM06:2026 Unbounded Consumption, LLM07:2026 Misinformation, LLM08:2026 Hidden Context Exposure, LLM09:2026 Vector and Embedding Weaknesses, LLM10:2026 Improper Output Handling. **OWASP Top 10 for Agentic Applications (2026)**, published 9 Dec 2025 — ASI01 Goal Hijack, ASI02 Tool Misuse, ASI03 Identity & Privilege Abuse, ASI04 Agentic Supply Chain, ASI05 Unexpected Code Execution, ASI06 Memory & Context Poisoning, ASI07 Insecure Inter-Agent Communication, ASI08 Cascading Failures, ASI09 Human-Agent Trust Exploitation, ASI10 Rogue Agents. Its core principle is **least agency** — grant the minimum autonomy the task requires, not merely minimum permissions.
|
|
6
6
|
|
|
7
7
|
## Contents
|
|
8
8
|
|
|
@@ -45,7 +45,7 @@ Egress is the leg most often left intact and the easiest to close. Exfiltration
|
|
|
45
45
|
3. **Deterministic policy outside the model.** Enforce limits in code that intercepts before execution: allowlisted commands, path containment, spend caps, rate limits, recipient allowlists. No model in the decision loop.
|
|
46
46
|
4. **Irreversibility gates.** Deleting data, moving money, sending messages to third parties, publishing artifacts, and changing permissions each need explicit confirmation, and should be unavailable in autonomous runs.
|
|
47
47
|
5. **Audit trail.** Log every tool invocation with arguments and outcome. EDR sees execution, not intent — a legitimately-instructed agent doing destructive work looks entirely normal [U], so the tool log is your only forensic record.
|
|
48
|
-
6. **Treat model output as untrusted input** (
|
|
48
|
+
6. **Treat model output as untrusted input** (LLM10:2026). Never feed it to `eval`, a shell, SQL, `innerHTML`, or a file path without the same validation you would apply to a web form.
|
|
49
49
|
7. **Isolate the workspace.** Run agent execution in a container or sandbox with no credentials mounted, no network by default, and a bounded filesystem.
|
|
50
50
|
|
|
51
51
|
## Sandbox escapes — the 2026 pattern
|
|
@@ -97,10 +97,10 @@ Applies to GG Coder itself and to any agent you build or run.
|
|
|
97
97
|
|
|
98
98
|
## RAG, memory & multi-agent
|
|
99
99
|
|
|
100
|
-
- Poisoned documents in a vector store are persistent injections that fire on retrieval (
|
|
100
|
+
- Poisoned documents in a vector store are persistent injections that fire on retrieval (LLM09:2026, ASI06). Control write access to the index, record provenance per chunk, and prefer per-tenant indexes over one shared index with metadata filtering.
|
|
101
101
|
- Agent memory that persists across sessions is a persistence mechanism for an attacker. Scope memory per user, make it inspectable, make it clearable, and never let it carry tool permissions.
|
|
102
102
|
- Agent-to-agent messages are untrusted input (ASI07). Authenticate the sender, validate the schema, cap the fan-out, and bound recursion depth — cascading failures (ASI08) are usually an unbounded loop, not an intrusion.
|
|
103
|
-
- Cost and quota are a security property (
|
|
103
|
+
- Cost and quota are a security property (LLM06:2026). Cap tokens, tool calls, iterations, and spend per task. An unbounded agent loop is a self-inflicted denial of wallet.
|
|
104
104
|
|
|
105
105
|
## Reviewing an agent feature — the short list
|
|
106
106
|
|
|
@@ -174,6 +174,6 @@ Cite these in the `Category`/`CWE` fields, not in prose. Re-verified 3 Oct 2026
|
|
|
174
174
|
- **CWE Top 25 (2025 edition)**, top ten in order — CWE-79 XSS, CWE-89 SQLi, CWE-352 CSRF, CWE-862 Missing Authorization, CWE-787 Out-of-bounds Write, CWE-22 Path Traversal, CWE-416 Use After Free, CWE-125 Out-of-bounds Read, CWE-78 OS Command Injection, CWE-94 Code Injection.
|
|
175
175
|
- **OWASP API Security Top 10 (2023, still current)** — API1 BOLA, API2 Broken Authentication, API3 BOPLA, API4 Unrestricted Resource Consumption, API5 Broken Function Level Authorization, API6 Unrestricted Access to Sensitive Business Flows, API7 SSRF, API8 Misconfiguration, API9 Improper Inventory Management, API10 Unsafe Consumption of APIs.
|
|
176
176
|
- **OWASP ASVS 5.0.0** (May 2025) — ~350 requirements, cumulative L1/L2/L3. Requirement IDs were renumbered from 4.x; do not cite a 4.x ID as 5.0.
|
|
177
|
-
- **OWASP Top 10 for LLM Applications
|
|
177
|
+
- **OWASP Top 10 for LLM Applications 2026** — LLM01:2026 Prompt Injection … LLM10:2026 Improper Output Handling (renumbered from 2025; cite IDs with the year).
|
|
178
178
|
- **OWASP Top 10 for Agentic Applications (2026)** — ASI01 Agent Goal Hijack, ASI02 Tool Misuse, ASI03 Agent Identity & Privilege Abuse, ASI04 Agentic Supply Chain, ASI05 Unexpected Code Execution, ASI06 Memory & Context Poisoning, ASI07 Insecure Inter-Agent Communication, ASI08 Cascading Agent Failures, ASI09 Human-Agent Trust Exploitation, ASI10 Rogue Agents.
|
|
179
179
|
- **OWASP MASVS v2.1.0** — eight categories (STORAGE, CRYPTO, AUTH, NETWORK, PLATFORM, CODE, RESILIENCE, PRIVACY). **There are no L1/L2 levels since v2.0.0**; cite MASTG test IDs instead.
|
|
@@ -157,7 +157,7 @@ Grep priorities in this order: privileged setters without timelock and multisig;
|
|
|
157
157
|
| **Model provenance** | Sign at train time, verify **in the loader** at load time (OpenSSF Model Signing / sigstore) [V]; pin dataset revisions by content hash, not by a mutable hub tag | A README instruction to "verify the hash" is not verification |
|
|
158
158
|
| **Endpoint exposure** | Anything bound to `0.0.0.0`: experiment trackers, notebook servers, inference servers, dashboards, job-submission APIs, local model runtimes | Several 2025–2026 critical CVEs in this class chain auth bypass with traversal to unauthenticated RCE [S]; some job APIs are unauthenticated by design and must be network-isolated |
|
|
159
159
|
| **Default credentials** | Auth config files shipped with defaults; notebooks started with empty tokens and `--allow-root` | Generic credential-harvesting scanners find these incidentally, which is how most of these get popped [V] |
|
|
160
|
-
| **Model output** | Treat as untrusted input to whatever consumes it — never straight into `eval`, a shell, SQL, or `innerHTML` | This is
|
|
160
|
+
| **Model output** | Treat as untrusted input to whatever consumes it — never straight into `eval`, a shell, SQL, or `innerHTML` | This is LLM10:2026 Improper Output Handling, and it is how a prompt injection becomes code execution |
|
|
161
161
|
|
|
162
162
|
---
|
|
163
163
|
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Provenance
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Contents
|
|
4
|
+
- Confidence markers
|
|
5
|
+
- Re-verified 3 October 2026
|
|
6
|
+
- Re-verified 22 October 2026
|
|
7
|
+
- Re-verified 22 November 2026
|
|
8
|
+
- Source classes
|
|
9
|
+
- Known gaps in this snapshot
|
|
10
|
+
- What this skill is not
|
|
11
|
+
- When to escalate to a human specialist
|
|
12
|
+
|
|
13
|
+
**Snapshot date: 3 October 2026**, partially re-verified **22 October 2026** and **22 November 2026** (previous full snapshot 12 August 2026). Items re-verified on either date are listed below; anything else carries its marker from the earlier snapshot. Security facts decay faster than any other content in this repository — a version number, a CVE, a default, or an incident detail that was accurate at snapshot time may be wrong by the time you read it.
|
|
4
14
|
|
|
5
15
|
## Confidence markers
|
|
6
16
|
|
|
@@ -56,9 +66,23 @@ Dropped as not re-verifiable this pass: specific breakout-time figures, the "38%
|
|
|
56
66
|
|
|
57
67
|
Changed this pass: `threat-landscape.md` rewritten as technique + fingerprint (counts and statistics dropped); package-manager version minimums for release-age cooldowns replaced with a rule; the "~80 days to exploitation" figure dropped.
|
|
58
68
|
|
|
69
|
+
## Re-verified 22 November 2026
|
|
70
|
+
|
|
71
|
+
| Claim | Marker | Primary source |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| OWASP Top 10 for LLM Applications 2026 (4 Aug 2026), renumbered; every bare LLMxx ID rewritten as LLMxx:2026 | [V] | github.com/GenAI-Security-Project/GenAI-LLM-Top10 |
|
|
74
|
+
| GitHub blocks `pull_request_target` by default in public repos from 2 Dec 2026 (brownouts 9 and 16 Nov) | [V] title/date; [S] scope | github.blog/changelog/2026-11-02-pull_request_target-blocked-by-default-december-2/ ; socket.dev |
|
|
75
|
+
| Next.js 3 Nov 2026 security release (16.4.5 / 15.5.29), incl. `use cache` cross-tenant disclosure GHSA-mfr8-8qww-v76h | [V] | nextjs.org/blog/november-2026-security-release |
|
|
76
|
+
| Node.js 11 Nov 2026 security releases (22.23.5, 24.22.3, 26.13.1) | [V] | nodejs.org/en/blog/vulnerability/november-2026-security-releases |
|
|
77
|
+
| OAuth 2.1 at draft-ietf-oauth-v2-1-17, still an Internet-Draft | [V] | datatracker.ietf.org/doc/draft-ietf-oauth-v2-1/ |
|
|
78
|
+
| MCP: no spec revision after 2026-07-28 | [V] | blog.modelcontextprotocol.io |
|
|
79
|
+
| CWE Top 25 2025 still the latest; CWE 5.0 (28 Oct 2026) deprecates CWE-377/391/613, none cited here | [V] | cwe.mitre.org/news/archives/news2026.html |
|
|
80
|
+
|
|
81
|
+
Not added, unverified: React Server Components CVE-2026-126187 (date disputed, React advisory not reached); GitHub secret scanning of Actions logs and Agentic Workflows GA (changelog bodies not read); the OWASP Agent Control Standard (not read). No supply-chain incident from 22 Oct to 22 Nov 2026 could be confirmed from a primary source: that is "no hits", not "none happened".
|
|
82
|
+
|
|
59
83
|
## Source classes
|
|
60
84
|
|
|
61
|
-
- **Standards and frameworks**: OWASP (Top 10:2025, ASVS 5.0.0, API Security Top 10 2023, MASVS 2.1.0 / MASTG 2.0.0, LLM Top 10
|
|
85
|
+
- **Standards and frameworks**: OWASP (Top 10:2025, ASVS 5.0.0, API Security Top 10 2023, MASVS 2.1.0 / MASTG 2.0.0, LLM Top 10 2026, Agentic Top 10 2026), MITRE (CWE Top 25 2025 edition, ATT&CK), NIST (SP 800-63B-4, SP 800-218 / 218A, SP 800-53 Rev 5, FIPS 203/204/205), SLSA, OpenSSF.
|
|
62
86
|
- **Vendor and platform documentation**: Apple, Google/Android, Microsoft, Electron, Tauri, PyTorch, Solidity, package registries.
|
|
63
87
|
- **Incident reporting and threat intelligence**: model-provider security disclosures, national CERT and CISA advisories, established security-vendor research teams, and independent researchers with published methodology.
|
|
64
88
|
- **Regulatory texts**: EU Cyber Resilience Act, UK PSTI.
|
|
@@ -41,7 +41,7 @@ Baseline per **NIST SP 800-63B-4** (final 31 Jul 2025) [V]:
|
|
|
41
41
|
Implementation:
|
|
42
42
|
|
|
43
43
|
- Hash with **argon2id** (memory-hard, tuned so a verification takes ~100–300 ms on your hardware) or bcrypt where argon2 is unavailable. Never a bare SHA family hash, never MD5.
|
|
44
|
-
- **OAuth**: cite **RFC 9700** (OAuth 2.0 Security BCP, Jan 2025) [V] — OAuth 2.1 is still an IETF Internet-Draft (draft-
|
|
44
|
+
- **OAuth**: cite **RFC 9700** (OAuth 2.0 Security BCP, Jan 2025) [V] — OAuth 2.1 is still an IETF Internet-Draft (draft -17 at 22 Nov 2026) [V]. Concretely: authorization code + PKCE for every client; no implicit or password grant; exact-string redirect-URI matching; `state`/PKCE/nonce against CSRF; mix-up defense when talking to several authorization servers; short-lived access tokens; refresh tokens rotated with reuse detection or sender-constrained. Prefer a maintained library or hosted IdP over writing the flow.
|
|
45
45
|
- Session tokens from a CSPRNG, ≥128 bits. Rotate the session identifier on login and on privilege change. Server-side revocation must exist — a stateless token you cannot revoke is an outage during an incident.
|
|
46
46
|
- Constant-time comparison for tokens, signatures, and MFA codes — but **validate the shape before you compare**. A stored credential whose hex/base64 decodes to the wrong length, or whose scheme/salt/hash does not parse, must be rejected as malformed and fail closed; never fall through to the comparison. `timingSafeEqual` on two empty buffers returns true, so an unparsed record can verify any password.
|
|
47
47
|
- Rate-limit and lock out on login, reset, MFA, and token exchange. Generic failure messages: never reveal whether the account exists.
|
|
@@ -46,7 +46,7 @@ The highest-value target, because CI holds every credential at once — 59% of m
|
|
|
46
46
|
| **Pin actions by SHA** | `uses: org/action@<40-char-sha>`. A version tag is mutable: the 2025 `tj-actions/changed-files` compromise retroactively repointed its tags at malicious code [S] |
|
|
47
47
|
| **Least-privilege token** | An explicit `permissions:` block, default `contents: read`, elevated only in the job that needs it |
|
|
48
48
|
| **Enforce pinning** | Repo/org setting: Actions policy → require full-SHA pins (fails unpinned workflows; available since Aug 2025) [V]. Let Dependabot bump the SHAs |
|
|
49
|
-
| **`pull_request_target` / `workflow_run`** | Avoid them. These run with the base repo's token, secrets, and default-branch cache access [V]. Since 8 Dec 2025 the workflow always comes from the default branch [V], and current `actions/checkout` refuses fork-PR head refs under `pull_request_target` (backported 16 Jul 2026 to floating major tags only — **SHA-pinned checkouts must be bumped to get it**) [V]. Never check out or run PR code there |
|
|
49
|
+
| **`pull_request_target` / `workflow_run`** | Avoid them. These run with the base repo's token, secrets, and default-branch cache access [V]. Since 8 Dec 2025 the workflow always comes from the default branch [V], and current `actions/checkout` refuses fork-PR head refs under `pull_request_target` (backported 16 Jul 2026 to floating major tags only — **SHA-pinned checkouts must be bumped to get it**) [V]. Never check out or run PR code there. From 2 Dec 2026 GitHub blocks `pull_request_target` by default in public repos unless an Actions policy re-allows it per workflow [V] (scope details [S]): treat any re-allow as a reviewed security decision, not a fix for a broken workflow |
|
|
50
50
|
| **Cache poisoning** | Any job that runs untrusted code must not save caches the release job restores; key release caches separately or skip caching in release. This was TanStack's initial access [V] |
|
|
51
51
|
| **OIDC scope** | `id-token: write` only on the deploy/publish job; cloud trust policies pinned to repo + branch/environment, not just the org |
|
|
52
52
|
| **Script injection** | Never interpolate `${{ github.event.* }}` (titles, branch names, comment bodies) directly into a `run:` block. Pass through `env:` and quote |
|
|
@@ -67,7 +67,7 @@ The highest-value target, because CI holds every credential at once — 59% of m
|
|
|
67
67
|
- Automated dependency updates with a review gate, plus a scanner that fails the build on known-exploited vulnerabilities in reachable code — not on every advisory, or the team learns to ignore it.
|
|
68
68
|
- Track a real SBOM (CycloneDX or SPDX) generated in CI per release. It is a regulatory obligation for some products [V], and independently it is the only way to answer "are we affected" in hours instead of days.
|
|
69
69
|
- **The controllable variable is your patch latency**, not the attacker's speed.
|
|
70
|
-
- **Run a currently patched runtime line.** Node ships security releases several times a year (21 Oct 2026
|
|
70
|
+
- **Run a currently patched runtime line.** Node ships security releases several times a year (21 Oct 2026: a Brotli decoder out-of-bounds write and a TLS hostname-check bypass; 11 Nov 2026: an HTTPS re-entrancy read that can leak TLS private keys, plus HTTP/2 remote crashes, fixed in 22.23.5 / 24.22.3 / 26.13.1) [V]; stay on a supported line and take its patch releases, rather than pinning a remembered version.
|
|
71
71
|
- **After a framework upgrade, check its transitive native dependencies.** Next.js's 14 Oct 2026 advisories included unauthenticated RCE through SVG handling in image optimization and `next/og` (native `sharp`/librsvg) [V]: the framework version was the fix, but the reachable code was a native image library. List native deps (`npm ls sharp`, lockfile) and confirm they moved too.
|
|
72
72
|
- Subscribe to advisories for your actual stack. For a small team, three feeds you read beats thirty you filter.
|
|
73
73
|
|
|
@@ -50,6 +50,7 @@ Read `agent-surface.md` in full if the project is an agent, tool server, or AI f
|
|
|
50
50
|
| **Open backend row-level security** (CVE-2025-48757, Supabase apps from a generator) [S] | RLS off; `using (true)`; reads locked but writes open; service-role key in the client; `auth.uid()` not compared to the owner column | The public anon key plus an open table is the standard indie breach |
|
|
51
51
|
| **Middleware-only auth** (CVE-2025-29927, Next.js `x-middleware-subrequest`) [V] | Authorization checked only in `middleware.ts` or edge guards | Re-check in the handler or data layer |
|
|
52
52
|
| **Framework fixed, native dependency reachable** (Next.js, 14 Oct 2026: unauthenticated RCE via SVG in image optimization / `next/og` through `sharp`/librsvg, and via `use cache` returning typed arrays) [V] | Native image/parsing deps in the lockfile; user-controlled images or cached values reaching them | After a framework upgrade, confirm its transitive native deps moved too |
|
|
53
|
+
| **Shared cache crosses tenants** (Next.js, 3 Nov 2026: cross-tenant disclosure through `use cache` / `unstable_cache`, fixed in 16.4.5 / 15.5.29) [V] | Tenant or user identity read inside a cached function but absent from its cache key | Put tenant/user identity explicitly into the key, or keep per-user data out of shared cache |
|
|
53
54
|
| **Exposed AI and developer infrastructure** [U]: inference servers, notebooks, MCP endpoints on the internet | Services bound to `0.0.0.0` without auth | Generic credential scanners find you first, not AI-aware attackers |
|
|
54
55
|
| **CMS and edge devices** [V] (VulnCheck 1H-2026): the largest share of known-exploited vulnerabilities | A CMS or appliance in the deployment | Do not over-rotate to AI; check the likelier door |
|
|
55
56
|
|
|
@@ -48,7 +48,7 @@ Pick one per row. Running one scanner in CI beats evaluating five.
|
|
|
48
48
|
- **Backend-as-a-service**: query the REST layer directly with the public anon key as an unauthenticated client and as a second user. The dashboard's "enabled" badge is not evidence — a permissive policy shows the same badge [S].
|
|
49
49
|
- **Mobile**: inspect the built artifact, not the source — extract the bundle and grep for keys; check the manifest's exported components and network security config as they appear in the built app.
|
|
50
50
|
- **Desktop**: read fuses from the **packaged** application; confirm loopback endpoints reject a request with no token and a wrong `Origin`; confirm the updater rejects an unsigned or downgraded payload.
|
|
51
|
-
- **Supply chain / CI**: `grep -rn 'uses:' .github/workflows | grep -v '@[0-9a-f]\{40\}'` returns nothing; no workflow uses `pull_request_target` with a PR-head checkout; `npm config get allow-scripts`/the allowlist is what you expect; `git log --all -- .claude/settings.json .vscode/tasks.json` shows only commits you made.
|
|
51
|
+
- **Supply chain / CI**: `grep -rn 'uses:' .github/workflows | grep -v '@[0-9a-f]\{40\}'` returns nothing; no workflow uses `pull_request_target` with a PR-head checkout, and any Actions policy re-allowing it names a reviewed workflow; `npm config get allow-scripts`/the allowlist is what you expect; `git log --all -- .claude/settings.json .vscode/tasks.json` shows only commits you made.
|
|
52
52
|
- **CLI/dev tools**: run against a deliberately hostile fixture repository containing a path-traversal archive entry, a symlink pointing outside the tree, a file name with terminal escape sequences, and a config file with a plugin path. Assert the tool refuses each.
|
|
53
53
|
- **Contracts**: invariant tests plus a storage-layout diff on every upgradeable deploy.
|
|
54
54
|
- **ML**: attempt to load a non-safetensors artifact and confirm rejection; confirm inference endpoints are unreachable from outside the private network.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: compliance-guard
|
|
3
3
|
description: "Use for the legal side of shipping to real users: which laws apply, what cannot lawfully ship, and the consent, notices and policies the product owes. Do NOT use for bugs, data leaks or security hardening."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "2026.11.22"
|
|
4
6
|
license: Apache-2.0. Content is engineering guidance, not legal advice. See references/provenance.md.
|
|
5
7
|
compatibility: Static review works offline from the bundled references. Legal status changes constantly; date-sensitive claims must be re-verified with web access before being stated as current. Never certifies compliance.
|
|
6
8
|
---
|
|
@@ -13,7 +15,7 @@ Catch legal, privacy, and regulatory exposure in a shipped product before a regu
|
|
|
13
15
|
|
|
14
16
|
1. **Exposure drives obligations, not stack.** What the product does, who can reach it, and whose data it touches decide what applies.
|
|
15
17
|
2. **Never certify.** Never write "compliant", "GDPR compliant", "ADA compliant", "fully legal", or "you're covered". Produce risks, implemented controls, residual risk, and a *get a lawyer for this* list, labelled as engineering guidance, not legal advice.
|
|
16
|
-
3. **Date-check before asserting.** References are a snapshot (11 Aug 2026, re-verified in part 3 Oct and 22
|
|
18
|
+
3. **Date-check before asserting.** References are a snapshot (11 Aug 2026, re-verified in part 3 Oct, 22 Oct and 22 Nov 2026) with **[V]/[S]/[U]** markers (`references/provenance.md`). Re-verify dates, thresholds, and "in force" claims with web access; without it, say the claim is from a snapshot. Never invent a citation, section, or deadline.
|
|
17
19
|
4. **Say it plainly when it is illegal** — early, before code: the regime, the red line, the safe subset, and what authorisation would change the answer. Never soften it, never silently build it.
|
|
18
20
|
5. **Fix, do not just flag.** Inline, build the control in. In a full review, report first, then fix what the user selects; fix straight away only when they asked for fixes ("fix it", "make it launch-ready"). Fix what code can fix (consent gating, security P0s via bulletproof's inline gate, opt-out plumbing, deletion propagation, disclosures, accessibility). Documents are templates with `[PLACEHOLDER]` fields; never invent entity name, address, DPO, retention periods, or vendor list.
|
|
19
21
|
6. **Proportionality.** Launch-blocking first, rank by probability × severity, keep the tail as backlog. Sixty findings produce zero fixes.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- 7. Verify before relying
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
Snapshot **11 Aug 2026**, spot re-verified 3 Oct
|
|
13
|
+
Snapshot **11 Aug 2026**, spot re-verified 3 Oct, 22 Oct and 22 Nov 2026 (see `provenance.md`). Markers: **[V]** verified against a primary/first-tier source · **[S]** snapshot, re-verify · **[U]** contested or in flux.
|
|
14
14
|
|
|
15
15
|
**Territorial reality:** GDPR applies to anyone offering goods or services to, or *monitoring the behaviour of*, people in the EU/EEA — regardless of where the developer sits **[V]**. Monitoring includes analytics cookies, session replay, ad pixels, and behavioural profiling. A US solo dev with an open signup form and Google Analytics is in scope. Blocking EU traffic is a legitimate engineering answer and should be offered as an option.
|
|
16
16
|
|
|
@@ -48,7 +48,7 @@ Snapshot **11 Aug 2026**, spot re-verified 3 Oct 2026 and 22 Oct 2026 (see `prov
|
|
|
48
48
|
|
|
49
49
|
## 2. ePrivacy — cookies and device storage
|
|
50
50
|
|
|
51
|
-
Consent is required **before** any non-essential storage or access on the user's device, under the ePrivacy Directive as transposed by each Member State — 27 variants **[V]**. The data half of the Digital Omnibus is **not law** **[S]**. "Art 88a/88b GDPR: one-click refuse, no re-asking for six months, browser signals" describes only the Commission's proposal. The Council Presidency's 2 Oct 2026 text keeps cookie consent in ePrivacy Art 5(3), deletes 88a/88b including the browser-signal duty, and allows re-asking after four months **[S]**.
|
|
51
|
+
Consent is required **before** any non-essential storage or access on the user's device, under the ePrivacy Directive as transposed by each Member State — 27 variants **[V]**. The data half of the Digital Omnibus is **not law** **[S]**. "Art 88a/88b GDPR: one-click refuse, no re-asking for six months, browser signals" describes only the Commission's proposal. The Council Presidency's 2 Oct 2026 text keeps cookie consent in ePrivacy Art 5(3), deletes 88a/88b including the browser-signal duty, and allows re-asking after four months **[S]**. Coreper agreed a Council mandate on 21 Oct 2026 on that approach, adding wider consent exemptions for audience and contextual-ad measurement; at 22 Nov 2026 Parliament had no position and no trilogue had begun **[S]**. Do not build to it; one-click reject is already the defensible design anyway. Scope is technology-neutral and expressly reaches pixels, local storage, and similar techniques **[V]**. This applies **whether or not** the data is personal, which is why "we only use anonymous analytics" is not an answer.
|
|
52
52
|
|
|
53
53
|
**Banner technical spec** (this is the implementable contract):
|
|
54
54
|
- No third-party script, pixel, or network request before an affirmative choice.
|
|
@@ -79,7 +79,7 @@ The Digital Omnibus on AI (Reg (EU) 2026/1744 of 8 July 2026) was published in t
|
|
|
79
79
|
| 2 Feb 2025 | Prohibited practices and AI literacy — **in force** **[V]** |
|
|
80
80
|
| 2 Aug 2025 | GPAI models, governance, penalties — **in force** **[S]** |
|
|
81
81
|
| **2 Aug 2026** | **Article 50 transparency obligations — in force now** (general application date) **[V]** |
|
|
82
|
-
| 2 Dec 2026 | Art 50(2) marking for generative systems placed on the market before 2 Aug 2026; new Art 5(1)(ba)/(bb) prohibitions incl. non-consensual sexual deepfakes of identifiable people **[V]**.
|
|
82
|
+
| 2 Dec 2026 | Art 50(2) marking for generative systems placed on the market before 2 Aug 2026; new Art 5(1)(ba)/(bb) prohibitions incl. non-consensual sexual deepfakes of identifiable people **[V]**. No further amendment found at the 22 Nov 2026 re-check: imminent |
|
|
83
83
|
| 2 Feb 2027 | Watermark-detection interoperability deadline for providers **[U]** |
|
|
84
84
|
| **2 Dec 2027** | High-risk obligations for standalone Annex III systems — **deferred** **[V]** |
|
|
85
85
|
| 2 Aug 2028 | High-risk obligations for embedded Annex I systems **[V]** |
|
|
@@ -111,7 +111,7 @@ Eight categories are prohibited **[V]**. The ones a small developer realisticall
|
|
|
111
111
|
- **Art 50(2) synthetic-output marking** — providers of generative systems must embed machine-readable provenance in generated audio, image, video and text: C2PA/Content Credentials manifests, watermarking where feasible **[V]**. New systems now; pre-2 Aug 2026 systems from 2 Dec 2026 — **record your placing-on-the-market date**.
|
|
112
112
|
- **Art 50(4) deepfake and public-interest text labelling** — deployers must apply a user-visible label at first exposure; guidance takes a broad territorial view for globally accessible content **[V]**.
|
|
113
113
|
- **Art 50(3)** — emotion recognition or biometric categorisation requires informing exposed persons, and is special-category processing under GDPR **[V]**.
|
|
114
|
-
- **Code of Practice safe harbour** — adherence to the transparency Code of Practice is the cheapest defensible posture for a small provider, though not conclusive evidence of compliance **[V]**.
|
|
114
|
+
- **Code of Practice safe harbour** — adherence to the transparency Code of Practice is the cheapest defensible posture for a small provider, though not conclusive evidence of compliance **[V]**. The final transparency Code of Practice was published 10 Jun 2026 and Commission guidelines on Art 50 (C(2026) 5054) adopted 20 Jul 2026 **[V]** (existence checked, content not reviewed): read both before advising on labelling detail.
|
|
115
115
|
|
|
116
116
|
**High-risk (Annex III)** is unlikely unless the feature does CV screening or hiring, credit scoring, education assessment, biometric identification, essential-service eligibility, or law-enforcement/migration work **[V]**. If it does, treat it as a major project and route to counsel.
|
|
117
117
|
|
|
@@ -138,8 +138,8 @@ Penalties for Art 50 breaches reach €15M or 3% of global turnover; prohibited
|
|
|
138
138
|
|
|
139
139
|
## 5. UK specifics
|
|
140
140
|
|
|
141
|
-
- **Data (Use and Access) Act 2025** — Royal Assent 19 June 2025; commenced in stages. The principal data-protection provisions came into force on **5 February 2026** under SI 2026/82 (legislation.gov.uk): ss. 70, 76, 80, 112 and Schedules 4, 6, 11, 12 **[V]**. Code-relevant changes: the new DSAR clock (Art 12A UK GDPR), recognised legitimate interests (no balancing test), Arts 22A–22D replacing the automated-decision prohibition with permission plus safeguards (information, representations, human intervention, contest) for non-special-category data, and the PECR analytics/functionality cookie exemption. The complaints-handling duty (new s. 164A DPA 2018) followed on **19 June 2026** **[V]**.
|
|
142
|
-
- **Online Safety Act** — triggered by **user-to-user** services (anywhere users can encounter content uploaded by others — comments, DMs, forums, shared galleries, multiplayer chat), search services, and pornography publishers, with UK links. **There is no small-service exemption from the core duties**, and the regulator runs a dedicated "small but risky" supervision function **[V]**. Duties include illegal-content and children's-access risk assessments, proportionate safety measures, reporting and complaints mechanisms, and highly effective age assurance where required. Ofcom has been fining since late 2025 — mostly for missing highly effective age assurance on pornographic services, and in one case for a missing illegal-content risk assessment and deficient terms — with penalties up to £18M or 10% of qualifying worldwide revenue **[S]**. Age-assurance fines continued through 2026 (e.g. £1.35M on 23 Feb, £700k on 4 Sep) **[V]**. The register of categorised services (Category 1, 2A, 2B; extra duties) was published on 10 July 2026 **[V]**; small services are not categorised, but the core duties still apply. Treat any UK-reachable UGC product as in scope and produce the risk assessments — their absence is itself the enforceable failure.
|
|
141
|
+
- **Data (Use and Access) Act 2025** — Royal Assent 19 June 2025; commenced in stages. The principal data-protection provisions came into force on **5 February 2026** under SI 2026/82 (legislation.gov.uk): ss. 70, 76, 80, 112 and Schedules 4, 6, 11, 12 **[V]**. Code-relevant changes: the new DSAR clock (Art 12A UK GDPR), recognised legitimate interests (no balancing test), Arts 22A–22D replacing the automated-decision prohibition with permission plus safeguards (information, representations, human intervention, contest) for non-special-category data, and the PECR analytics/functionality cookie exemption. The complaints-handling duty (new s. 164A DPA 2018) followed on **19 June 2026** **[V]**. The ICO's functions passed to the **Information Commission** on 30 Sep 2026 (Commencement No. 9) **[V]**: name the Information Commission in new UK notices and policies; the change is otherwise institutional.
|
|
142
|
+
- **Online Safety Act** — triggered by **user-to-user** services (anywhere users can encounter content uploaded by others — comments, DMs, forums, shared galleries, multiplayer chat), search services, and pornography publishers, with UK links. **There is no small-service exemption from the core duties**, and the regulator runs a dedicated "small but risky" supervision function **[V]**. Duties include illegal-content and children's-access risk assessments, proportionate safety measures, reporting and complaints mechanisms, and highly effective age assurance where required. Ofcom has been fining since late 2025 — mostly for missing highly effective age assurance on pornographic services, and in one case for a missing illegal-content risk assessment and deficient terms — with penalties up to £18M or 10% of qualifying worldwide revenue **[S]**. Age-assurance fines continued through 2026 (e.g. £1.35M on 23 Feb, £700k on 4 Sep) **[V]**. An Additional Safety Measures statement (reported mid-Nov 2026) expands hash-matching for child sexual abuse material **[S]**; whether the amended illegal-content codes are already in force is **[U]**. The register of categorised services (Category 1, 2A, 2B; extra duties) was published on 10 July 2026 **[V]**; small services are not categorised, but the core duties still apply. Treat any UK-reachable UGC product as in scope and produce the risk assessments — their absence is itself the enforceable failure.
|
|
143
143
|
- **Children's Code** — applies to services *likely to be accessed* by under-18s, a much lower bar than "aimed at children": high-privacy defaults, geolocation off by default, no nudges toward weaker privacy, a DPIA covering children, minimised profiling **[V]**.
|
|
144
144
|
- **Accessibility** — no private-sector EAA equivalent; exposure runs through the Equality Act duty to make reasonable adjustments, with WCAG 2.1 AA as the de facto benchmark **[S]**.
|
|
145
145
|
|
|
@@ -152,10 +152,11 @@ Penalties for Art 50 breaches reach €15M or 3% of global turnover; prohibited
|
|
|
152
152
|
- **A claim circulating that a mandatory "withdrawal button" applies to all EU online traders from 19 June 2026 is a misreading of a financial-services directive** **[V]**. Do not implement it as a general obligation; do not repeat the claim.
|
|
153
153
|
- **Pre-contract information** — before the order: main characteristics, total price inclusive of taxes and all charges, duration and minimum term, auto-renewal terms, trader identity with geographic address and email, complaint handling, and digital-content functionality and interoperability. The order button must be labelled to make the payment obligation explicit **[V]**.
|
|
154
154
|
- **Pricing and dark patterns** — price-reduction claims must reference the lowest price in the previous 30 days; paid ranking placement must be disclosed; review verification must be described honestly; personalised pricing must be disclosed **[V]**.
|
|
155
|
+
- **Digital Fairness Act** — a Commission **proposal** of 11 Nov 2026, **not law** **[V]**, aimed at dark patterns, addictive design, free trials that roll into paid subscriptions, auto-renewals, cancellation obstacles and access to a human. Never cite it as a current duty; it shows where enforcement of existing law is heading, so build one-click cancellation and a clear notice before a trial converts.
|
|
155
156
|
- **Unfair terms** — in B2C, non-negotiated terms creating significant imbalance are void: blanket liability exclusions, unilateral changes without notice and an exit right, forum clauses depriving consumers of their home courts, and mandatory arbitration **[V]**. **Do not copy a US ToS into an EU-facing product** — the arbitration and class-waiver clauses that protect you in the US are unenforceable and can themselves be an unfair-terms violation.
|
|
156
157
|
|
|
157
158
|
---
|
|
158
159
|
|
|
159
160
|
## 7. Verify before relying
|
|
160
161
|
|
|
161
|
-
AI Act fine tiers post-Omnibus · EN 301 549 version status · the GDPR/ePrivacy half of the Digital Omnibus (**not law**:
|
|
162
|
+
AI Act fine tiers post-Omnibus · EN 301 549 version status · the GDPR/ePrivacy half of the Digital Omnibus (**not law**: Council mandate 21 Oct 2026; no Parliament position or trilogue at 22 Nov 2026) · Digital Fairness Act (proposal, 11 Nov 2026) · Ofcom's categorised-services duties consultation outcome · consent-or-pay scope broadening · CRA SaaS boundary · NIS2 small-provider designation practice · UK adequacy status.
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
- Using this with web access
|
|
9
9
|
- Re-verification log — 3 October 2026
|
|
10
10
|
- Re-verification log — 22 October 2026
|
|
11
|
+
- Re-verification log — 22 November 2026
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
## Snapshot
|
|
@@ -31,7 +32,7 @@ Re-verify these before relying on them, in rough order of volatility:
|
|
|
31
32
|
1. **US state AI laws** — effective dates have moved repeatedly, some are enjoined, some were repealed and replaced mid-cycle, and federal preemption efforts are active.
|
|
32
33
|
2. **State privacy law scope** — new states take effect on 1 January and 1 July cycles; thresholds and cure periods change.
|
|
33
34
|
3. **EU AI Act dates** — amended in July 2026; any guidance written before mid-2026 is unreliable on the high-risk timeline.
|
|
34
|
-
4. **EU data/ePrivacy reform** — the data-protection half of the Digital Omnibus is **not law**; at 22
|
|
35
|
+
4. **EU data/ePrivacy reform** — the data-protection half of the Digital Omnibus is **not law**; Coreper agreed a Council mandate on 21 Oct 2026, but at 22 Nov 2026 Parliament had no position and no trilogue had begun. The EU Digital Fairness Act (11 Nov 2026) is likewise only a proposal. Do not build to proposed cookie or browser-signal provisions.
|
|
35
36
|
5. **EU–US transfer framework** — valid at snapshot, with an appeal pending.
|
|
36
37
|
6. **Wiretap/pixel litigation** — statutory reform and appellate decisions are actively reshaping which theories survive.
|
|
37
38
|
7. **Age-verification and minors' laws** — rapid state adoption plus constitutional litigation.
|
|
@@ -41,7 +42,7 @@ Re-verify these before relying on them, in rough order of volatility:
|
|
|
41
42
|
|
|
42
43
|
## Known gaps at snapshot
|
|
43
44
|
|
|
44
|
-
- Jurisdictions outside the EU/UK/US are covered only where they surfaced incidentally (Australia, Canada, Brazil, India). **Do not extrapolate** — if the user targets another market, say the references do not cover it and research it before advising.
|
|
45
|
+
- Jurisdictions outside the EU/UK/US are covered only where they surfaced incidentally (Australia, Canada, Brazil, India). **Do not extrapolate** — if the user targets another market, say the references do not cover it and research it before advising. Moving at 22 Nov 2026 **[S]**: India's DPDP Rules (main obligations 13 May 2027) and Australia's Privacy Act tranche 2 (exposure draft 31 Aug 2026, no start date).
|
|
45
46
|
- Sector regimes are covered at gate-detection depth, not implementation depth. The purpose is to recognise the gate and route to counsel, not to compliance-engineer a regulated business.
|
|
46
47
|
- Fine tiers, transitional dates, and standard versions were flagged individually where they could not be re-verified.
|
|
47
48
|
|
|
@@ -110,3 +111,25 @@ Web search plus the primary pages named below. **[V]** only where a primary sour
|
|
|
110
111
|
| ADA Title II | Dates unchanged (26 Apr 2027 / 26 Apr 2028); NFB challenge reported, no ruling | [S] (ada.gov not opened) | titleii.org, consumerfinancialserviceslawmonitor.com | `us.md` |
|
|
111
112
|
|
|
112
113
|
**Not re-checked on 22 Oct 2026:** everything in `sector-gates.md`, `artifacts.md`, `trigger-map.md`, `exposure-triage.md`; PCI DSS; COPPA; BIPA; MHMDA; Utah, Louisiana and Alabama app-store laws; CA SB 243 / SB 942 / AB 2013; Delete Act cadence beyond AB 883; DSA; NIS2; EAA; UK DUAA; consent-or-pay.
|
|
114
|
+
|
|
115
|
+
## Re-verification log — 22 November 2026
|
|
116
|
+
|
|
117
|
+
Web search plus primary pages where they loaded; same marker rule as above. Several primary pages blocked fetching this pass (consilium.europa.eu, federalregister.gov, ofcom.org.uk, legislature.vermont.gov), so their rows are **[S]**.
|
|
118
|
+
|
|
119
|
+
| Item | Result | Marker | Source | File |
|
|
120
|
+
|---|---|---|---|---|
|
|
121
|
+
| Digital Omnibus (data) | Council mandate agreed by Coreper 21 Oct 2026 (doc 14756/26): cookies stay in ePrivacy 5(3), wider consent exemptions for audience and contextual-ad measurement, 4-month re-ask; no Parliament position, no trilogue; not law | [S] | consilium.europa.eu press release (title only), iapp.org, cuatrecasas.com | `eu-uk.md` |
|
|
122
|
+
| Digital Fairness Act | Commission proposal 11 Nov 2026 (dark patterns, addictive design, trials into subscriptions, auto-renewal, cancellation, human contact); not law | [V] | commission.europa.eu "Review of EU consumer law" page | `eu-uk.md` |
|
|
123
|
+
| AI Act Art 50 guidance | Final transparency Code of Practice 10 Jun 2026; Commission guidelines C(2026) 5054 adopted 20 Jul 2026; content not reviewed | [V] existence | digital-strategy.ec.europa.eu | `eu-uk.md` |
|
|
124
|
+
| AI Act 2 Dec 2026 dates | No further amendment found | [V] (3 Oct OJ check) | — | `eu-uk.md` |
|
|
125
|
+
| UK Information Commission | ICO functions passed to the Information Commission 30 Sep 2026 (Commencement No. 9) | [V] | gov.uk DUAA commencement plans (updated 12 Oct 2026) | `eu-uk.md` |
|
|
126
|
+
| Ofcom Additional Safety Measures | Statement reported mid-Nov 2026; in-force date of the amended codes conflicting | [S] / [U] | ofcom.org.uk (snippets only) | `eu-uk.md` |
|
|
127
|
+
| FCC 26-67 | Published 26 Oct 2026 (FR Doc 2026-21821), effective 25 Nov 2026; companion proposal 2026-21820 | [S] | federalregister.gov (search hit), womblebonddickinson.com | `us.md` |
|
|
128
|
+
| Vermont privacy (Act 145) | Effective 1 Jan 2028 per statute page tags and most trackers | [S] | legislature.vermont.gov (snippet), venable.com, benesch.com | `us.md` |
|
|
129
|
+
| Colorado HB 26-1263 | Chatbot-operator duties incl. age estimation and minor protections from 1 Jan 2027 | [V] | leg.colorado.gov/bills/hb26-1263 | `us.md` |
|
|
130
|
+
| Texas SB 2420; Utah, Louisiana, CA AB 1043; Colorado SB 26-189 rules; CPPA ADMT; FTC negative option; ADA Title II; federal AI preemption; DPF appeal | No change found in the window | prior markers kept | — | `us.md`, `eu-uk.md` |
|
|
131
|
+
| Outside scope | India DPDP main obligations 13 May 2027; Australia Privacy Act tranche 2 exposure draft 31 Aug 2026, no start date | [S] | tribuneindia.com, hsfkramer.com | provenance |
|
|
132
|
+
|
|
133
|
+
Upcoming dates to re-check: 25 Nov 2026 (TCPA), 2 Dec 2026 (AI Act), 31 Dec 2026 (Utah app-store private right of action), 1 Jan 2027 (Colorado, California, Oklahoma, Louisiana, CPPA ADMT).
|
|
134
|
+
|
|
135
|
+
**Not re-checked on 22 Nov 2026:** CRA guidance after 11 Sep; COPPA; CA SB 243, SB 690 and AB 1043 text; BIPA; NY laws; everything in `sector-gates.md`, `lawsuit-vectors.md`, `artifacts.md`, `trigger-map.md`, `exposure-triage.md`.
|
|
@@ -49,7 +49,7 @@ Disclose signal handling in the privacy notice.
|
|
|
49
49
|
```
|
|
50
50
|
Honouring GPC for **every** visitor is the safe default: it satisfies the strictest state and violates none **[V]**.
|
|
51
51
|
|
|
52
|
-
**Taking effect in 2027** — Oklahoma and Louisiana on 1 Jan 2027, Alabama on 1 May 2027 **[S]**; Vermont
|
|
52
|
+
**Taking effect in 2027** — Oklahoma and Louisiana on 1 Jan 2027, Alabama on 1 May 2027 **[S]**; Vermont (Act 145) on 1 Jan 2028, per the statute pages and most trackers **[S]**. Delaware's threshold drops to 10,000 consumers (5,000 with data-sale revenue) from 1 Jan 2027 **[S]**. Which states add a GPC duty in 2027 is disputed (trackers disagree even on Alabama) **[U]**; honouring GPC for everyone stays the safe default.
|
|
53
53
|
|
|
54
54
|
**Why an ordinary ad pixel triggers everything.** "Sale" requires no money — any disclosure for other valuable consideration counts — and "sharing" expressly covers cross-context behavioural advertising **[V]**. Meta Pixel, GA4 with ad features, TikTok, Reddit and LinkedIn tags are a sale/share/targeted ad in nearly every state. Build: a tag inventory, consent-gated loading, and an opt-out that actually severs the pixel rather than filing a form.
|
|
55
55
|
|
|
@@ -149,7 +149,7 @@ Build: consume the store/OS age-signal API, branch features on age category, sto
|
|
|
149
149
|
- **Illinois HB 3773** — from 1 Jan 2026, using AI with a discriminatory *effect* in employment violates the state human-rights act; intent is no defence **[V]**.
|
|
150
150
|
- **NYC Local Law 144** — annual independent bias audit plus published summary and candidate notice for automated employment decision tools used for NYC roles **[V]**.
|
|
151
151
|
- **Mental-health AI** — Illinois bans AI delivering mental-health treatment or clinical decisions outright; Nevada, Utah and Tennessee restrict or require disclosure; treat "AI therapist" as a **hard gate** **[V]**.
|
|
152
|
-
- **Companion chatbots** — California (PRA), New York (AG-only), Oregon (PRA, from 2027), Washington (from 2027) **[V]**. **Baseline build for any consumer LLM chat:** persistent non-human disclosure, self-harm detection with a crisis interstitial, minor-mode content restrictions and break reminders, retained incident logs.
|
|
152
|
+
- **Companion chatbots** — California (PRA), New York (AG-only), Oregon (PRA, from 2027), Washington (from 2027), Colorado (HB 26-1263, from 1 Jan 2027: age estimation plus disclosures and restrictions for minors) **[V]**. **Baseline build for any consumer LLM chat:** persistent non-human disclosure, self-harm detection with a crisis interstitial, minor-mode content restrictions and break reminders, retained incident logs.
|
|
153
153
|
- **Frontier-model laws** target training compute far beyond any small developer **[V]**.
|
|
154
154
|
- **Federal posture** — a December 2025 executive order seeks to weaken state AI regulation via litigation and funding conditions, with a DOJ task force operating from January 2026 **[V]**. Do **not** advise a user to ignore state AI law on this basis; the laws remain in force unless and until enjoined.
|
|
155
155
|
|
|
@@ -160,7 +160,7 @@ Build: consume the store/OS age-signal API, branch features on age category, sto
|
|
|
160
160
|
- **FTC Act §5** — any statement in your privacy policy, marketing page, app-store listing or in-app copy that is not literally true of your code is deception. Dark patterns in consent and cancellation flows are deception/unfairness; failure to maintain reasonable security is unfairness **[V]**. No federal PRA, but most state UDAP analogues have one.
|
|
161
161
|
- **Consumer Reviews and Testimonials Rule** — prohibits fake, incentivised-by-sentiment, and undisclosed insider reviews, with civil penalties in the tens of thousands per violation; enforcement is active **[V]**.
|
|
162
162
|
- **Negative option / click-to-cancel** — the 2024 rule was vacated by the Eighth Circuit on 8 July 2025; the FTC published a new advance notice of proposed rulemaking in March 2026, so no new federal rule is in force **[S]**. The FTC keeps pleading the same three duties (disclose terms, express informed consent, easy cancel) under §5 and ROSCA. Do not tell a user they are safe: ROSCA and roughly 30 state auto-renewal laws still govern, and California's amended law broadened liability **[V]**.
|
|
163
|
-
- **TCPA** — see `lawsuit-vectors.md` §4. Consent records, revocation handling on any channel, quiet hours in the recipient's timezone, DNC scrubbing, carrier campaign registration **[V]**. Revocation: opt-outs must be honoured within 10 business days **[S]**. FCC 26-67 (adopted 30 Sep 2026, released 1 Oct) replaces the 2024 "revoke-all" rule and its 31 Jan 2027 date: an opt-out from an informational message may be limited to that category, a marketing opt-out still stops all marketing, callers may designate an exclusive opt-out method, and the 10-business-day window stays **[V]**. It
|
|
163
|
+
- **TCPA** — see `lawsuit-vectors.md` §4. Consent records, revocation handling on any channel, quiet hours in the recipient's timezone, DNC scrubbing, carrier campaign registration **[V]**. Revocation: opt-outs must be honoured within 10 business days **[S]**. FCC 26-67 (adopted 30 Sep 2026, released 1 Oct) replaces the 2024 "revoke-all" rule and its 31 Jan 2027 date: an opt-out from an informational message may be limited to that category, a marketing opt-out still stops all marketing, callers may designate an exclusive opt-out method, and the 10-business-day window stays **[V]**. It was published in the Federal Register on 26 Oct 2026 (FR Doc 2026-21821) and takes effect **25 Nov 2026** **[S]**; a companion proposal (FR Doc 2026-21820) asks about a shorter revocation window and a revoke-all method **[S]**. Build to the strict reading: any STOP-type reply stops all marketing on every channel.
|
|
164
164
|
- **CAN-SPAM** — accurate headers and subject, advertising identification, **valid physical postal address**, working opt-out honoured within **10 business days** and functional for 30 days after send; you are liable for your sending platform and affiliates **[V]**.
|
|
165
165
|
- **State breach notification** — all states; deadlines and AG-notice thresholds vary; several sector rules add shorter clocks **[V]**.
|
|
166
166
|
- **ADA accessibility** — **Title II** (state and local government, including their contractors' web and app content): a DOJ interim final rule of 20 Apr 2026 moved the WCAG 2.1 AA compliance dates to **26 Apr 2027** (population ≥50,000) and **26 Apr 2028** (smaller entities and special districts); the technical standard is unchanged and DOJ signalled further review **[S]** (law-firm and SBA Office of Advocacy reports; the Federal Register text was not retrieved). **Title III** (private businesses) has no technical rule and no deadline — exposure is private litigation, which rose in 2025: 3,117 federal website suits, up 27% on 2024, over 5,000 counting state courts, with e-commerce the main target **[S]**. WCAG 2.1 AA is the practical benchmark; build to 2.2 AA.
|
|
@@ -191,4 +191,4 @@ Build: consume the store/OS age-signal API, branch features on age category, sto
|
|
|
191
191
|
|
|
192
192
|
## 8. Verify before relying
|
|
193
193
|
|
|
194
|
-
Colorado AG rules under SB 26-189 · Vermont and Nebraska children's-code dates · FCC
|
|
194
|
+
Colorado AG rules under SB 26-189 · Vermont and Nebraska children's-code dates · FCC companion proposal on the TCPA revocation window (FR Doc 2026-21820) · Utah, Louisiana and Alabama app-store law dates and litigation · DOJ's further Title II review · state privacy laws taking effect in 2027 · VPPA scope · state mini-TCPA and mini-wiretap lists · genetic-privacy specifics per state · SaaS sales-tax nexus.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: durable
|
|
3
3
|
description: "Use to keep stored data from being lost: before running or writing anything that could delete, overwrite or reshape it, and when asked whether data is backed up and recoverable. Do NOT use for read-only queries or query speed."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "2026.11.22"
|
|
4
6
|
license: Data-durability engineering guidance, not a DBA certification. Sources and snapshot date are recorded at the foot of each reference file.
|
|
5
|
-
compatibility: Snapshot dated 3 October 2026; Prisma 7/8 status and agent safeguards, PostgreSQL 19 status and the Neon, RDS and D1 retention rows re-verified 22 October 2026. Re-verify version behaviours and provider defaults before asserting them as current.
|
|
7
|
+
compatibility: Snapshot dated 3 October 2026; Prisma 7/8 status and agent safeguards, PostgreSQL 19 status and the Neon, RDS and D1 retention rows re-verified 22 October 2026; PostgreSQL 19 GA and 14 EOL, Prisma 8 status and drop prompts, and the Supabase, D1, PlanetScale and PgBouncer rows re-verified 22 November 2026. Re-verify version behaviours and provider defaults before asserting them as current.
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# Durable
|
|
@@ -25,7 +27,7 @@ Coding agents have wiped production data during a natural-language code freeze (
|
|
|
25
27
|
2. **On `may-hold-real-data`, read-only by default.** Inspect with `SELECT`/`EXPLAIN`/`\d`, a read-only role, or `BEGIN READ ONLY`. No DDL, no writes, no `migrate dev|reset`, `db push`, `--force`, `--accept-data-loss`, `flush`, `dropDatabase`, `TRUNCATE`, seed scripts.
|
|
26
28
|
3. **Destructive or schema-changing commands on real data require all of:** (a) a backup or PITR point you verified exists *for this database* (`RUNTIME` or provider-console evidence, not assumption), (b) a dry-run count of affected rows shown to the user, (c) the exact command shown, and (d) the user's explicit go-ahead in this conversation for that command. "Go ahead and fix it" does not cover a `DROP`.
|
|
27
29
|
4. **Experiment on a branch, not the original.** Use a provider branch, restored clone or local copy; prove the change there, then hand back the production step with evidence.
|
|
28
|
-
5. **Never bypass a tool's safety interlock yourself.** If a CLI refuses because it detected an agent (e.g. Prisma 7's AI-consent check), a platform holds your request for the user's approval (e.g. Prisma Console agent approvals), or a prompt asks for confirmation: stop and ask. Never set a consent variable, approve your own request, or pass `--force`/`--yes` on your own initiative.
|
|
30
|
+
5. **Never bypass a tool's safety interlock yourself.** If a CLI refuses because it detected an agent (e.g. Prisma 7's AI-consent check, Prisma 8's drop prompts), a platform holds your request for the user's approval (e.g. Prisma Console agent approvals), or a prompt asks for confirmation: stop and ask. Never set a consent variable, approve your own request, or pass `--force`/`--yes`/`--delete`/`--allow` on your own initiative.
|
|
29
31
|
6. **Surprising results mean stop, not fix.** Empty tables, missing rows, failed restores: report what you observed and ask. Never "repair" by recreating, reseeding, or fabricating data, and never declare data unrecoverable without checking the provider's backups/PITR.
|
|
30
32
|
7. **Report exactly what you ran** — every command that touched a database, its target, and its result, including mistakes, immediately.
|
|
31
33
|
|
|
@@ -10,6 +10,11 @@ Load before the agent runs any command against a database that is not provably t
|
|
|
10
10
|
- Agents misread anomalies (empty results) as problems to fix. Anomaly → stop and report.
|
|
11
11
|
- Agents misreport recoverability. Check backups/PITR before saying anything about loss.
|
|
12
12
|
|
|
13
|
+
`SNAPSHOT` (single secondary write-up) — April 2026, PocketOS: a coding agent found a broadly scoped Railway token in an unrelated file and deleted a production volume; the volume-level backups stored with it went too (Railway later recovered the data). Lessons:
|
|
14
|
+
|
|
15
|
+
- An agent will use any credential it can read. Scope tokens to one project and environment, and keep them out of the repo.
|
|
16
|
+
- Backups stored with the volume or in the same account are not off-instance.
|
|
17
|
+
|
|
13
18
|
## Classify the target (before every command)
|
|
14
19
|
|
|
15
20
|
Treat as **`may-hold-real-data`** if any is true; unknown also counts:
|
|
@@ -32,6 +37,7 @@ Never print full connection strings; show host and database name only.
|
|
|
32
37
|
| MySQL | User with `SELECT` grant only; `START TRANSACTION READ ONLY` |
|
|
33
38
|
| SQLite | Open with `?mode=ro` or `sqlite3 -readonly`; or inspect a copy |
|
|
34
39
|
| MongoDB | User with the `read` role |
|
|
40
|
+
| Database MCP servers | Use the server's read-only and project-scoping options (Supabase MCP: `read_only=true`, `project_ref=…`); a full-access database MCP is a production write credential |
|
|
35
41
|
|
|
36
42
|
Recommend the user create the read-only role; do not create roles on production yourself without the gate.
|
|
37
43
|
|
|
@@ -50,6 +56,7 @@ Run the migration on the branch, record the result and timing, then present the
|
|
|
50
56
|
## Tool interlocks — respect, never bypass
|
|
51
57
|
|
|
52
58
|
- **Prisma** (`SNAPSHOT` 22 Oct 2026): the Prisma 7 CLI refuses dangerous actions such as `migrate reset` when it detects an AI agent, until `PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION` holds the user's exact consent message. Stop and ask; only the user's literal words may be passed. Separately, Prisma Console now enrolls a coding agent with its own credential: by default it works freely on preview branches, and writes to production, deletes and connection-string creation wait for the user's approval in the Console. Never approve your own request or use the user's login to get around it.
|
|
59
|
+
- **Prisma 8** (`SNAPSHOT` 22 Nov 2026, changelog 9 Oct 2026): `prisma migration plan` and `prisma db update` ask about each dropped model or field. Flags answer in advance (`--delete X` lets the data go, `--rename A:B` keeps the rows); an unanswered question fails in CI with `CLI.CONSENT_REQUIRED`, and loosening row-level security needs `--allow <Model>`. Never add `--delete` or `--allow` yourself: show the user what would be dropped and let them choose.
|
|
53
60
|
- Prompts like "data loss will occur, continue?" (`db push`, `drizzle-kit push`) are a stop sign. Never pipe `yes`, never add `--force`/`--accept-data-loss` yourself.
|
|
54
61
|
- Prefer commands that print the plan without applying: `prisma migrate diff`, `drizzle-kit generate` (then read SQL), Rails `db:migrate:status`, Django `sqlmigrate` / `migrate --plan`.
|
|
55
62
|
|
|
@@ -66,4 +73,4 @@ Before any `DELETE`/`UPDATE` you are asked to run: execute the same `WHERE` as `
|
|
|
66
73
|
|
|
67
74
|
---
|
|
68
75
|
|
|
69
|
-
**Provenance:** snapshot 3 October 2026. Sources (accessed 3 Oct 2026): The Register via Slashdot, 21 Jul 2025 — https://developers.slashdot.org/story/25/07/21/1338204/ ; heise, 25 Jul 2025 — https://www.heise.de/en/news/Artificial-intelligence-Vibe-coding-service-Replit-deletes-production-database-10499597.html ; incident summary — https://openleash.com/blog/ai-agents-deleted-production-databases-replit-pocketos ; Prisma 7 CLI reference (AI-agent consent, re-verified 22 Oct 2026) — https://www.prisma.io/docs/orm/v7/reference/prisma-cli-reference ; Prisma agent enrollment (22 Oct 2026) — https://www.prisma.io/changelog/2026-10-02 . Branching surfaces from provider docs; verify flags before asserting.
|
|
76
|
+
**Provenance:** snapshot 3 October 2026. Sources (accessed 3 Oct 2026): The Register via Slashdot, 21 Jul 2025 — https://developers.slashdot.org/story/25/07/21/1338204/ ; heise, 25 Jul 2025 — https://www.heise.de/en/news/Artificial-intelligence-Vibe-coding-service-Replit-deletes-production-database-10499597.html ; incident summary — https://openleash.com/blog/ai-agents-deleted-production-databases-replit-pocketos ; Prisma 7 CLI reference (AI-agent consent, re-verified 22 Oct 2026) — https://www.prisma.io/docs/orm/v7/reference/prisma-cli-reference ; Prisma agent enrollment (22 Oct 2026) — https://www.prisma.io/changelog/2026-10-02 . Re-verified 22 Nov 2026: Prisma 8 drop consent — https://www.prisma.io/changelog/2026-10-09 ; Supabase MCP read-only mode — https://supabase.com/docs/guides/ai-tools/mcp . Branching surfaces from provider docs; verify flags before asserting.
|
|
@@ -22,16 +22,16 @@ Pick both consciously; they dictate the tier. An app where users type for hours
|
|
|
22
22
|
|
|
23
23
|
**3-2-1 floor**: at least 3 copies, 2 different media/systems, 1 off-site (different provider or account is fine). A dump cron writing to the same VPS is one disk failure from zero.
|
|
24
24
|
|
|
25
|
-
### Managed-provider baselines (`SNAPSHOT` — Neon,
|
|
25
|
+
### Managed-provider baselines (`SNAPSHOT` — Supabase, Neon, PlanetScale Postgres, Cloudflare D1 and Turso re-checked on official docs 22 Nov 2026, AWS RDS 22 Oct 2026; Firestore and Atlas unchecked since 3 Oct 2026; verify the project's actual settings before quoting)
|
|
26
26
|
|
|
27
27
|
| Provider | What the docs say |
|
|
28
28
|
|---|---|
|
|
29
|
-
| Supabase
|
|
30
|
-
| Neon |
|
|
31
|
-
| PlanetScale Postgres
|
|
29
|
+
| Supabase | Daily backups: Pro 7 days, Team 14, Enterprise up to 30. PITR is a paid **add-on** (Pro+, any compute size; worst-case recovery point 2 minutes), and turning it on stops the daily backups. **Deleting a project permanently deletes its backups.** Backups exclude Storage objects — restoring does not bring back deleted files. Custom-role passwords not in daily backups |
|
|
30
|
+
| Neon | History window (formerly "restore window": WAL history, set under Settings → Postgres or `history_retention_seconds`) powers instant restore, time travel, and branching from the past: Free capped at 6 hours (1 GB); Launch default 1 day, max 7; Scale default 1 day, max 30 |
|
|
31
|
+
| PlanetScale Postgres | Default backup every 12 hours plus on-demand; PITR via WAL archiving, with WAL kept as long as the oldest backup; check the branch's schedule |
|
|
32
32
|
| AWS RDS | Retention 0–35 days; default 1 day via API/CLI, 7 days via console. 0 disables automated backups and PITR |
|
|
33
|
-
| Cloudflare D1 | Time Travel always on: restore to any minute in the last 30 days |
|
|
34
|
-
| Turso
|
|
33
|
+
| Cloudflare D1 | Time Travel always on: restore to any minute in the last 30 days on Workers Paid, **7 days on Workers Free** |
|
|
34
|
+
| Turso | PITR: Free 24 hours; Developer 10, Scaler 30, Pro 90 days; deleted DBs restorable up to 5 days on paid plans |
|
|
35
35
|
| Firestore (3 Oct 2026) | Without PITR, version retention is 1 hour; enabling PITR gives 7 days. Scheduled exports for longer history |
|
|
36
36
|
| MongoDB Atlas | Cloud backups / continuous backup by cluster tier — not verified this snapshot; check the cluster's backup policy |
|
|
37
37
|
|
|
@@ -70,7 +70,7 @@ Check-then-act without a constraint (`if not exists: insert`) is a bug that just
|
|
|
70
70
|
|
|
71
71
|
### Connection & session pitfalls (correctness, not speed)
|
|
72
72
|
|
|
73
|
-
- **Transaction-mode poolers** (PgBouncer, Supabase port 6543 — Supavisor on the shared pooler, PgBouncer on the dedicated one; port 5432 is direct or session mode — Neon's `-pooler` endpoint which runs PgBouncer, RDS Proxy): each transaction may run on a different connection — session state breaks. Protocol-level named prepared statements work through PgBouncer ≥ 1.21 when `max_prepared_statements` is non-zero (on by default, 200, since PgBouncer 1.24; SQL-level `PREPARE` still breaks). Self-hosted PgBouncer: run ≥ 1.26.
|
|
73
|
+
- **Transaction-mode poolers** (PgBouncer, Supabase port 6543 — Supavisor on the shared pooler, PgBouncer on the dedicated one; port 5432 is direct or session mode — Neon's `-pooler` endpoint which runs PgBouncer, RDS Proxy): each transaction may run on a different connection — session state breaks. Protocol-level named prepared statements work through PgBouncer ≥ 1.21 when `max_prepared_statements` is non-zero (on by default, 200, since PgBouncer 1.24; SQL-level `PREPARE` still breaks). Self-hosted PgBouncer: run ≥ 1.26.1 (14 Oct 2026), which fixes CVE-2026-107350 (a SCRAM user can log in as another user, admins included) and CVE-2026-107348/107349, on top of 1.26.0's pre-auth crash/hang fixes (CVE-2026-19888, CVE-2026-6668, CVE-2026-6669) (`SNAPSHOT`). Run migrations over a **direct/session** connection, not the transaction pooler. Other casualties: session-level `SET`, advisory locks, `LISTEN/NOTIFY`, temp tables, `COPY`. Patterns: keep per-transaction state in SQL (`SET LOCAL`), use `pg_advisory_xact_lock` (transaction-scoped), or route state-needing work to a direct/session connection.
|
|
74
74
|
- **Serverless functions**: one pool per *instance* (module scope), never per request; assume the process freezes between invocations — no in-memory "it'll flush later".
|
|
75
75
|
- **Postgres connections are processes** — exhausting them fails every new client; the fix is a pooler, not a bigger `max_connections`. (Sizing the pool for throughput is lean's lane.)
|
|
76
76
|
- **Always release/close in `finally`** — a leaked connection per request is a slow outage and a durability finding.
|
|
@@ -90,4 +90,4 @@ Check-then-act without a constraint (`if not exists: insert`) is a bug that just
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
-
**Provenance:** snapshot 3 October 2026; Neon restore window, RDS retention and D1 Time Travel re-checked 22 Oct 2026. Accessed 3 Oct 2026: https://supabase.com/docs/guides/platform/backups ; https://neon.com/docs/introduction/restore-window ; https://planetscale.com/docs/postgres/backups ; https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.BackupRetention.html ; https://developers.cloudflare.com/d1/reference/time-travel/ ; https://docs.turso.tech/features/point-in-time-recovery ; https://cloud.google.com/firestore/native/docs/use-pitr ; https://fly.io/blog/litestream-revamped/ ; https://litestream.io/ ; https://www.pgbouncer.org/config.html ; https://www.pgbouncer.org/changelog.html ; https://neon.com/docs/connect/connection-pooling ; https://supabase.com/docs/guides/database/connecting-to-postgres ; https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html . Earlier sources: Postgres WAL/PITR documentation and pgBackRest/Barman/WAL-G docs, Litestream documentation (SQLite WAL replication), provider documentation for Supabase/Neon/RDS/Crunchy/MongoDB Atlas backup tiers (tier specifics are `SNAPSHOT` — they change often), PgBouncer documentation (transaction-mode feature matrix), SQLite documentation (WAL, busy_timeout, foreign_keys pragma, VACUUM INTO), current disaster-recovery practice guides (3-2-1, RPO/RTO, restore drills). Provider tiers and defaults decay fastest — re-verify before asserting.
|
|
93
|
+
**Provenance:** snapshot 3 October 2026; Supabase PITR and backup behaviour, Neon history window, PlanetScale Postgres, D1 free-tier window, Turso and PgBouncer 1.26.1 re-checked 22 Nov 2026 (https://supabase.com/docs/guides/platform/backups , https://developers.cloudflare.com/d1/reference/time-travel/ , https://www.pgbouncer.org/changelog.html ); Neon restore window, RDS retention and D1 Time Travel re-checked 22 Oct 2026. Accessed 3 Oct 2026: https://supabase.com/docs/guides/platform/backups ; https://neon.com/docs/introduction/restore-window ; https://planetscale.com/docs/postgres/backups ; https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.BackupRetention.html ; https://developers.cloudflare.com/d1/reference/time-travel/ ; https://docs.turso.tech/features/point-in-time-recovery ; https://cloud.google.com/firestore/native/docs/use-pitr ; https://fly.io/blog/litestream-revamped/ ; https://litestream.io/ ; https://www.pgbouncer.org/config.html ; https://www.pgbouncer.org/changelog.html ; https://neon.com/docs/connect/connection-pooling ; https://supabase.com/docs/guides/database/connecting-to-postgres ; https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html . Earlier sources: Postgres WAL/PITR documentation and pgBackRest/Barman/WAL-G docs, Litestream documentation (SQLite WAL replication), provider documentation for Supabase/Neon/RDS/Crunchy/MongoDB Atlas backup tiers (tier specifics are `SNAPSHOT` — they change often), PgBouncer documentation (transaction-mode feature matrix), SQLite documentation (WAL, busy_timeout, foreign_keys pragma, VACUUM INTO), current disaster-recovery practice guides (3-2-1, RPO/RTO, restore drills). Provider tiers and defaults decay fastest — re-verify before asserting.
|
|
@@ -36,11 +36,11 @@ What common DDL actually does to a live table (`SNAPSHOT` — verify per version
|
|
|
36
36
|
| One giant `UPDATE`/`DELETE` | Locks rows, bloats the table, stalls replication | Batch: keyset-select N rows → update → sleep → repeat, resumable from last key |
|
|
37
37
|
| `DROP COLUMN` | Fast (metadata) — but data is gone | Only in the contract phase, after dual-write is verified dead |
|
|
38
38
|
|
|
39
|
-
**Postgres 18 notes** (`SNAPSHOT`, released 25 Sep 2025): `uuidv7()` built in; generated columns are now **virtual by default** (computed on read — say `STORED` if you need it materialised or indexed); `pg_upgrade` keeps planner statistics (not extended statistics), so post-upgrade slow plans are less likely; new clusters get data checksums by default and `pg_upgrade` needs matching checksum settings (`initdb --no-data-checksums` for old non-checksum clusters); asynchronous I/O via `io_method`. **Postgres
|
|
39
|
+
**Postgres 18 notes** (`SNAPSHOT`, released 25 Sep 2025): `uuidv7()` built in; generated columns are now **virtual by default** (computed on read — say `STORED` if you need it materialised or indexed); `pg_upgrade` keeps planner statistics (not extended statistics), so post-upgrade slow plans are less likely; new clusters get data checksums by default and `pg_upgrade` needs matching checksum settings (`initdb --no-data-checksums` for old non-checksum clusters); asynchronous I/O via `io_method`. **Postgres 19 notes** (`SNAPSHOT`, released 19 Nov 2026): JIT off by default; a warning on md5 password logins (move to SCRAM); RADIUS auth removed; `INSERT … ON CONFLICT DO SELECT`. **Postgres 14 reached end of life on 12 November 2026** (13 on 13 Nov 2025) — no more security or data-corruption fixes; flag any project on ≤14 as High.
|
|
40
40
|
|
|
41
41
|
**Tools that automate expand/contract** (`SNAPSHOT`, verify maturity before recommending): pgroll (Xata; serves old and new schema versions via views during a migration), Reshape (same idea, less active), and migration linters — Squawk (Postgres SQL lint), `strong_migrations` (Rails), `django-pg-zero-downtime-migrations` / `django-migration-linter` (Django). For Laravel, no equivalent gem is verified here — review SQL with `php artisan migrate --pretend`.
|
|
42
42
|
|
|
43
|
-
MySQL has no `CONCURRENTLY`: use `ALGORITHM=INSTANT/INPLACE` where the version supports it, `gh-ost` or `pt-online-schema-change` for big tables (`SNAPSHOT` — both maintained; verify current). Postgres big-table rebuilds (PK change, deep bloat, partitioning): `pg_repack`, which rebuilds online with minimal locking and needs ~2x disk temporarily. PostgreSQL 19 (
|
|
43
|
+
MySQL has no `CONCURRENTLY`: use `ALGORITHM=INSTANT/INPLACE` where the version supports it, `gh-ost` or `pt-online-schema-change` for big tables (`SNAPSHOT` — both maintained; verify current). Postgres big-table rebuilds (PK change, deep bloat, partitioning): `pg_repack`, which rebuilds online with minimal locking and needs ~2x disk temporarily. PostgreSQL 19 (released 19 Nov 2026 — `SNAPSHOT` 22 Nov 2026) adds a built-in `REPACK` command; plain `REPACK` takes `ACCESS EXCLUSIVE`, `REPACK (CONCURRENTLY)` avoids it — on 19+ prefer it over installing `pg_repack` for bloat, after checking the running version.
|
|
44
44
|
|
|
45
45
|
## Resumable backfill skeleton
|
|
46
46
|
|
|
@@ -61,8 +61,8 @@ From application code the same shape applies: select batch by `id > last`, write
|
|
|
61
61
|
|
|
62
62
|
- **Versioned, checked-in migrations from the first table** — Alembic (Python), Flyway/Liquibase (JVM), golang-migrate (Go), sqlx/Diesel (Rust), Drizzle Kit / Prisma Migrate (TS). Hand-run SQL files and "schema.sql we run sometimes" are how drift starts.
|
|
63
63
|
- **Review generated SQL before it touches anything real.** ORM migration generators emit what the schema diff implies: renaming a column in the schema file becomes `DROP COLUMN` + `ADD COLUMN` — the data is dropped. Prisma flow: `migrate dev --create-only`, read the SQL, fix it to a safe expand-contract, then apply. Drizzle: `drizzle-kit generate`, read the SQL, then `drizzle-kit migrate`. This review is the single highest-value habit in this file.
|
|
64
|
-
- **Prisma 7** (`SNAPSHOT`, Nov 2025): Rust-free TypeScript client via the `prisma-client` generator with a required `output`, driver adapters required, config in `prisma.config.ts`, and automatic seeding after migrate removed. Migration semantics are unchanged: `migrate dev` (dev only, may prompt to reset), `migrate deploy` (production, applies pending only), `migrate reset` (drops everything — agent-gated, see SKILL.md). Upgrading v6→v7 is a client/config change; it should not create a migration — if a diff appears, read it. Prisma 6
|
|
65
|
-
- **Prisma ORM 8** (`SNAPSHOT` 22
|
|
64
|
+
- **Prisma 7** (`SNAPSHOT`, Nov 2025): Rust-free TypeScript client via the `prisma-client` generator with a required `output`, driver adapters required, config in `prisma.config.ts`, and automatic seeding after migrate removed. Migration semantics are unchanged: `migrate dev` (dev only, may prompt to reset), `migrate deploy` (production, applies pending only), `migrate reset` (drops everything — agent-gated, see SKILL.md). Upgrading v6→v7 is a client/config change; it should not create a migration — if a diff appears, read it. Prisma 6's security-patch window ended 19 Nov 2026, so it is unsupported; MongoDB users must go to v8, because v7 has no MongoDB support.
|
|
65
|
+
- **Prisma ORM 8** (`SNAPSHOT` 22 Nov 2026): still a release candidate (CLI `8.0.0-rc.34` on 16 Nov 2026, no GA date given), but `npm install prisma` / `npx prisma` already resolve to the v8 CLI, which does not read `schema.prisma` and has no `generate`, `migrate dev` or `db push`. A Prisma 7 project must pin `prisma@7` in `package.json`; an unpinned `npx prisma migrate …` is a finding. Prisma 7 stays supported for 18 months after v8 GA. v8's schema commands are `prisma migration plan` and `prisma db update`, which ask about each dropped model or field (`agent-db-safety.md` §Tool interlocks).
|
|
66
66
|
- **`db push` / `drizzle-kit push` / sync-style commands are for throwaway dev databases only** (Drizzle documents push as its rapid-prototyping path). They bypass migration history; on a database with data they can apply destructive diffs without review. If a deploy script or CI contains `db push` against anything shared or persistent, that is a finding.
|
|
67
67
|
- **Never edit an applied migration.** The hash changes, history diverges, teammates' databases desync. Corrections are new migrations.
|
|
68
68
|
- **Forward-only in production.** Down migrations cannot faithfully reverse a migration that touched data (you cannot un-drop a column). "Rollback" is a new forward migration that reverses the change, written and tested like any other. Down migrations are a dev convenience at most.
|
|
@@ -84,4 +84,4 @@ From application code the same shape applies: select batch by `id > last`, write
|
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
-
**Provenance:** snapshot 3 October 2026. Re-verified 22 Oct 2026: Prisma release status https://www.prisma.io/docs/orm/release-status and changelog https://www.prisma.io/changelog/2026-10-02 ; PostgreSQL 19 RC1 https://www.postgresql.org/about/news/postgresql-19-rc-1-released-3409/ and https://www.postgresql.org/docs/19/sql-repack.html . Accessed 3 Oct 2026: PostgreSQL 18 release notes https://www.postgresql.org/docs/18/release-18.html and announcement https://www.postgresql.org/about/news/postgresql-18-released-3142/ ; versioning policy (13 EOL) https://www.postgresql.org/support/versioning/ ; Prisma 7 https://www.prisma.io/blog/announcing-prisma-orm-7-0-0 and https://www.prisma.io/docs/guides/upgrade-prisma-orm/v7 ; Drizzle push https://orm.drizzle.team/docs/drizzle-kit-push . Earlier sources: Postgres documentation (DDL locking behavior, `CONCURRENTLY`, `NOT VALID`/`VALIDATE`, ADD COLUMN default fast-path), current zero-downtime migration practice guides (expand-contract/parallel-change, batched keyset backfill, forward-only production, pre-deploy application), Prisma/Drizzle documentation (create-only review workflow, `db push` scope), MySQL online-schema-change tooling (gh-ost, pt-online-schema-change) public docs. Version-specific lock behavior decays fastest — re-verify against the running version before asserting.
|
|
87
|
+
**Provenance:** snapshot 3 October 2026. Re-verified 22 Nov 2026: PostgreSQL 19 release https://www.postgresql.org/about/news/postgresql-19-released-3449/ ; versioning (14 EOL) https://www.postgresql.org/support/versioning/ ; Prisma release status (8.0.0-rc.34, Prisma 6 window ended) and drop-consent changelog https://www.prisma.io/changelog/2026-10-09 . Re-verified 22 Oct 2026: Prisma release status https://www.prisma.io/docs/orm/release-status and changelog https://www.prisma.io/changelog/2026-10-02 ; PostgreSQL 19 RC1 https://www.postgresql.org/about/news/postgresql-19-rc-1-released-3409/ and https://www.postgresql.org/docs/19/sql-repack.html . Accessed 3 Oct 2026: PostgreSQL 18 release notes https://www.postgresql.org/docs/18/release-18.html and announcement https://www.postgresql.org/about/news/postgresql-18-released-3142/ ; versioning policy (13 EOL) https://www.postgresql.org/support/versioning/ ; Prisma 7 https://www.prisma.io/blog/announcing-prisma-orm-7-0-0 and https://www.prisma.io/docs/guides/upgrade-prisma-orm/v7 ; Drizzle push https://orm.drizzle.team/docs/drizzle-kit-push . Earlier sources: Postgres documentation (DDL locking behavior, `CONCURRENTLY`, `NOT VALID`/`VALIDATE`, ADD COLUMN default fast-path), current zero-downtime migration practice guides (expand-contract/parallel-change, batched keyset backfill, forward-only production, pre-deploy application), Prisma/Drizzle documentation (create-only review workflow, `db push` scope), MySQL online-schema-change tooling (gh-ost, pt-online-schema-change) public docs. Version-specific lock behavior decays fastest — re-verify against the running version before asserting.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gg-guide
|
|
3
3
|
description: "Only when the user asks how to use GG Coder itself: how or where to do something in the app (models, sessions, settings, MCP, `!` and `/` commands, Checklist, safety, Goals, Motion, Chat, files, errors). Do NOT use for coding work."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "2026.11.22"
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# GG Coder guide
|