security
यह क्या करती है
यह स्किल ऐप डेटा, actions, routes, uploads और बाहरी अनुरोधों के लिए सुरक्षा नियम बताती है। यह उन डेवलपर्स के लिए है जो login, डेटाबेस पहुंच, फ़ाइल uploads या यूज़र द्वारा दिए वेब पते पर server कॉल बदल रहे हैं।
कब इस्तेमाल करें
- ✓जब आप login, अनुमति या डेटाबेस पहुंच का कोड बदलते हैं।
- ✓जब कोई ऐप बाहरी यूज़र से uploads या सामग्री स्वीकार करता है।
- ✓जब server ऐसा वेब पता लाएगा जो यूज़र ने दिया है।
Skill का लिंक
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/security/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“पक्का कीजिए कि यूज़र केवल अपने नोट्स देख सकें, और सहेजने से पहले uploads जांचें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल एजेंट को हर इनपुट जांचने, parameterized queries इस्तेमाल करने, और हर read व write को कॉलर की पहुंच से फ़िल्टर करने को कहती है। जब पहुंच की पुष्टि न हो सके, तो पहुंच से इनकार किया जाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Security
Rule
Treat each action, route, query, and external request as a trust boundary. Validate inputs, check the caller's authority for every row, and fail closed when access cannot be established.
Validate input and queries
- Define action inputs with a Zod
schema; validate data from forms, URLs, providers, and files before using it. - Build database queries with Drizzle. For raw SQL, bind values as parameters; never concatenate user input into SQL text.
- Keep large uploads and file contents in file storage. Store only their returned ids or URLs in SQL.
Authorize rows and actions
Choose a table's access model when designing its data:
| Data | Access model |
|---|---|
| Private user rows | Store owner_email and filter every read and write by the current caller. |
| Organization-wide catalog | Store org_id and scope action queries to the active org; gate restricted mutations by org or app role. |
| Team-shared or individually shareable resources | Use ownableColumns(), register the resource type, and check access with the sharing helpers. |
| Child rows | Check access to the parent before reading or changing children; add any child-specific rules in the action. |
Do not make a team-wide catalog private by adding a per-user owner filter. For
an organization-owned catalog, org_id without owner_email is valid: scoped
database tools expose only the active organization's rows, while app actions
still need their own org filter and authorization. For resources users can
share, use these helpers:
- Add
accessFilter(table, sharesTable)to list and read-many queries. - Use
resolveAccess(type, id)for an optional read by id, orassertAccess(type, id, role)before a read or write that requires access. - Use an action's
authorizegate for role-wide restrictions. It decides who may call the operation; it does not replace row-level access checks.
Prefer actions for normal app data. A custom HTTP route is appropriate for protocols such as uploads, streaming, webhooks, OAuth callbacks, or public unauthenticated resources. An authenticated custom route must establish the session/request context and apply the same row-level access checks as an action.
Handle untrusted content and URLs
- React escapes rendered text. Do not pass untrusted content to
dangerouslySetInnerHTML,innerHTML,eval, ordocument.write. - Use
ssrfSafeFetchfrom@agent-native/core/extensions/url-safetyfor server-side requests to user- or agent-controlled URLs. It checks private network destinations and redirects. - Treat provider error bodies and uploaded files as untrusted input. Return a useful, bounded error to the user without exposing internal details.
Protect credentials and consequential actions
Never put credential values in source, prompts, action arguments or results,
application state, client bundles, logs, or error messages. Use the shared
credential flow in the secrets skill.
For a genuinely high-consequence outward action, such as sending a message,
charging a payment method, or publishing publicly, use needsApproval to ask
the user to approve that call. Approval does not grant access: keep the normal
authorize and row-level checks as well.
Related skills
actions— define validated operations shared by the agent and UI.secrets— connect external services and resolve credentials safely.sharing— configure access to shareable resources.
अक्सर पूछे जाने वाले सवाल
अगर पहुंच की पुष्टि न हो सके तो?
स्किल कहती है कि fail closed करें, यानी अनुरोध अस्वीकार हो।
बड़ी uploaded फ़ाइलें कहां जानी चाहिए?
file storage में, और डेटाबेस में केवल लौटाया गया ID या URL रखें।
कच्चे SQL में यूज़र इनपुट कैसे संभालें?
मान parameters के रूप में पास होने चाहिए, SQL टेक्स्ट में कभी जोड़े नहीं जाने चाहिए।
जानकारी
लेखक का मूल विवरण
Secure app data, actions, routes, and external input. Use when changing authentication, authorization, database access, uploads, untrusted content, or server-side requests to user-provided URLs.
repo: BuilderIO/agent-native
लोकप्रियता
- GitHub स्टार
- 7.6k
- रैंकिंग में स्थान
- #13180
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
design-exploration
7.6kयह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।
visual-edit
7.6kयह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।
turn-into-app
7.6kयह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।
visual-plan
7.6kयह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।