返回首页

对比阅读

对比阅读:AI Changed the Code—Now Security Bugs Are Slipping Into Your Product 与 AI 改代码后,安全漏洞悄悄混进了你的产品

AEN
AI编程工具个人开发者客户数据安全·

AI Changed the Code—Now Security Bugs Are Slipping Into Your Product

The scene: When I first let AI touch my login flow

Last Tuesday at 10 p.m., I was in my Hangzhou rental, using AI to update login validation for a small tool. It wired up the button quickly, and the page opened normally. I almost shipped it. Later, I found that the code AI had added focused on whether the feature worked, without properly handling edge cases. That was when I realized the minutes AI saved could become risks of customer data being exposed or permissions being bypassed. I had just learned the hard way: faster work does not mean skipping the review.

What this approach is—and who is using it

This is not a particular tool everyone must install. It is a working method: let AI write code or modify features, then have someone who understands the business check the security boundaries. It works much like coding assistants such as Cursor and Claude Code. An indie founder can describe a requirement in plain language—“only admins can see customer phone numbers”—without learning complicated terminology first.

I know an independent developer named Lin Xiao (Xiaolin). She builds a customer-record organization tool in Shenzhen. After asking AI to generate an export feature, she discovered during testing that regular accounts could retrieve complete phone numbers. She added another permission check, then brought in a colleague specifically to review who could access which data. Her experience made something clear: AI is great for producing a first draft, but the security check cannot be left entirely to it.

What it costs to replicate: money, time, skill, and the first step

For a small experiment with an existing AI coding tool, I would budget 0 to 100 yuan per month to start; full subscription prices vary by plan. Expect roughly 30 minutes to 2 hours: 15 minutes to describe the requirement, 15 minutes to let AI modify the code, and at least 30 minutes for human review. The skill barrier is being able to tell whether a page behaves correctly and being willing to check permissions and inputs; I do not need to become a programmer. The first step is simple: open the AI tool I already use, create a test project, and ask it to implement one minimal feature without connecting it to real customer data.

My earlier mistake was testing a feature directly in production, where test files got mixed with real records. Now I duplicate fake data, keep the old version, and review login, permissions, abnormal inputs, and deletion operations one by one after every change. Every critical decision written by AI deserves another look.

Advice by stage

Just getting started: I would build one very small feature with fake data first, then connect it to customer records once I am comfortable with the process. There is no rush to try it; getting the manual workflow right matters more.

Already have one or two customers: I would use AI for the first draft, but run a permission check before every release and prepare a rollback plan. I might ask a peer to review the work rather than carry all the risk alone.

Scaling up: I would add security checks to the release checklist: who can see which data, how the feature handles bad inputs, and whether the old version can be restored. Once the team has a dedicated technical colleague, I would refine this process further.

BZH
AI编程工具个人开发者客户数据安全·

AI 改代码后,安全漏洞悄悄混进了你的产品

工作场景钩子:我第一次让 AI 改登录功能

上周二晚上 10 点,我在杭州的出租屋里,用 AI 帮一个小工具改登录校验。它很快把按钮接上了,页面也能正常打开,我差点直接发布。直到后来才发现,AI 顺手写出的代码只顾着“能不能用”,没有认真处理异常情况。那一刻我意识到,AI 省下的几分钟,可能变成客户数据被误读、权限被绕过的风险。我也是刚搞明白:提效不等于可以不复查。

这工具/方法是什么?谁已经在用

这里说的不是某个必须安装的软件,而是一种工作方法:让 AI 参与写代码、改功能,再由懂业务的人检查安全边界。它和 Cursor、Claude Code 这类代码助手的使用方式类似,普通创业者可以直接用自然语言描述需求,比如“只有管理员能看到客户手机号”,不需要先学复杂术语。

我认识一位叫林晓的自由开发者,在深圳做客户资料整理工具。她让 AI 生成导出功能后,测试发现普通账号也能拿到完整手机号。她后来加了一层权限判断,又让另一位同事专门检查谁能访问哪些数据。这个场景提醒我们:AI 很适合做初稿,但安全检查不能完全交给它。

你今天复刻成本:钱、时间、门槛和第一步

用现成 AI 编程工具做小范围试验,通常可以先按每月 0 到 100 元预算准备;完整订阅价格会随套餐变化。投入时间大约 30 分钟到 2 小时:15 分钟描述需求,15 分钟让它改代码,至少 30 分钟人工检查。技术门槛是“能看懂页面是否正常,以及愿意核对权限和输入内容”,不需要成为程序员。第一步很简单:打开你正在用的 AI 工具,新建一个测试项目,先让它实现一个最小功能,别直接接入真实客户数据。

我之前犯过的错,是直接拿正式环境试功能,后来把测试文件和真实资料混在了一起。现在我会先复制一份假数据,保留旧版本,改完后逐项检查登录、权限、异常输入和删除操作。AI 写的每一处关键判断,都值得再看一遍。

分人群建议

如果你刚起步:我会先拿假数据做一个很小的功能,等熟悉流程后再接入客户资料。现在不试也没事,先把人工流程跑稳更重要。

如果你已经有 1-2 个客户:我会让 AI 帮忙写初稿,但每次发布前都做一次权限检查,并准备回滚办法。你可以邀请一位同行帮忙复核,而不是独自扛下所有风险。

如果你正在扩规模:我会把安全检查列进发布清单:谁看得到什么数据、错误输入会怎样、旧版本能否恢复。等到团队有专门的技术同事,再把这部分流程做得更细。