(评论)
(comments)
原始链接: https://news.ycombinator.com/item?id=43473623
这篇 Hacker News 讨论帖关注的是使用第三方 GitHub Actions 的安全隐患,起因是最近 `Tj-actions/changed-files` action 被入侵。alexwlchan.net 上的原文可能建议使用 SHAs(特定的提交 ID)来锁定 actions 以防止恶意更新。
然而,用户指出了一些限制:简短的提交 ID 并不可靠,即使是完整的 SHA 锁定也不能保证安全,因为依赖项本身可能没有锁定其依赖项。一位用户提到 GitHub Actions 实际上强制使用完整的提交 SHA。一些用户建议编写自己的驱动程序,而不是依赖许多外部 actions,从而最大限度地减少攻击面。另一些用户仅使用 Actions 来触发自定义 webhook,在他们自己的服务器上处理实际的构建过程,从而避免使用 YAML。一位用户强调了 Actions 被滥用于网页抓取的情况。总体共识倾向于将 GitHub Actions 视为潜在的受损目标,并限制其对 AWS 账户等敏感资源的访问。
That's not a full commit ID, so it can still result in a mutable reference if either someone can find a clash[1] or if they can push a tag with that name and it takes priority in the context it is used (this is somewhat complex, e.g. GitHub prohibits pushes of branches and tags which are exactly 40 hex characters long, but other services may not).
[1]: https://people.kernel.org/kees/colliding-with-the-sha-prefix...
reply