Skip to content

Commit 1344379

Browse files
committed
close #113, use autocorrect for lint
1 parent bacef9e commit 1344379

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ serve:
33
zine --port 1313
44

55
lint:
6-
npx @lint-md/cli $$(git ls-files '*.smd')
6+
autocorrect --lint $$(git ls-files '*.smd')
77

88
format:
9-
npx @lint-md/cli --fix $$(git ls-files '*.smd')
9+
autocorrect --fix $$(git ls-files '*.smd')
1010

1111

1212
EXCLUDE = --exclude "*webp" --exclude "*svg" --exclude "*gif"

content/post/2026-03-26-zig-package-integrity.smd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## 前言
1010

11-
2026年3月24日,Python 生态遭遇了一次典型的供应链攻击:热门的 LiteLLM 包的 PyPI 发布凭证被盗,攻击者发布了包含恶意代码的版本 1.82.7 和 1.82.8。这些版本在 PyPI 上存活了约3小时,下载了数百万次。
11+
2026 年 3 月 24 日,Python 生态遭遇了一次典型的供应链攻击:热门的 LiteLLM 包的 PyPI 发布凭证被盗,攻击者发布了包含恶意代码的版本 1.82.7 和 1.82.8。这些版本在 PyPI 上存活了约 3 小时,下载了数百万次。
1212

1313
这场事件暴露了现代包管理系统的根本性设计缺陷——**版本号不等于内容承诺**。
1414

@@ -94,7 +94,7 @@ pip 的哈希验证说:"这个文件的 hash 是对的",但**从未说"这
9494
```
9595

9696
LiteLLM 攻击链是:
97-
1. Trivy GitHub Action 被入侵(2026年3月19日
97+
1. Trivy GitHub Action 被入侵(2026 年 3 月 19 日
9898
2. 从 CI/CD runner 环境偷取 `PYPI_PUBLISH` token
9999
3. 用这个 token 向 PyPI 发布恶意版本
100100
4. pip 无法区分"真正的 1.82.7"和"恶意的 1.82.7"
@@ -513,8 +513,8 @@ Zig 对 MITM 免疫,因为:
513513
| 事件 | 时间 | 包管理器 | 攻击向量 | 防御 |
514514
|------|------|--------|---------|------|
515515
| 4,000+ npm 包 | 2021-2022 | npm | 被盗的账户 | 没有 |
516-
| Ultralytics | 2024年6月 | pip | 被盗的 GitHub token | 没有 |
517-
| Trivy → LiteLLM | 2026年3月 | pip | 被盗的 CI/CD token | 没有 |
516+
| Ultralytics | 2024 年 6 月 | pip | 被盗的 GitHub token | 没有 |
517+
| Trivy → LiteLLM | 2026 年 3 月 | pip | 被盗的 CI/CD token | 没有 |
518518

519519
**共同点**:凭证被盗。
520520

@@ -637,7 +637,7 @@ zap-0.1.7-BmEKAAr47fud
637637

638638
3. **审查 build 依赖**
639639
```bash
640-
# 避免使用不pinned的 CI/CD 工具版本
640+
# 避免使用不 pinned 的 CI/CD 工具版本
641641
- uses: aquasecurity/trivy-action@v0.69.4 # ← 明确 pin
642642
```
643643

content/post/index.smd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
.draft = false,
1212
---
1313

14-
欢迎大家向我们投稿,会同步到微信公众号,投稿方式见[这里](./2023-09-05-hello-world)。
14+
欢迎大家向我们投稿,会同步到微信公众号,投稿方式见[贡献](/contributing)。
1515

1616
[社区新闻](./news)

0 commit comments

Comments
 (0)