lol

Merge pull request #189241 from SuperSandro2000/git-full-hash

doc/contributing: enforce full commit hashes on github

authored by

Anderson Torres and committed by
GitHub
6be0f0e0 febd3083

+3
+3
doc/contributing/coding-conventions.chapter.md
··· 453 453 } 454 454 ``` 455 455 456 + When fetching from GitHub, commits must always be referenced by their full commit hash. This is because GitHub shares commit hashes among all forks and returns `404 Not Found` when a short commit hash is ambiguous. It already happens for some short, 6-character commit hashes in `nixpkgs`. 457 + It is a practical vector for a denial-of-service attack by pushing large amounts of auto generated commits into forks and was already [demonstrated against GitHub Actions Beta](https://blog.teddykatz.com/2019/11/12/github-actions-dos.html). 458 + 456 459 Find the value to put as `sha256` by running `nix-shell -p nix-prefetch-github --run "nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix"`. 457 460 458 461 ## Obtaining source hash {#sec-source-hashes}