Dako's AI Builder Notes
System
Color theme
Changsha HubOffline
大可 Dako
大可 Dako大可 DakoAI Builder · Agent PractitionerTurning AI into working software. Practical notes on agent engineering, vibe coding, and commercial delivery.
Platform links coming soon
AI is fast, so the security floor must be tighterAI-written codefast, but high invulnerabilitieseasy to hackSecurityfloorcredentials,input,…What you shiptrust, responsibility,long-term maintenancereviewed before it ships
Security isn't an option; it's the other half of the cost.

The Security Floor Is Not Negotiable

No credentials in context, AI code has high vulnerability rates, and sensitive code gets a dedicated review before production. Security is a hard constraint of vibe coding.

Vibe coding's temptation is "fast," and the price is often hidden in that speed: AI-written code has a high vulnerability rate, and once it involves credentials, permissions, or user data, security stops being "later" and becomes a floor you must hold now.

After reading, you should be able to answer:

  • Why is AI-written code especially prone to security holes?
  • Which security floors are "non-negotiable"?
  • Before production, what security review does code at least need?

Why AI code is vulnerability-prone

  • AI is good at imitating common patterns, and it often copies the "popular pattern" that carries a known vulnerability
  • It doesn't necessarily register the security constraints in your context (permissions, injection, boundaries)
  • Fast generation → review gets skipped more easily → the holes ship vibe-report

The signal in the data: a large share of AI-produced code trips a security scan. Speed exactly magnifies the risk of "nobody looked."

The non-negotiable floors

At least these, never compromise:

  • No credentials in context: keys and tokens go through env vars/secret managers, never into rule files, knowledge bases, or session logs
  • Validate input always: don't trust user input; AI-generated interfaces don't skip auth and validation either
  • Least privilege: when AI runs commands/calls APIs, give it the minimum needed, not full access
  • Sensitive data, double review: changes touching money, personal info, or permissions get a dedicated human review

Security review before production

  • Sensitive code (auth, payment, data handling) gets a dedicated review, not a glance
  • Run a security scan/static check, treat "high" as must-fix
  • High-risk actions (push to protected branch, touch prod, drop the DB) blocked by a machine, not a reminder

Fast and safe don't conflict

  • Fast is "generation," and it should be fast
  • Slow is "reviewing the corners that get hacked," and it should be slow
  • Build "security review" into the process: don't sacrifice generation speed, just lock a few critical gates

Hold the security floor and handle the "parts you can't afford to lose." There's another half of the cost too—don't let tokens leak silently: slim the context, don't let the conversation sour.

References

  1. The Vibe Coding Report 2026