Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Docker Hub's access token vulnerability: how signing let me verify my images

说明与用途

由于 Docker Hub IAM 漏洞,个人访问令牌可能被用于冒充用户。作者使用 cosign 验证了所有 compose‑lint 镜像,旋转了令牌,并改进了发布工作流以防止未来的篡改。

问题

A critical bug in Docker Hub’s IAM allowed personal access tokens to impersonate other users, risking unauthorized image pushes and pulls.

结果

All 42 compose‑lint images verified to the correct CI run; no unauthorized changes detected. Tokens rotated and workflow hardened.

工作流

  • 1. Rotate compromised tokens and split permissions per job
  • 2. Verify each image tag with cosign using a strict certificate‑identity regexp
  • 3. Pull each tag’s last_pushed time from Docker Hub API and compare with release runs
  • 4. Ensure no extra or missing tags exist
  • 5. Update release workflow to check tag integrity before signing
  • 6. Tighten CI verify step to use exact workflow identity
  • 7. Add verification command to documentation

证据

All 42 images verified, and every one traced back to the CI run that built it.

来源

I could still verify everything, but it meant using a regexp that allowed both workflows instead of one exact identity.

来源

The signature check only tells you what a tag points to today, though. Someone could point a tag at a bad image, wait for people to pull it, then point it back, and everything would still verify afterward.

来源

  • 记录日期: 2026-10-13T00:41:08.430Z