convex-authz
यह क्या करती है
यह स्किल Convex ऐप में पहुँच नियंत्रण की आम गलतियाँ जाँचती है और उन्हें ठीक करती है। यह उन ऐप बनाने वालों के लिए है जो पक्का करना चाहते हैं कि उपयोगकर्ता सिर्फ़ अपने डेटा तक पहुँचें।
कब इस्तेमाल करें
- ✓जब आप जाँचना चाहें कि आपके Convex ऐप में उपयोगकर्ता दूसरों का डेटा न देख या न बदल सकें।
- ✓जब आप निजी उपयोगकर्ता जानकारी संग्रहित करने वाला ऐप लॉन्च करने वाले हों।
- ✓जब कोई पूछे कि किसी डेटा तक कौन पहुँच सकता है, और आपको साफ़ जवाब चाहिए।
Skill का लिंक
https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-authz/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Convex ऐप की जाँच कीजिए, ताकि पक्का हो कि उपयोगकर्ता सिर्फ़ अपना डेटा देख सकें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट कोड में कुछ जाने-पहचाने जोखिम वाले पैटर्न खोजता है, जहाँ मालिकाना जाँच नहीं है वहाँ मानक जाँच जोड़ता है, और यह पक्का करने के लिए टाइप जाँच चलाता है कि बदलाव कंपाइल होते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
क्या इस स्किल से पहले साइन-इन सेटअप ज़रूरी है?
हाँ। स्किल पहले auth provider और users तालिका जाँचती है, क्योंकि उसके बिना पहुँच जाँच काम नहीं करती।
यह किस तरह की समस्याएँ ढूँढती है?
ऐसे फ़ंक्शन जो क्लाइंट से भेजी user id पर भरोसा करते हैं, मालिकाना जाँच की कमी, ऐसी सार्वजनिक क्वेरी जो id से डेटा लीक करें, और ऐसे रिकॉर्ड में लिखना जो उपयोगकर्ता का न हो।
क्या यह पूरी सुरक्षा समीक्षा की जगह लेती है?
नहीं। यह आम गलतियों के एक सेट पर केंद्रित है, इसलिए लॉन्च से पहले व्यापक समीक्षा अभी भी उपयोगी हो सकती है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 9.5k
- रैंकिंग में स्थान
- #12235
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
axiom-alerting
9.5kआपके एजेंट को Axiom API से Axiom मॉनिटर और सूचना मार्ग बनाने और प्रबंधित करने में मदद करती है, और यह जाँचती है कि अलर्ट अपेक्षित ढंग से काम करते हैं।
axiom-sre
9.5kआपके एजेंट को प्रोडक्शन घटनाओं और बग की जाँच चरण-दर-चरण करने देती है, निष्कर्ष निकालने से पहले हर अनुमान को Axiom लॉग से परखते हुए।
building-dashboards
9.5kआपके एजेंट को Axiom डैशबोर्ड डिज़ाइन करने में मदद करती है, जिसमें सही चार्ट, क्वेरी और फ़िल्टर हों, और शुरुआत उन फ़ैसलों से होती है जिन्हें डैशबोर्ड सहारा देगा।
controlling-costs
9.5kआपके एजेंट को Axiom में अनुपयोगी डेटा ढूँढने और ऐसे डैशबोर्ड व मॉनिटर बनाने में मदद करती है जो लॉगिंग लागत को ट्रैक करें और घटाएँ।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।