> For the complete documentation index, see [llms.txt](https://gitbook.cdxiaodong.life/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.cdxiaodong.life/cicd-an-quan/github-an-quan/redirect.md).

# 重定向

## 概述

当用户更改其用户名或组织名称时，GitHub 会创建一个重定向路由，允许从其旧 URL 访问仓库。更改用户名或组织名称后，旧的名称变得可以被认领。这意味着攻击者可以认领被废弃的用户名或组织名称并破坏重定向。因此，如果有人使用旧 URL，他们将处理攻击者的仓库。

这也适用于已转移的仓库。

## 参考资料

* [新型供应链攻击可能危及流行的管理工具](https://www.intezer.com/blog/malware-analysis/chainjacking-supply-chain-attack-puts-popular-admin-tools-at-risk/)
* [报告：依赖仓库劫持，也称为来自 GitHub 仓库 rubygems/bundler-site & rubygems/bundler.github.io + bundler.io 文档的 Repo Jacking](https://hackerone.com/reports/1430405)
