convex-authz
Fungsinya
Skill ini memeriksa aplikasi Convex dari kesalahan kontrol akses yang umum, lalu memperbaikinya. Skill ini ditujukan untuk pembuat aplikasi yang ingin memastikan pengguna hanya mengakses datanya sendiri.
Kapan dipakai
- βSaat Anda ingin memastikan pengguna tidak bisa melihat atau mengubah data orang lain di aplikasi Convex Anda.
- βSaat Anda akan meluncurkan aplikasi yang menyimpan informasi pribadi pengguna.
- βSaat seseorang bertanya siapa yang bisa mengakses suatu data dan Anda membutuhkan jawaban yang jelas.
Link skill
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-authz/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPeriksa aplikasi Convex saya untuk memastikan pengguna hanya bisa melihat datanya sendiri.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memindai kode untuk beberapa pola berisiko yang sudah dikenal, menambahkan pemeriksaan kepemilikan standar di tempat yang belum ada, lalu menjalankan pemeriksaan tipe untuk memastikan perubahannya bisa dikompilasi.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Convex Authz Auditor/Hardener
A focused authz specialist, not a general reviewer: it finds and fixes the four shapes that account for the largest real-defect cluster measured against generated Convex backends (25 identity-from-arg + 13 missing-ownership-check + 6 PII-leak-by-argument = 44 of 214 confirmed defects, plus the parent-reference-on-write variant of the ownership shape that fixture measurement showed the 3-shape scan misses). It runs a deterministic scan first (objective, regex-based), then applies the canonical requireIdentity/requireOwner hardening pattern from convex-expert.md to every hit, then verifies with tsc. It does not re-derive the pattern β it applies the one already documented as the platform's canonical fix.
Workflow
- MANDATORY FIRST STEP β check the auth foundation exists before injecting any ctx.auth enforcement: (1) is there an auth.config.ts with a provider? (2) is there a users/identities table keyed to the auth subject (tokenIdentifier/identity.subject)? If EITHER is missing, DO NOT add requireIdentity/requireOwner β on a foundationless app ctx.auth.getUserIdentity() always returns null (enforcement is non-functional: every call 401s, or worse, the check is bypassed/miscompared against a non-subject field like an email string) and a reviewer correctly flags that as a NEW authz defect, not a fix. Instead, on a foundationless app: (a) for privileged/admin operations, convert the public query/mutation to internalQuery/internalMutation (removes public reachability entirely β safe and foundation-free, no ctx.auth needed), and (b) tell the user: 'this app has no auth foundation; run
/add author the auth setup first, then re-run convex-authz to add per-user ownership checks.' Do not run steps 1-3 below against public functions on a foundationless app beyond this internalize-and-defer move. Only when the foundation exists (both auth.config.ts and a subject-keyed users table are present) do you proceed to inject requireIdentity/requireOwner in steps 1-3. - SCAN (deterministic, objective-first): for every convex/**/*.ts file (skip convex/_generated/ and .d.ts), grep for the four shapes:
(a) identity-from-arg: a public
query(/mutation(object whoseargsblock declaresuserId/actorId/ownerId/authorId/accountIdtypedv.id(...), where the function's whole block (args + handler) has zeroctx.authreference. Regex:/\b(userId|actorId|ownerId|authorId|accountId)\s*:\s*v\.id\(/inside anargs: { ... }block paired with an absent/\bctx\.auth\b/anywhere in the enclosing(query|mutation)\(\s*\{ ... }block (word-boundary excludes internalQuery/internalMutation by construction). (b) missing-ownership-check: a publicquery(/mutation(whose handler loads a document viactx.db.get(args.<xId>)(an_id-typed arg) and then callsctx.db.patch/ctx.db.delete/ctx.db.replaceon that same id, or returns the doc's fields directly, with no comparison of any<doc>.<ownerField>against an identity value anywhere in the block (no===/!==involvingidentity.subjector actx.authderived value). (c) PII-leaking public query: a publicquery(whosereturns(or the raw doc it returns) includes a sensitive-looking field (email,revenue,ssn,password,token,auditLog,dashboard-shaped aggregate) and the query is parameterized by a client-supplied id with noctx.authcheck gating access to that id's own scope. (d) parent-reference ownership on write: a publicmutation(whose args include av.id(...)of a parent/container table (projectId,boardId,teamId,orgId,listId,folderId,conversationId,accountId, ...) that the handler uses as a foreign key in actx.db.insert/ctx.db.patchβ attaching or moving a child row into that container β without verifying the caller owns (or is a member of) the referenced parent doc. Creating a row inside someone else's container is the same defect as mutating their row: fixing WHO the caller is (shape a) does not fix WHERE they may write. After handling shapes a-c, re-audit every REMAININGv.id(...)arg in every public mutation for this shape β shape-a fixes routinely leave the parent id arg behind, still unchecked. Report every hit with file, line, and which of the 4 shapes matched β this is the objective, model-independent baseline; do not skip it in favor of jumping strai
Pertanyaan umum
Apakah skill ini membutuhkan autentikasi yang sudah diatur lebih dulu?
Ya. Skill ini memeriksa penyedia autentikasi dan tabel pengguna lebih dulu, karena pemeriksaan akses tidak akan berfungsi tanpa keduanya.
Masalah apa saja yang dicari?
Skill ini mencari fungsi yang mempercayai ID pengguna yang dikirim klien, tidak adanya pemeriksaan kepemilikan, kueri publik yang membocorkan data lewat ID, dan penulisan ke data yang bukan milik pengguna.
Apakah ini menggantikan tinjauan keamanan penuh?
Tidak. Skill ini hanya menargetkan kesalahan umum, jadi tinjauan yang lebih luas tetap layak dilakukan sebelum peluncuran.
Detail
Deskripsi asli dari pembuat
Audit and harden a Convex app's authorization: identity-from-arg impersonation, missing per-document ownership checks, public queries leaking data by a client-supplied id, and writes into a parent/container the caller doesn't own. Scans for the 4 shapes, applies requireIdentity/requireOwner, verifies with tsc. TRIGGER on 'secure my app', 'audit auth/authz', 'who can access this data'. SKIP when there is no convex/ directory.
repo: openclaw/clawhub
Popularitas
- Bintang GitHub
- 9.5k
- Peringkat
- #12235
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
axiom-alerting
9.5kMembantu agen Anda membuat dan mengelola monitor Axiom serta rute notifikasi melalui API Axiom, dan memeriksa apakah peringatan berperilaku sesuai harapan.
axiom-sre
9.5kMembantu agen Anda menyelidiki insiden dan bug produksi langkah demi langkah, menguji setiap dugaan terhadap log Axiom sebelum menarik kesimpulan.
building-dashboards
9.5kMembantu agen Anda mendesain dasbor Axiom dengan grafik, kueri, dan filter yang sesuai, dimulai dari keputusan yang harus didukung dasbor tersebut.
controlling-costs
9.5kMembantu agen Anda menemukan data yang tidak terpakai di Axiom dan membangun dasbor serta monitor yang melacak dan memangkas biaya logging.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.