Skip to content
Agentmart
Submit a tool

netlify-database-security

Use when connecting Netlify backend APIs to databases and you need secure runtime env handling, least privilege, safe data access patterns, and storage…

Skill by prachwal-archive

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/prachwal-archive-netlify-database-security

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when connecting Netlify backend APIs to databases and you need secure runtime env handling, least privilege, safe data access patterns, and storage choices that fit Netlify's platform constraints.

Use cases: backend, cloud, data, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/netlify-database-security

What's inside

Skill name
netlify-database-security
Description
Use when connecting Netlify backend APIs to databases and you need secure runtime env handling, least privilege, safe data access patterns, and storage choices that fit Netlify's platform constraints.
License
MIT
Instructions
82 lines in SKILL.md · view on GitHub

Files (4)

  • SKILL.md
  • blobs-facts.md · references/
  • data-access.md · references/
  • secrets.md · references/

SKILL.md (first lines)

# Netlify Database Security Skill

Use this skill when an API reads or writes persistent data from a database.

## Security goals

- Minimize credential exposure.
- Reduce blast radius with least privilege.
- Prevent injection, privilege escalation, and accidental data leaks.
- Keep data access predictable and auditable.

## Storage selection

- Use Netlify Blobs only for simple key-value or unstructured data with frequent reads and infrequent writes.
- Do not model relational data, complex querying, or concurrency-sensitive workflows on top of Blobs. Netlify explicitly points more advanced cases toward database integrations.
- Treat Blobs as last-write-wins storage. If concurrent writes matter, add your own locking or choose a real database.

## Rules

- Load secrets only from runtime environment variables scoped to Functions.
- Never hardcode credentials, URLs, or tokens.
- Use parameterized queries or a safe query builder.
- Validate and sanitize all external input before persistence.
- Restrict database users to the minimum required permissions.
- Separate read and write paths when that reduces risk.
- Do not assume values declared in `netlify.toml` are available at function runtime. Netlify documents that they are not.
- Leave function-type selection to `netlify-serverless`.

## Connection guidance

- Reuse connections when the runtime allows it.
- Prefer pooling or managed connection proxies where appropriate.
- Treat cold starts as normal and make initialization idempotent.
- Fail closed if a required secret or DSN is missing.
- Keep region placement in mind. If the database is far from the function region, latency and timeout risk increase.
- Keep this section about credential safety and failure behavior.

## Data handling guidance

- Store only data the product actually needs.
- Redact secrets, access tokens, and sensitive identifiers from logs.
- Return only the fields required by the client.
- Add explicit limits for pagination, payload size, and query filters.
- Use migrations for schema changes instead of manual edits.
- Never expose arbitrary key access if you store sensitive data in Netlify Blobs.

## Blobs-specific security facts

- Blobs are encrypted at rest and in transit, but application code still controls whether data can leak.
- Site-wide Blobs are accessible through your own site code; keep key naming and access rules private.
- Eventual consistency is the default model. New objects become globally available immediately, while updates and deletes are documented to propagate within 60 seconds.
- Local `netlify dev` uses a sandboxed local Blob store, not production data.

## Operational checklist

- Verify secrets are present in Netlify environment configuration.
- Verify the env var scope includes Functions for runtime access.
- Confirm the DB user cannot access unrelated schemas or admin functions.
- Check that logs do not include raw queries with secrets or personal data.
- Review read/write patterns for N+1 queries and unnecessary round trips.
- Test failure modes for expired credentials, network errors, and timeouts.
- Test secret rotation and redeploy flow because runtime env changes require a new build and deploy.

## Reference files

### [`references/secrets.md`](references/secrets.md)
**Secret loading and rotation** — `requireEnv()` fail-fast helper with module-init throw, Netlify variable scope table (build vs. Functions), per-context CLI commands for production vs. preview, step-by-step rotation checklist (add new → deploy → remove old → revoke), Blobs key-naming security example, rules for secret hygiene.

### [`references/data-access.md`](references/data-access.md)
**Safe query and access patterns** — SQL injection example → parameterized fix, Zod-validated filter schema before query, least-privilege PostgreSQL role setup (read-only vs. API roles), MongoDB-style projection to exclude sensitive fields, recursive `redactForLog()` with `SENSITIVE_KEYS` set, rules for allowlisted sort/filter columns.

### [`references/blobs-facts.md`](references/blobs-facts.md)
**Netlify Blobs security and consistency** — Platform guarantees table (encryption at rest/transit, propagation timing, local dev isolation), consistency model implications (no locks, no counters, ~60s update propagation), safe key naming with UUID validation and namespacing, sensitive data handling (what is and is not acceptable), authenticated handler pattern with per-user key scoping.

## External references

- Pair with [../netlify-serverless/SKILL.md](../netlify-serverless/SKILL.md) for execution primitives.
- Pair with [../netlify-api-performance/SKILL.md](../netlify-api-performance/SKILL.md) for latency and caching work.
- [Environment variables and functions](https://docs.netlify.com/functions/environment-variables/)
- [Netlify Blobs overview](https://docs.netlify.com/storage/blobs/overview/)

From prachwal-archive/web-ui-skills, MIT.

More from prachwal-archive/web-ui-skills

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Apr 9, 2026 (6 months ago)
Last release
Apr 23, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from prachwal-archive

Cite this page

netlify-database-security skill. Agent Mart. https://agentmart.dev/skills/prachwal-archive-netlify-database-security (last updated 2026-10-24)