xin zou retweeted
斯坦福开了一门课,免费教你怎么用AI写代码——不是选修水课,是正经3学分,课号CS146S
「The Modern Software Developer」,核心论点:软件开发已经从0到1写代码,进化成"规划 → AI生成 → 修改 → 循环"的迭代流程。课程目标是教下一代工程师怎么用AI工具把生产力拉到10倍
10周课程,每周的内容拆开看都很实在:
→ Week 1-2:LLM原理、Prompt工程、Agent架构、Tool Use、MCP协议
→ Week 3-4:AI IDE的上下文管理、PRD驱动开发、Agent自治层级和人机协作模式
→ Week 5:AI增强的终端和命令行自动化
→ Week 6:AI代码的安全问题——漏洞检测、Prompt注入攻击、SAST/DAST
→ Week 7:AI辅助Code Review和文档生成
→ Week 8:一个Prompt搞定端到端应用构建
→ Week 9:部署后的监控、可观测性和自动化事件响应
→ Week 10:未来十年软件开发会变成什么样
嘉宾阵容是真的强:Claude Code创作者Boris Cherney、Cognition(Devin)研究负责人Silas Alberti、Warp CEO Zach Lloyd、Semgrep CEO Isaac Evans、Vercel AI研究负责人Gaspar Garcia、a16z合伙人Martin Casado
前置要求CS111编程基础,推荐有CS221/229(AI/ML)背景。作业全在GitHub上开源,非斯坦福学生也能跟着自学
课件、Slides、阅读材料全部公开,相当于一套免费的AI编程系统课
🔗
themodernsoftware.dev
今天刚发生的重大安全事件,Karpathy 亲自发帖警告。
litellm 被投毒:一次教科书级的供应链攻击
今天(3月24日),AI 开发者常用的 Python 库 litellm 在 PyPI 上被植入恶意代码。版本 1.82.8 在 UTC 时间 10:52 发布到 PyPI,包含一个名为 litellm_init.pth 的恶意文件,会在每次 Python 进程启动时自动执行。不需要你主动调用这个库,装上就中招。
litellm 是干什么的?它是一个统一调用各家大模型 API 的 Python 库,GitHub 超过 4 万星,每月下载量超过 9500 万次。很多 AI 工具链都依赖它,包括 DSPy、MLflow、Open Interpreter 等,总共有 2000 多个包把它当作依赖项。
也就是说,你可能从来没有手动安装过 litellm,但你用的某个工具替你装了。
恶意代码会系统性地收集主机上的敏感数据:SSH 密钥、AWS/GCP/Azure 云凭证、Kubernetes 密钥、环境变量文件、数据库配置,甚至加密货币钱包。收集完毕后加密打包,发送到攻击者控制的域名。
如果检测到 Kubernetes 环境,恶意代码还会利用服务账户令牌在集群的每个节点上部署特权 Pod,进行横向扩散。
怎么发现的?攻击者自己写了个 bug
发现过程颇具讽刺意味。FutureSearch 的 Callum McMahon 在 Cursor 编辑器里用了一个 MCP 插件,这个插件间接依赖了 litellm。恶意 .pth 文件在每次 Python 启动时都会触发,子进程又触发同一个 .pth,形成指数级的 fork bomb,直接把机器内存撑爆了。
Karpathy 在推文里说得很清楚:如果攻击者没有在写恶意代码时犯这个 bug,这个投毒可能好几天甚至好几周都不会被发现。
攻击链:安全工具反成突破口
根源在于 litellm 的 CI/CD 流程中使用了 Trivy(一个漏洞扫描工具),而 Trivy 本身在 3 月 19 日就已经被同一个攻击组织 TeamPCP 攻陷了。攻击者通过被污染的 Trivy 窃取了 litellm 的 PyPI 发布令牌,然后直接往 PyPI 上推送了带毒版本。
litellm 1.82.7 在 UTC 10:39 发布,1.82.8 在 10:52 发布,两个版本都包含恶意代码。
时间线更完整地看:3月19日 TeamPCP 攻陷 Trivy,3月23日攻陷 Checkmarx KICS,3月24日轮到 litellm。Wiz 安全研究员 Gal Nagli 的评价是:开源供应链正在形成连锁崩塌,Trivy 被攻破导致 litellm 被攻破,数万个环境的凭证落入攻击者手中,而这些凭证又会成为下一次攻击的弹药。
攻击者还试图“灭口”
社区成员在 GitHub 上提交 issue 报告此事后,攻击者在 102 秒内用 73 个被盗账号发了 88 条垃圾评论试图淹没讨论,然后利用被盗的维护者账号把 issue 关闭。社区不得不另开 issue 并转移到 Hacker News 继续讨论。
Karpathy 借此事重提了他对软件依赖的警惕态度:供应链攻击是现代软件中最可怕的威胁,每次安装一个依赖,都可能在依赖树的深处引入一个被投毒的包。他现在越来越倾向于用大模型直接生成简单功能的代码,而不是引入外部依赖。
如果你的环境中有 litellm,立刻运行 pip show litellm 检查版本。1.82.6 是最后一个干净版本。如果不幸装了 1.82.7 或 1.82.8,假设所有凭证已泄露,立即轮换。
Software horror: litellm PyPI supply chain attack.
Simple `pip install litellm` was enough to exfiltrate SSH keys, AWS/GCP/Azure creds, Kubernetes configs, git credentials, env vars (all your API keys), shell history, crypto wallets, SSL private keys, CI/CD secrets, database passwords.
LiteLLM itself has 97 million downloads per month which is already terrible, but much worse, the contagion spreads to any project that depends on litellm. For example, if you did `pip install dspy` (which depended on litellm>=1.64.0), you'd also be pwnd. Same for any other large project that depended on litellm.
Afaict the poisoned version was up for only less than ~1 hour. The attack had a bug which led to its discovery - Callum McMahon was using an MCP plugin inside Cursor that pulled in litellm as a transitive dependency. When litellm 1.82.8 installed, their machine ran out of RAM and crashed. So if the attacker didn't vibe code this attack it could have been undetected for many days or weeks.
Supply chain attacks like this are basically the scariest thing imaginable in modern software. Every time you install any depedency you could be pulling in a poisoned package anywhere deep inside its entire depedency tree. This is especially risky with large projects that might have lots and lots of dependencies. The credentials that do get stolen in each attack can then be used to take over more accounts and compromise more packages.
Classical software engineering would have you believe that dependencies are good (we're building pyramids from bricks), but imo this has to be re-evaluated, and it's why I've been so growingly averse to them, preferring to use LLMs to "yoink" functionality when it's simple enough and possible.
xin zou retweeted
Replying to @douebs
Programmers write the actual code. SWE's job, on the other hand, is to convert business needs to technical terms, architect the modules and flows, and then ensure quality of delivery. Coding is only a means to achieve that - so with AI coder, SWE can be more powerful actually.
xin zou retweeted
新闻联播20230417:《我国开源软件开发者数量突破800万》,亮点在37秒,GitHub不能直接Clone,pip因为被墙安装失败,使用代理后正常
转自微博:weibo.com/3322982490/MCskK3P…
I’m here
Welcome to Day Two and our first day of keynotes. CNCF's own @pritianka and @cra kick things off at 09:00 CEST in Hall 12. Don't miss the Solutions Showcase, which also opens today. See the full schedule here: events.linuxfoundation.org/k…
#KCCNC #KubeCon #CloudNativeCon
420
需要
Replying to @voooocan @williamlong
你猜一个媒体和个人能自由发声,法律能有效监管的国家,一个上市公司公然诈骗几百万人,公检法的负责人,证监会的负责人,市场监管机构负责人,相关法案人制定者需不需要给个说法/电视道歉/引咎辞职/坐牢/提出更改发案/成立社会救助机构?目前某神奇国度别说这些,连蛋壳的真正负责人是谁都还不知道。

























