{"id":2625,"date":"2022-03-23T09:55:30","date_gmt":"2022-03-23T09:55:30","guid":{"rendered":"https:\/\/gitprotect.io\/blog\/?p=2625"},"modified":"2024-09-16T09:42:33","modified_gmt":"2024-09-16T09:42:33","slug":"how-to-safely-store-secrets-in-github","status":"publish","type":"post","link":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/","title":{"rendered":"How to Safely Store Secrets in GitHub"},"content":{"rendered":"\n<p>Everyone has a secret. Small or big, it doesn&#8217;t matter. The important thing is that each of us hides such a secret from the world for a variety of reasons. But there&#8217;s one thing all secrets have in common \u2013 no one wants them to become public!<\/p>\n\n\n\n<p>In the IT world, this is doubly important and I will explain why in a moment. But first, let&#8217;s clarify what \u201csecret\u201d means. Let me quote a short definition from the IBM website:<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><br><strong><em>\u201cA secret is a piece of sensitive information. For example, an API key, password, or any type of credential that you might use to access a confidential system.\u201d<\/em><\/strong><\/p>\n\n\n\n<p>As you can see above, the loss of secrets in information systems has far-reaching consequences, because data loss can cause huge financial losses, a breakdown in trust, or even the complete end of our business. So be careful! Keeping secrets is crucial.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where are secrets stored in GitHub?<\/h2>\n\n\n\n<p>Before we think about how and where we can hide such information, let\u2019s first answer the question \u2013 why put it in the repository at all?<\/p>\n\n\n\n<p>And the answer is very simple \u2013 GitHub Actions. Exactly, I mean the passwords necessary to run individual workflows. As an introduction to the topic and its security, I recommend reading one of our previous texts about <a href=\"https:\/\/gitprotect.io\/blog\/github-actions-how-to-use-it-for-security-and-compliance-needs\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">GitHub Actions<\/a>.<\/p>\n\n\n\n<p>Well, somehow <strong>GitHub needs this data to execute a specific job in our workflow<\/strong>. That is why a special storage mechanism for such secrets was created. We can create them on several levels: repository, environment, or organization.<\/p>\n\n\n\n<p>When a workflow run is added to the queue, then organization and repository-level secrets are read. In turn, the environment-level secrets are accessed when the job starts.<\/p>\n\n\n\n<p>We can, and even should, limit access to this secret information to the maximum by properly configuring access secrets. Make sure to properly grant access and permissions! For example, for environment-level secrets, we can assign a given reviewer who will manage access. Thanks to this, <strong>each workflow job will have to receive such access to be able to access a given secret<\/strong>. A very useful function and extremely important from the security perspective and management of our project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to add the secrets in GitHub?<\/h2>\n\n\n\n<p>Let me show you now how easy it is to add a secret. It looks similar for all three levels, i.e. in the Settings tab, we have to select the appropriate option and then create a secret that interests us. Before we get started, it\u2019s also worth reading about the naming convention and <strong>GitHub secrets pattern<\/strong>. For our needs, I will quote three important points regarding the nomenclature:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>Secret names must not start with the GITHUB_ prefix.<\/em><\/li>\n\n\n\n<li><em>Secret names must not start with a number.<\/em><\/li>\n\n\n\n<li><em>Secret names are not case-sensitive.<\/em><\/li>\n<\/ul>\n\n\n\n<p>More information can be found in <a href=\"https:\/\/docs.github.com\/en\/actions\/security-guides\/encrypted-secrets#naming-your-secrets\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">the official documentation<\/a>.<\/p>\n\n\n\n<p>To create repository secrets or environment-level secrets you must be either the repository owner or you must have admin access to it. Environment secrets play a crucial role in enhancing security by allowing the creation and management of secrets at an environment level, ensuring that only authorized reviewers can approve workflow runs that access these secrets.<\/p>\n\n\n\n<p>For the organization level, you also need to have admin access but in addition, you can use a policy for a personal account repository. So here is the answer to the question \u201c<strong>Who can see GitHub secrets?<\/strong>\u201d. It depends on the access to the repository\/organization. Please be aware that anyone who can create or edit the workflow file can also use and read encrypted secrets in that workflow.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#f4fafe\">\ud83d\udca1 <strong>PRO tip:<\/strong> <em>Converting plain text files into an encrypted file using tools like SOPS or gpg is crucial for maintaining security while allowing certain parts to remain in plaintext for ease of access.<\/em><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/gitprotect.io\/sign-up.html\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-1024x536.png\" alt=\"Get free trial\" class=\"wp-image-2555\" style=\"width:512px;height:268px\" srcset=\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-1024x536.png 1024w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-300x157.png 300w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-768x402.png 768w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-400x209.png 400w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n<p>Every secret you need to create on the Settings menu in GitHub. Either on the repository or organization level.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Environment level<\/h3>\n\n\n\n<p>First, we have to choose the environment we are interested in, and then in the lower section of this submenu, we will find a place where the secrets that have already been created are kept. Of course, we can add a new one at any time.<\/p>\n\n\n\n<p>It is worth returning to the topic of access protection and the security of our secrets. It is for this level that we can add additional protection rules like manual approvals and timeouts or even branch limitation rules:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/W6zVNL2DOl9Bx-w-xoQzU5qe5x-J89uz5U-2AKgNkMQFVBkcY7ZfqOvNnKPgTN8bnWG-w8jg9bheT7fHhzr25Y7LNtlOFTGS2cY14RYr_Zi9xZlxJ1rlbcubenMrea7UJrhhL8ek\" alt=\"Setting the environment level secret in GitHub\" style=\"width:590px;height:623px\"\/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Organization level<\/h3>\n\n\n\n<p>First, we have to choose the environment we are interested in, and then in the lower section of this submenu, we will find a place where the secrets that have already been created are kept. Of course, we can add a new one at any time.<\/p>\n\n\n\n<p>It is worth returning to the topic of access protection and the security of our secrets. It is for this level that we can add additional protection rules like manual approvals and timeouts or even branch limitation rules:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/HEskXAinXQcHAO4QYYYErmxfa8SlZ5flm4BQGHew50Ma2USBgDX5tAEOiYSthgJkor1Ofujaqjh_uz1syBlOoe_YtBRZ4DWfH9jBuLgJIDkohMZjIQYAbdDvLCb__poiNAbfqlHX\" alt=\"Setting the organization level secret in GitHub\" style=\"width:723px;height:229px\"\/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Repository level<\/h3>\n\n\n\n<p>Here, the matter is quite obvious, we enter the repository we are interested in, select the Settings menu at the top, then the Secrets submenu, here we choose whether we are focused on Actions or Dependabot level, and then click the \u201cNew repository secret\u201d button.<\/p>\n\n\n\n<p>From this level, if our repo also has environment or organization secrets, they will be shown here too:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/XW7xxMzoOxEX1RcbFppVApil3KrGe76KhCqJmh-yh6sNwP8NrX0iFCd-MKn1XoFjHC6MVwBF4ZFx5ytr6vuCbWiIFYXtNaHolLq6uvdsWw7Eq5rBk9r9q_lDCBFTCf896Hrx2Q1I\" alt=\"Setting the repository level secret in GitHub\" style=\"width:589px;height:511px\"\/><\/figure><\/div>\n\n\n<p>You can also manage a secret file by encrypting sensitive files using gpg before committing them to the repository, ensuring that secrets are not revealed in workflow logs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GitHub Actions secret example<\/h2>\n\n\n\n<p>When creating our actions, we can easily refer to the secrets prepared in such a way through a simple context \u201csecrets\u201d. Thanks to this, we can be sure that even when someone gains access to the definition of our action or the entire repo (but without admin access), our data will still remain safe and our secret values will be hidden.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/-ChpFpCsaQnxj4bma_kERuALe1aKSh6DvSIfMuzxazVAUaSr19Hw5HPjv098irrsB4C6lpSWvfZiJ3vGXBRzLx_WdhKc7zqN_txLsnxTW0aa7WZS--P2by_5KB7NyWP6FZWfgvPV\" alt=\"GitHub Actions secret example\" style=\"width:584px;height:122px\"\/><\/figure><\/div>\n\n\n<p>There is also the issue of safety and best practices. GitHub in its documentation warns that it will automatically redact secrets printed to the log, and at the same time encourages us not to print this information to the log intentionally.<\/p>\n\n\n\n<p>Another way to increase our security is to mask values in logs. To do this, we must precede the given log with the sequence <strong>::add-mask::<\/strong>, and as a result, instead of printing the critical data, the <strong>\u2018*\u2019<\/strong> symbols will appear in the log. Examples of the use of such masks:<\/p>\n\n\n\n<p><strong><em>echo \u201c::add-mask::${{ secrets.MY_SECRET }}\u201d<\/em><\/strong><\/p>\n\n\n\n<p>It is also worth paying attention to any third-party GitHub actions in our project. To be clear, I do not advise against using them. On the contrary. We just have to be careful because we are ultimately responsible for what we do with our project. It\u2019s a good idea to fork a given action and then use it in our project. Then we have a guarantee that no one from the outside will change its operation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>All in all, using GitHub action secrets is a good solution, and with the right level of control and consideration, it is a secure solution to keep your passwords private. Remember to carefully grant permissions in our repositories and control them on an ongoing basis. In case of any threat or attack, any user with write access can create a dedicated workflow to expose our secrets.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#f4fafe\"><a rel=\"noreferrer noopener\" href=\"https:\/\/gitprotect.io\/sign-up.html\" target=\"_blank\"><strong>[FREE TRIAL] Ensure compliant DevOps backup and recovery with a 14-day trial<\/strong><\/a><strong> \ud83d\ude80<\/strong><br><a rel=\"noreferrer noopener\" href=\"https:\/\/calendly.com\/d\/3s9-n9z-pgc\/gitprotect-live-demo?month=2024-08\" target=\"_blank\"><strong>[CUSTOM DEMO] Let\u2019s talk about how backup &amp; DR software for DevOps can help you mitigate the risks<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Everyone has a secret. Small or big, it doesn&#8217;t matter. The important thing is that each of us hides such a secret from the world for a variety of reasons. But there&#8217;s one thing all secrets have in common \u2013 no one wants them to become public! In the IT world, this is doubly important and I will explain why in a moment. But first, let&#8217;s clarify what \u201csecret\u201d means. Let me quote a short definition from the IBM website:<\/p>\n","protected":false},"author":6,"featured_media":2633,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2625","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-github","post--single"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Safely Store Secrets in GitHub - Blog | GitProtect.io<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Safely Store Secrets in GitHub - Blog | GitProtect.io\" \/>\n<meta property=\"og:description\" content=\"Everyone has a secret. Small or big, it doesn&#8217;t matter. The important thing is that each of us hides such a secret from the world for a variety of reasons. But there&#8217;s one thing all secrets have in common \u2013 no one wants them to become public! In the IT world, this is doubly important and I will explain why in a moment. But first, let&#8217;s clarify what \u201csecret\u201d means. Let me quote a short definition from the IBM website:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog | GitProtect.io\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/XoperoSoftware\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-23T09:55:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-16T09:42:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Tomasz Lisowski\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GitProtectio\" \/>\n<meta name=\"twitter:site\" content=\"@GitProtectio\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomasz Lisowski\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/\"},\"author\":{\"name\":\"Tomasz Lisowski\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79\"},\"headline\":\"How to Safely Store Secrets in GitHub\",\"datePublished\":\"2022-03-23T09:55:30+00:00\",\"dateModified\":\"2024-09-16T09:42:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/\"},\"wordCount\":1253,\"publisher\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png\",\"articleSection\":[\"GitHub\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/\",\"url\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/\",\"name\":\"How to Safely Store Secrets in GitHub - Blog | GitProtect.io\",\"isPartOf\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png\",\"datePublished\":\"2022-03-23T09:55:30+00:00\",\"dateModified\":\"2024-09-16T09:42:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage\",\"url\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png\",\"contentUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png\",\"width\":1200,\"height\":600,\"caption\":\"GitHub secrets\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Strona g\u0142\u00f3wna\",\"item\":\"https:\/\/gitprotect.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Safely Store Secrets in GitHub\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#website\",\"url\":\"https:\/\/gitprotect.io\/blog\/\",\"name\":\"GitProtect.io Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/gitprotect.io\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#organization\",\"name\":\"GitProtect.io\",\"url\":\"https:\/\/gitprotect.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png\",\"contentUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png\",\"width\":528,\"height\":528,\"caption\":\"GitProtect.io\"},\"image\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/XoperoSoftware\/\",\"https:\/\/x.com\/GitProtectio\",\"https:\/\/www.linkedin.com\/company\/xopero-software\/\",\"https:\/\/www.youtube.com\/channel\/UCiEnl6n0mIO6w7twccz-l2w\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79\",\"name\":\"Tomasz Lisowski\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg\",\"contentUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg\",\"caption\":\"Tomasz Lisowski\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/tomasz-lisowski-01366a75\/\"],\"url\":\"https:\/\/gitprotect.io\/blog\/author\/tomasz-lisowski\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Safely Store Secrets in GitHub - Blog | GitProtect.io","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/","og_locale":"en_US","og_type":"article","og_title":"How to Safely Store Secrets in GitHub - Blog | GitProtect.io","og_description":"Everyone has a secret. Small or big, it doesn&#8217;t matter. The important thing is that each of us hides such a secret from the world for a variety of reasons. But there&#8217;s one thing all secrets have in common \u2013 no one wants them to become public! In the IT world, this is doubly important and I will explain why in a moment. But first, let&#8217;s clarify what \u201csecret\u201d means. Let me quote a short definition from the IBM website:","og_url":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/","og_site_name":"Blog | GitProtect.io","article_publisher":"https:\/\/www.facebook.com\/XoperoSoftware\/","article_published_time":"2022-03-23T09:55:30+00:00","article_modified_time":"2024-09-16T09:42:33+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png","type":"image\/png"}],"author":"Tomasz Lisowski","twitter_card":"summary_large_image","twitter_creator":"@GitProtectio","twitter_site":"@GitProtectio","twitter_misc":{"Written by":"Tomasz Lisowski","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#article","isPartOf":{"@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/"},"author":{"name":"Tomasz Lisowski","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79"},"headline":"How to Safely Store Secrets in GitHub","datePublished":"2022-03-23T09:55:30+00:00","dateModified":"2024-09-16T09:42:33+00:00","mainEntityOfPage":{"@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/"},"wordCount":1253,"publisher":{"@id":"https:\/\/gitprotect.io\/blog\/#organization"},"image":{"@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage"},"thumbnailUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png","articleSection":["GitHub"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/","url":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/","name":"How to Safely Store Secrets in GitHub - Blog | GitProtect.io","isPartOf":{"@id":"https:\/\/gitprotect.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage"},"image":{"@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage"},"thumbnailUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png","datePublished":"2022-03-23T09:55:30+00:00","dateModified":"2024-09-16T09:42:33+00:00","breadcrumb":{"@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#primaryimage","url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png","contentUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/img-secret.png","width":1200,"height":600,"caption":"GitHub secrets"},{"@type":"BreadcrumbList","@id":"https:\/\/gitprotect.io\/blog\/how-to-safely-store-secrets-in-github\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Strona g\u0142\u00f3wna","item":"https:\/\/gitprotect.io\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Safely Store Secrets in GitHub"}]},{"@type":"WebSite","@id":"https:\/\/gitprotect.io\/blog\/#website","url":"https:\/\/gitprotect.io\/blog\/","name":"GitProtect.io Blog","description":"","publisher":{"@id":"https:\/\/gitprotect.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gitprotect.io\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/gitprotect.io\/blog\/#organization","name":"GitProtect.io","url":"https:\/\/gitprotect.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png","contentUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png","width":528,"height":528,"caption":"GitProtect.io"},"image":{"@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/XoperoSoftware\/","https:\/\/x.com\/GitProtectio","https:\/\/www.linkedin.com\/company\/xopero-software\/","https:\/\/www.youtube.com\/channel\/UCiEnl6n0mIO6w7twccz-l2w"]},{"@type":"Person","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79","name":"Tomasz Lisowski","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg","contentUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg","caption":"Tomasz Lisowski"},"sameAs":["https:\/\/www.linkedin.com\/in\/tomasz-lisowski-01366a75\/"],"url":"https:\/\/gitprotect.io\/blog\/author\/tomasz-lisowski\/"}]}},"_links":{"self":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts\/2625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/comments?post=2625"}],"version-history":[{"count":6,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts\/2625\/revisions"}],"predecessor-version":[{"id":5710,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts\/2625\/revisions\/5710"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/media\/2633"}],"wp:attachment":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/media?parent=2625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/categories?post=2625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/tags?post=2625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}