Zum Inhalt springen
Skillpedia
Sicherheit7.6k · #13180

security

Was er macht

Dieser Skill listet Sicherheitsregeln für App-Daten, Aktionen, Routen, Uploads und externe Anfragen auf. Er richtet sich an Entwickler, die Anmeldung, Datenbankzugriff, Datei-Uploads oder Serveraufrufe zu vom Nutzer angegebenen Webadressen ändern.

Wann du ihn nutzt

  • ✓Wenn du Code für Anmeldung, Berechtigungen oder Datenbankzugriff änderst.
  • ✓Wenn eine App Uploads oder Inhalte von externen Nutzern annimmt.
  • ✓Wenn der Server eine vom Nutzer angegebene Webadresse abrufen wird.

Link zum Skill

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/security/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/security/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Stelle sicher, dass Nutzer nur ihre eigenen Notizen sehen können, und prüfe Uploads, bevor sie gespeichert werden.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Skill sagt dem Agenten, jede Eingabe zu prüfen, parametrisierte Abfragen zu nutzen und jedes Lesen und Schreiben nach dem Zugriff des Aufrufers zu filtern. Kann der Zugriff nicht bestätigt werden, wird er verweigert.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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, or assertAccess(type, id, role) before a read or write that requires access.
  • Use an action's authorize gate 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, or document.write.
  • Use ssrfSafeFetch from @agent-native/core/extensions/url-safety for 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.
Häufige Fragen

Was passiert, wenn der Zugriff nicht bestätigt werden kann?

Der Skill sagt, im Zweifel zu verweigern, die Anfrage wird also abgelehnt.

Wohin sollen große hochgeladene Dateien?

In den Dateispeicher, und in der Datenbank wird nur die zurückgegebene ID oder URL gehalten.

Wie soll rohes SQL mit Nutzereingaben umgehen?

Werte müssen als Parameter übergeben werden und dürfen nie in den SQL-Text eingefügt werden.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
7.6k
Platz im Ranking
#13180
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills