Observação: atualmente, a revisão de dependência está em versão beta e sujeita a alterações.
About dependency review
Revisão de dependências ajuda você a entender as alterações de dependência e o impacto de segurança dessas alterações em cada pull request. Ele fornece uma visualização facilmente compreensível de mudanças de dependência, com um rico diff na aba "Arquivos alterados" de um pull request. A revisão de dependências informa você:
- Quais dependências foram adicionadas, removidas ou atualizadas, junto com as datas de versão.
- Quantos projetos usam esses componentes.
- Dados de vulnerabilidade para essas dependências.
Before you can use dependency review, you must enable the dependency graph and connect your GitHub Enterprise Server instance to GitHub.com. For more information, see "Enabling alerts for vulnerable dependencies on GitHub Enterprise Server."
Dependency review allows you to "shift left". You can use the provided predictive information to catch vulnerable dependencies before they hit production. For more information, see "About dependency review."
Reviewing dependencies in a pull request
-
Abaixo do nome do repositório, clique em Solicitações de pull.
-
Na lista de solicitações pull, clique na solicitação pull que você quer revisar.
-
On the pull request, click Files changed.
-
If the pull request contains many files, use the File filter drop-down menu to collapse all files that don't record dependencies. This will make it easier to focus your review on the dependency changes.
The dependency review provides a clearer view of what has changed in large lock files, where the source diff is not rendered by default.
Note: Dependency review rich diffs are not available for committed static JavaScript files like
jquery.js
. -
On the right of the header for a manifest or lock file, display the dependency review by clicking the rich diff button.
-
Check the dependencies listed in the dependency review.
Any added or changed dependencies that have vulnerabilities are listed first, ordered by severity and then by dependency name. This means that the highest severity dependencies are always at the top of a dependency review. Other dependencies are listed alphabetically by dependency name.
The icon beside each dependency indicates whether the dependency has been added (), updated (), or removed () in this pull request.
Other information includes:
- The version, or version range, of the new, updated, or deleted dependency.
- For a specific version of a dependency:
- The age of that release of the dependency.
- The number of projects that are dependent on this software. This information is taken from the dependency graph. Checking the number of dependents can help you avoid accidentally adding the wrong dependency.
- The license used by this dependency, if this information is available. This is useful if you want to avoid code with certain licenses being used in your project.
Where a dependency has a known vulnerability, the warning message includes:
- A brief description of the vulnerability.
- A Common Vulnerabilities and Exposures (CVE) or GitHub Security Advisories (GHSA) identification number. You can click this ID to find out more about the vulnerability.
- The severity of the vulnerability.
- The version of the dependency in which the vulnerability was fixed. If you are reviewing a pull request for someone, you might ask the contributor to update the dependency to the patched version, or a later release.
-
É possível que você também queira revisar o diff da fonte, porque pode haver alterações no manifesto ou arquivo de bloqueio que não mudam as dependências, ou pode haver dependências que GitHub não pode analisar e que, consequentemente, não aparecem na revisão de dependências.
Para retornar ao modo de exibição de diferenciação de origem, clique no botão .