惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
博客园_首页
美团技术团队
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
J
Java Code Geeks
T
Tailwind CSS Blog
Jina AI
Jina AI
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Beyond the Vibe: Why “Secure by Default” is the Only Way ...
Aharon Hyman · 2026-05-11 · via DEV Community

Beyond the Vibe: Why "Secure by Default" is the Only Way to Build in 2026

We’ve all been there. You’re trying to complete a simple task—in my case, registering my son for a Judo seminar—and the page hangs. As a developer, your instinct isn't to refresh; it's to open the Network Tab.

What I found wasn't just a bug. It was a window into a growing problem in the era of "vibe coding" and rapid-fire deployment.

The Discovery: A Judo Chop to Data Privacy

The landing page for this event was built using a popular third-party "vibe coding" platform. These tools are incredible for speed, allowing users to describe a functional app and see it come to life in seconds. However, speed without a safety net is a liability.

By inspecting the network traffic to see why the registration was failing, I realized the API wasn't just sending my son's data—it was capable of sending everyone's. Using Postman, I confirmed the worst: I had full CRUD (Create, Read, Update, Delete) access. I could have wiped the entire event roster or modified participant details with a few clicks.

The Root Cause: The Danger of Permissive Defaults

The platform offered a simple toggle: [Allow All Users] vs. [Admins Only]. By default, it was set to "Allow All Users." This is the "Default-Allow" trap. It assumes the developer will remember to lock the doors later. But if a door starts unlocked, it usually stays unlocked.

How Sticklight Handles This

Short answer: Sticklight defaults to "Deny All" by design.

Seeing this failure in the wild made me reflect on our own architecture. Here is the breakdown of how we prevent this exact scenario:

Row Level Security (RLS) is Mandatory

When Cloud Backend is enabled in Sticklight, every table has RLS enabled by default. With RLS enabled and no policies defined, the default behavior is a total lockdown:

  • SELECT/INSERT/UPDATE/DELETE: All Denied.

This is the polar opposite of the "Allow All Users" default. In Sticklight, if a developer forgets to add policies, users get a 403 error—not access to the entire database.

Policies Must Be Explicitly Created

The AI agent is built with a security-first mindset. It is instructed to:

  1. Never disable RLS.
  2. Never create USING (true) policies unless data is genuinely public.
  3. Always scope user data with user_id filters.
  4. Create the minimum necessary permissions.

Example: The Judo Registration Table

If this seminar page had been built in Sticklight, the generated SQL would look like this:

-- RLS is enabled by default.
-- Policy: Users can only see their OWN registration.
CREATE POLICY "Users can view own registration"
ON registrations FOR SELECT
USING (user_id = auth.uid());

In this scenario, an attacker inspecting the network tab would only see their own data. The "vibe" remains the same for the user, but the data remains private.

The Failure Mode Comparison

Scenario Other "Vibe" Platforms Sticklight
Default setting "All Users" (permissive) No access (deny all)
Forgot to configure Full CRUD for everyone 403 Forbidden
Failure mode Silent data breach Broken feature (visible)

Pro-Tip: How to "Vibe Code" Without Leaking Data

If you’re building your own apps from scratch using AI agents (like Claude Code, Replit Agent, or Cursor), you are the primary architect. Here’s how to ensure your vibe stays secure:

  • Use Security-First Prompting: Specifically instruct the AI to use Secure-by-Default patterns and assume the frontend is untrusted.
  • Establish a Security Rubric: Maintain a persistent CLAUDE.md or instructions file that mandates RLS and 403-by-default behavior.
  • The "Postman Audit": Never trust the UI. Manually test your API endpoints with tools like Postman to ensure they don't leak data when unauthenticated.
  • Review Every Diff: Look specifically for cases where the agent might have simplified a policy or left a "TODO" on an authentication check.

Conclusion

As we move toward AI-generated boilerplate and "vibe-driven" development, the responsibility shifts to the platform architect. At Sticklight, we believe a "broken" feature is a ticket, but a "broken" security setting is a catastrophic liability. By choosing a "Deny All" default, we ensure that the path of least resistance for a developer is also the safest one for the end user.