Skip to content
cccskills
FreePublished on GitHub

security

Apply security checks when changing authentication, database access, uploads, routes, or server requests to user-provided URLs. The skill guides input validation, row-level authorization, safe handling of untrusted content, and approval for consequential actions.

OriginalShow the original description

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.

BuilderIO/agent-native7,524 stars(GitHub 7,524 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Adding access checks to data reads and writes
  • Handling uploaded files and untrusted user content
  • Making server requests to user-provided URLs
  • Protecting payment, publishing, or messaging actions

Files included (1)

  • SKILL.md3.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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:

DataAccess model
Private user rowsStore owner_email and filter every read and write by the current caller.
Organization-wide catalogStore org_id and scope action queries to the active org; gate restricted mutations by org or app role.
Team-shared or individually shareable resourcesUse ownableColumns(), register the resource type, and check access with the sharing helpers.
Child rowsCheck 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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

a2a-assets

FreeSummary

Generate, refine, export, and place brand images or videos from an Assets library into another app. The skill covers choosing a library, handling image batches and video runs, and updating selected assets after feedback.

  • Generate brand images for slides or another app
  • Refine an existing asset after feedback
  • Create and export a video asset
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

account-health

FreeSummary

Prepare a customer account health, renewal, or contract usage readout. Verify the account identity, use approved metric definitions, compare contracted capacity with actual usage, and trace findings to sources, time windows, and known gaps.

  • Preparing a named customer's account health review
  • Comparing contracted seats or capacity with usage
  • Gathering adoption signals before a renewal or QBR
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

actions

FreeSummary

Create focused app actions that agents can call as tools and frontend code can use through client hooks. Use them to add provider integrations or fetch UI data, with validated inputs and structured results.

  • Adding a new app operation
  • Connecting an external provider API
  • Fetching data for a frontend view
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

adding-a-feature

FreeSummary

Use this checklist when adding a feature or integration to an agent-native app. It covers the user interface, agent-callable actions, instructions, and app-state sync so both the user and agent can work with the capability consistently.

  • Planning a new feature across UI and agent actions
  • Checking that agent changes appear in the UI
  • Documenting actions and feature state for the agent
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

adhoc-analysis

FreeSummary

Investigate complex questions by combining data from multiple sources, then summarize patterns, metrics, and evidence in a clear report. Save requested analyses as dashboards with instructions for future refreshes.

  • Comparing CRM deals with call records
  • Investigating customer health across systems
  • Saving a repeatable performance analysis
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

admin-surfaces

FreeSummary

Use the Analytics admin surfaces to inspect and change workspace feature flags, review dashboard ownership and usage activity, or browse and edit databases connected from other agent-native apps. The skill guides administrators to the relevant view and actions.

  • Review dashboard owners, views, and edits
  • Change a workspace feature flag for an app
  • Browse or edit a connected app database
BuilderIO/agent-native7.5KUpdated Oct 26, 2026

See all skills by BuilderIO

Report a problem with this skill