> 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)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.cdxiaodong.life/cicd-an-quan/github-an-quan/redirect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
