WeWorkBuddy

[程序员] 让 Claude Code 连数据库的注意下: curl 把密码从 ps 里藏了,外面那层 shell 没藏

我自己机器上查了一下,253 个 Claude Code 会话记录里,有 16 个出现过 mysql -p 密码 、 curl -u user:pass 这类写法。顺手看了下 AI 跑这种命令时 ps 里是什么样,发现比我以为的多了一层。 今天在 Mac 上复现( Claude Code 2.1.317 ):让它跑一条带假密码的 curl ,另起一个进程抓 ps: 54958 64286 /bin/zsh -c source ~/.claude/shell-snapshots/… && eval 'curl -s -m 8 -u demo:FAKEPASS123 http://10.255.255.1/' … 54959 54958 curl -s -m 8 -u http://10.255.255.1/ (中间加载环境的一大段我删了) 下面那行是 curl 自己,密码那几位已经被它抹成空格了,curl 确实有做这件事。上面那行是 Claude Code 起的 zsh ,整条命令连密码都在,curl 跑多久它就挂多久。 有个细节:你自己 bash -c 'curl ..

Read original source
Source page screenshot: [程序员] 让 Claude Code 连数据库的注意下: curl 把密码从 ps 里藏了,外面那层 shell 没藏
Source page screenshot · www.v2ex.com

Source record

Research analysis

Source record

Source account: 我自己机器上查了一下,253 个 Claude Code 会话记录里,有 16 个出现过 mysql -p 密码 、 curl -u user:pass 这类写法。顺手看了下 AI 跑这种命令时 ps 里是什么样,发现比我以为的多了一层。 今天在 Mac 上复现( Claude Code 2.1.317 ):让它跑一条带假密码的 curl ,另起一个进程抓 ps: 54958 64286 /bin/zsh -c source ~/.claude/shell-snapshots/… && eval 'curl -s -m 8 -u demo:FAKEPASS123 http://10.255.255.1/' … 54959 54958 curl -s -m 8 -u http://10.255.255.1/ (中间加载环境的一大段我删了) 下面那行是 curl 自己,密码那几位已经被它抹成空格了,curl 确实有做这件事。上面那行是 Claude Code 起的 zsh ,整条命令连密码都在,curl 跑多久它就挂多久。 有个细节:你自己 bash -c 'curl ..

Available context

Recent records to compare: “[程序员] tibo 28 天挑战后,是开始摆烂了吗?” (V2EX, Nov 8, 2026); “[程序员] 40 岁老登,最近看一部 AI 漫剧上头” (V2EX, Nov 8, 2026). Shared themes are navigation hints; they have not been verified as the same need or independent corroboration.

Research status

This record has not been assigned a sufficiently supported main content category. No commercial or performance conclusion is generated.

Missing evidence

The main event, affected audience and supporting primary source need review.

Next step

Read the original and identify the decision it supports before choosing an analysis framework.