{"id":118226,"date":"2024-07-25T15:43:00","date_gmt":"2024-07-25T13:43:02","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/dostup-k-dannym-iz-udalyonnyh-i-privatnyh-repozitoriev-na-github-imeyushhih-forki"},"modified":"2024-07-25T15:43:00","modified_gmt":"2024-07-25T13:43:02","slug":"dostup-k-dannym-iz-udalyonnyh-i-privatnyh-repozitoriev-na-github-imeyushhih-forki","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/dostup-k-dannym-iz-udalyonnyh-i-privatnyh-repozitoriev-na-github-imeyushhih-forki","title":{"rendered":"Access to data from remote and private repositories on GitHub that have forks","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Truffle Security has published attack scenarios for several common methods of working with repositories on GitHub that allow the extraction of data from remote repositories with public forks or those created as forks.     <\/p>\n<p>The ability to access commits by hash across all related forks of a repository is driven by GitHub's optimization efforts and the avoidance of duplicates, storing all objects from the main repository and forks together while logically separating commit ownership. This storage method allows viewing any commit from any fork in the main repository by explicitly providing its hash in the URL. For example, a user can create a fork of the repository \"\/torvalds\/linux\" and add any code to it, after which this code becomes accessible via a direct hash link in the repository \"\/torvalds\/linux\". If the repository is deleted, the data from the deleted repository remains available through the commit hash as long as there is at least one public fork.    <\/p>\n<p>Three scenarios are proposed that represent a security threat:   <\/p>\n<ul>\n<li class=\"l\"> The first scenario addresses situations where developers create forks of public repositories, make changes, experiment, and then delete them. Beyond the leakage of code not intended for publication, there is a danger when working keys to APIs are added in experimental code files with samples. In this case, an attacker can gain access to the modifications via the commit hash that is directed after the fork's deletion through the main repository. For instance, using the proposed method, researchers managed to identify 30 working API access keys by examining three machine learning-related repositories with a large number of forks.\n<li class=\"l\"> The second scenario concerns the possibility of accessing data after the primary repository has been deleted if forks for that repository were created. An example is given of a case where a public repository of a company accidentally published the private keys of one of its employees, granting full access to all the repositories of this company on GitHub. The company deleted the repository through which the leak occurred, but the keys remained accessible for extraction through commit hash queries in repositories with forks.    <center><img decoding=\"async\" alt=\"Access to data from remote and private repositories on GitHub that have forks\" src=\"\/wp-content\/uploads\/2024\/07\/45381deb03eaa5be40baf8b4dbf7b481.png\" style=\"display:block;margin: 0 auto;\" \/><\/center>\n<li class=\"l\"> The third scenario is related to the project development model, where a basic open version is developed in a public repository and an extended proprietary version in a private one. If a company initially developed the project in a private repository and then, after opening the project's code, moved it to a public status while continuing to develop a closed internal or extended version in a private fork, there is a possibility of accessing the changes added to the private fork via commit hashes through the public repository. However, access is only possible to the changes added to the private fork before the main repository was converted to public (the storage of private and public repositories is separated, but when two repositories were private, commits were stored together, thus they remained in the repository after it was converted to public).    <center><img decoding=\"async\" alt=\"Access to data from remote and private repositories on GitHub that have forks\" src=\"\/wp-content\/uploads\/2024\/07\/23342cf907bd300699e913297d29b310.png\" style=\"display:block;margin: 0 auto;\" \/><\/center>  <\/ul>\n<p>The trick to accessing commits in the repository forks through a link to the main repository has been known for many years and is periodically used for various pranks and to mislead developers (for example, pranksters periodically create the illusion of backdoor injections in the Linux kernel repository on GitHub in this manner). As a countermeasure against such pranks, GitHub added a warning that the requested commit does not belong to any branches in the current repository and may belong to a fork. Nevertheless, the ability to access commits by hash in any associated repository forks is considered harmless, as knowledge of the commit hash is required to query data in remote and private forks.    <\/p>\n<p>Finding a commit hash, generated based on the SHA-1 algorithm and consisting of 32 characters, is impractical, but it turns out that it is not necessary. GitHub supports a shortened form of referencing commits, allowing changes to be addressed by the first few characters of the hash if there are no overlaps with other commits. The minimum number of characters for a shortened hash reference is 4, which corresponds to checking all 65 thousand combinations (16^4). Moreover, this check may not even be necessary, as the GitHub API allows connecting handlers to intercept events that are used by third-party projects maintaining an archive with a complete log of all operations, where information about commit hashes remains even after repositories are deleted.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=61605\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Truffle Security \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0442\u0430\u043a \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0451\u043c\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043d\u0430 GitHub, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043a\u0438 \u0438\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043a\u0430\u043a \u0444\u043e\u0440\u043a\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u043c \u043f\u043e \u0445\u044d\u0448\u0443 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043a\u0430\u043c\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e GitHub \u0432 \u0446\u0435\u043b\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":118227,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-118226","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Truffle Security \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0442\u0430\u043a \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0451\u043c\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043d\u0430 GitHub, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043a\u0438 \u0438\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/dostup-k-dannym-iz-udalyonnyh-i-privatnyh-repozitoriev-na-github-imeyushhih-forki\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u043d\u0430 GitHub, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0444\u043e\u0440\u043a\u0438 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Truffle Security \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0442\u0430\u043a \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0451\u043c\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043d\u0430 GitHub, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043a\u0438 \u0438\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/dostup-k-dannym-iz-udalyonnyh-i-privatnyh-repozitoriev-na-github-imeyushhih-forki\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-07-25T13:43:02+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-07-25T13:43:02+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Access data from remote and private repositories on GitHub with forks | ProHoster","description":"Truffle Security has published attack scripts for several common techniques related to working with GitHub repositories, allowing the extraction of data from remote repositories that have public forks or are otherwise accessible.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/dostup-k-dannym-iz-udalyonnyh-i-privatnyh-repozitoriev-na-github-imeyushhih-forki","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u043d\u0430 GitHub, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0444\u043e\u0440\u043a\u0438 | ProHoster","og:description":"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Truffle Security \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0430\u0442\u0430\u043a \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u0451\u043c\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043d\u0430 GitHub, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043a\u0438 \u0438\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/dostup-k-dannym-iz-udalyonnyh-i-privatnyh-repozitoriev-na-github-imeyushhih-forki","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2024-07-25T13:43:02+00:00","article:modified_time":"2024-07-25T13:43:02+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"118226","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 04:49:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2026-01-23 04:49:19","updated":"2026-01-23 04:49:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/118226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=118226"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/118226\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/118227"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=118226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=118226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=118226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}