跳到正文
cccskills
免费在 GitHub 公开

security

How to handle `GRIDA-SEC-<id>` security boundaries in the Grida repo. Triggers when you encounter a `GRIDA-SEC` tag in source/docs, when modifying files under any tagged path, or when adding a new prevented- vulnerability record. Each `GRIDA-SEC-<id>` identifies a structural trust boundary documented in `/SECURITY.md`. This skill explains the contract, mandates a security review before committing changes to any tagged file, and shows how to register a new id. Use whenever "GRIDA-SEC" appears in context.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md5.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Security boundaries — GRIDA-SEC

What GRIDA-SEC-<id> means

Each GRIDA-SEC-<id> is a prevented vulnerability — a class of attack that would exist by default but the codebase structurally forecloses. Unlike a CVE (which describes something that was broken), a GRIDA-SEC id is a contract: this specific class of attack is impossible because of these specific files, and we keep it that way.

/SECURITY.md is the canonical registry. Every id has a section there with:

  • What it protects — the boundary in plain English.
  • Vulnerable scenario — the attack that would exist without the boundary.
  • How the code prevents it — the enforcement mechanism, file by file.
  • Files bound by this id — the exact files whose contents make up the contract.

Working with tagged code

When you see GRIDA-SEC-<id> in a file you're touching:

  1. Read the entry in /SECURITY.md for that id. Don't act on the tag alone — the rules are spelled out there.
  2. Run grep -rn GRIDA-SEC-<id> . to find every other file in the contract. Changes that look local often aren't — a tagged file is load-bearing for the boundary.
  3. Don't remove a tag without removing the entry from /SECURITY.md in the same change, with a written justification.

Mandatory security review before commit

If your change touches any file containing a GRIDA-SEC-<id> tag, you must complete a security review before committing. The review is brief but explicit:

  1. Re-read the entry in /SECURITY.md for every GRIDA-SEC-<id> that appears in your diff. Confirm the prevented scenario is still prevented after your change.
  2. Walk the enforcement mechanism. For each numbered "How the code prevents it" step in the entry, point at the line in your diff (or confirm it's untouched) that satisfies that step.
  3. Verify all tagged files are still tagged. A rename, refactor, or move that drops the tag is a contract violation, even if behavior looks identical.
  4. If you added or removed a file from the boundary, update the "Files bound by this id" list in /SECURITY.md in the same commit.
  5. Run any tests adjacent to the boundary. The SECURITY.md entry for the id may list specific tests; use grep -rn GRIDA-SEC-<id> --include='*test*' --include='*spec*' to find any others.

For database-backed boundaries, follow the canonical RPC role contract. Trace public entry points through their role privileges and tenant policies; a private inner schema or a service-role grant comment does not prove that callers are denied.

If you cannot satisfy steps 1–4, do not commit. Either revert the change, or explicitly amend the SECURITY.md entry to reflect a deliberate update of the contract — and surface that to the user.

Adding a new GRIDA-SEC id

When you introduce a new structural prevention worth tracking:

  1. Allocate the next sequential id. Look at /SECURITY.md, find the highest existing GRIDA-SEC-NNN, use NNN+1. Don't reuse retired ids; don't renumber.
  2. Write the entry in /SECURITY.md under "Active boundaries". Use the same four-section shape as existing ids: What it protects / Vulnerable scenario / How the code prevents it / Files bound.
  3. Tag every relevant file. Header comment in source files, callout block in READMEs, comment in scripts. Use the literal string GRIDA-SEC-NNN. Brief inline tags at specific code locations are fine too (e.g. // GRIDA-SEC-NNN: rule 2 — fail closed).
  4. Verify the grep works. grep -rn GRIDA-SEC-NNN . should return the entry in /SECURITY.md plus every tagged file.

This skill auto-loads on any "GRIDA-SEC" mention via its description. You don't need to register a new id with the skill.

When NOT to use this convention

  • Implementation bugs that were once exploitable. Those are CVE territory. GRIDA-SEC is for prevented-by-structure classes — if a bug happened, write a postmortem, not a GRIDA-SEC.
  • Generic best practices (input validation, authn/authz on user routes, etc.). Those are baseline and don't need an id. Reserve GRIDA-SEC for specific structural decisions where misunderstanding the design would re-open a class of attack.
  • Per-feature security notes that aren't structural contracts. Those go in the feature's own docs.

A good test: if you can reasonably write "this attack class is impossible because…" in one paragraph and grep returns ≥2 files that together make it true, it's a candidate for GRIDA-SEC.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Grida AI agent system work: `@grida/daemon` (DaemonServer, loopback HTTP perimeter, files/workspaces, secrets store, daemon discovery) and `@grida/agent` (the agent tenant: sessions, providers/BYOK, runtime/tool execution, skills discovery, prompts, tiers, sandbox hosts). Use for `packages/grida-daemon/**`, `packages/grida-ai-agent/**`, desktop sidecar protocol changes, agent chat transport, and bugs in agent state or streams. For pure Electron window, preload, menu, deep-link, or CDP work, use `desktop`.

中文简介正在准备中。当前显示原文说明。

gridaco/grida26862026年10月15日 更新

ai-models

免费

Research, compare, and update shared AI model JSON for TypeScript, web, and Rust consumers. Covers text model tiers, image and video generation models, image tool models, release provenance, pricing data sourcing, and product-side catalogue cost estimates. Use when bumping model versions, adding new models, updating pricing, or auditing model specs against provider documentation.

中文简介正在准备中。当前显示原文说明。

gridaco/grida26862026年10月15日 更新

React-specific code shape in the Grida editor. Hooks cannot be tested or benchmarked and silently break tuned UX under layered composition, so they are barred from the engine and main system — load-bearing logic lives in classes and namespaces, hooks only as thin edge wires. `data-testid` follows component-root discipline: one per significant component, not scattered. Use when authoring React in `editor/grida-canvas-react/`, `editor/components/`, `editor/scaffolds/`, or `editor/app/*`.

中文简介正在准备中。当前显示原文说明。

gridaco/grida26862026年10月15日 更新

code-ts

免费

TypeScript code shape inside a well-named module — taste, not lint. Prefer one class or namespace per file (the unit a test targets) over scattered free exports; consolidate related code, don't fragment. The unit of code should be the unit of spec. Use when authoring TS in `editor/grida-canvas*`, `editor/lib/`, or `packages/*`. Sibling to the `naming` skill; React-specific shape lives in `code-react`.

中文简介正在准备中。当前显示原文说明。

gridaco/grida26862026年10月15日 更新

database

免费

Use BEFORE editing any file in `supabase/migrations/` or `supabase/schemas/`, OR when the user runs a `/database` subcommand (`compact local migration`, `rls scenarios`, `align`). Encodes the three contracts that protect the Grida database layer: applied migrations are immutable, RLS implementation mirrors tests (never the reverse), `schemas/*.sql` is the human-readable end-state. Companion to `supabase/AGENTS.md` (RLS, grants, security boundaries).

中文简介正在准备中。当前显示原文说明。

gridaco/grida26862026年10月15日 更新

desktop

免费

Grida Desktop Electron shell and release-impact work: BrowserWindow, preload, `window.grida`, menus, protocol/deep links, file associations, Forge, path-scoped bridge security, Electron-only UI bugs, and CDP / Playwright verification. Use for `desktop/`, `editor/app/desktop/**`, `editor/scaffolds/desktop/**`, `editor/lib/desktop/**`, `/desktop/*` CSP, GRIDA-SEC-004, and deciding whether linked-package or hosted-renderer changes require a native Desktop version bump or coordinated release. For implementing daemon/agent-tenant core behavior, use `agent-system` as well.

中文简介正在准备中。当前显示原文说明。

gridaco/grida26862026年10月15日 更新

查看 gridaco 的全部技能

报告此技能的问题