stash-drizzle

Integrate CipherStash field-level encryption with Drizzle ORM for TypeScript applications.

156|6|Updated Nov 14, 2024
One-click install
npx skills add https://github.com/cipherstash/stack --skill stash-drizzle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stash-drizzle
Source: https://github.com/cipherstash/stack/tree/main/skills/stash-drizzle
Command: npx skills add https://github.com/cipherstash/stack --skill stash-drizzle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the integration of robust field-level encryption into Drizzle ORM projects, ensuring data security without compromising query capabilities.

Core Features & Use Cases

  • Encrypted Column Types: Define encrypted fields in your Drizzle schemas using encryptedType.
  • Type-Safe Query Operators: Query encrypted data using familiar operators (eq, like, gte, etc.) that automatically handle encryption.
  • ORM Integration: Seamlessly works with Drizzle's schema definition and query building.
  • Use Case: Securely store user email addresses and other sensitive PII in your Drizzle-based application, enabling search and filtering on encrypted fields.

Quick Start

Use the stash-drizzle skill to define an encrypted email column in your Drizzle schema and query it using the eq operator.

Frequently Asked Questions about stash-drizzle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add field-level encryption to Drizzle ORM schemas?

Field-level encryption is added to Drizzle ORM schemas by defining encrypted fields using a custom `encryptedType`. This integrates CipherStash encryption seamlessly into your TypeScript schema definitions for secure data handling.

Can I perform range queries and text search on encrypted database fields?

Yes, you can perform range queries and text search on encrypted database fields using type-safe encrypted query operators. These operators automatically handle the encryption logic for equality, like, and gte operations without compromising security.

Does CipherStash encryption support querying encrypted JSONB fields in TypeScript?

CipherStash encryption supports querying encrypted JSONB fields within TypeScript applications. This allows you to securely store complex JSON structures while maintaining the ability to query encrypted fields directly through Drizzle ORM integrations.

What is the best way to securely store sensitive PII like email addresses using Drizzle ORM?

The best way to securely store sensitive PII like email addresses is by using `encryptedType` in your Drizzle schema. This enables secure storage while allowing search and filtering on encrypted fields through type-safe query operators.

How does ORM integration handle automatic encryption for TypeScript database queries?

ORM integration handles automatic encryption by providing custom encrypted query operators that wrap standard Drizzle operations. This ensures that data is encrypted and decrypted seamlessly during schema definition and query building without manual intervention.