security
하는 일
이 스킬은 앱 데이터, 액션, 경로, 업로드, 외부 요청에 대한 보안 규칙을 정리합니다. 로그인, 데이터베이스 접근, 파일 업로드, 사용자가 준 웹 주소로의 서버 호출을 바꾸는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓로그인, 권한 또는 데이터베이스 접근 코드를 바꿀 때.
- ✓앱이 외부 사용자의 업로드나 콘텐츠를 받을 때.
- ✓서버가 사용자가 제공한 웹 주소를 가져와야 할 때.
스킬 링크
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/security/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“사용자가 자신의 메모만 볼 수 있게 하고, 업로드된 파일은 저장하기 전에 검사해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 에이전트에게 모든 입력을 검사하고, 매개변수화된 쿼리를 쓰며, 모든 읽기와 쓰기를 호출자의 접근 권한으로 걸러내고, 확인할 수 없으면 접근을 거부하라고 말합니다.
기술 내용 (원본 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.
자주 묻는 질문
접근을 확인할 수 없으면 어떻게 되나요?
요청을 거부하는 방식으로 실패하라고 이 스킬은 말합니다.
큰 업로드 파일은 어디에 저장하나요?
파일 저장소에 두고, 데이터베이스에는 반환된 ID나 URL만 보관합니다.
원시 SQL은 사용자 입력을 어떻게 처리하나요?
값은 항상 매개변수로 전달해야 하며, 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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
design-exploration
7.6k에이전트가 여러 UI 디자인 방향을 나란히 보여 주고, 사용자가 하나를 고르면 그 디자인을 다듬도록 돕습니다.
visual-edit
7.6k에이전트가 실행 중인 로컬 앱을 시각 편집기에 열어, 실제 화면을 함께 검토하고 편집하도록 돕습니다.
turn-into-app
7.6k워크플로, 스프레드시트 또는 프로젝트를 데이터가 채워진 세련된 시각 앱으로 바꾸고, 컨트롤 뒤에서 에이전트가 작업하도록 합니다.
visual-plan
7.6k일반 텍스트 계획을 다이어그램, 파일 맵, 코드 조각, 열린 질문이 담긴 대화형 시각 계획으로 바꿔 줍니다.