{"id":20463215,"url":"https://github.com/devwithkrishna/automatically-create-delete-update-github-organization-secrets","last_synced_at":"2026-04-23T03:33:17.398Z","repository":{"id":219585438,"uuid":"747279088","full_name":"devwithkrishna/automatically-create-delete-update-github-organization-secrets","owner":"devwithkrishna","description":"from azure keyvault pull secrets and using them update or create github secrets in a specified repo","archived":false,"fork":false,"pushed_at":"2025-02-04T15:33:18.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-05T11:53:04.379Z","etag":null,"topics":["action","github-action","githubapp","guthubapptoken","python"],"latest_commit_sha":null,"homepage":"https://github.com/devwithkrishna/automatically-create-github-secrets","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devwithkrishna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-23T16:11:49.000Z","updated_at":"2025-02-04T15:33:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f942af6-ec56-486a-89c1-9102b6149394","html_url":"https://github.com/devwithkrishna/automatically-create-delete-update-github-organization-secrets","commit_stats":null,"previous_names":["devwithkrishna/automatically-create-github-secrets"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/devwithkrishna/automatically-create-delete-update-github-organization-secrets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devwithkrishna","download_url":"https://codeload.github.com/devwithkrishna/automatically-create-delete-update-github-organization-secrets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32165099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","github-action","githubapp","guthubapptoken","python"],"created_at":"2024-11-15T13:09:55.387Z","updated_at":"2026-04-23T03:33:17.374Z","avatar_url":"https://github.com/devwithkrishna.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# automatically-create-delete-update-github-organization-secrets\ncreate , delete or update github organization secrets using github workflow\n\n# Pre requesites\n* This requires an authorization method which has organization-secret with write permission\n* Personal Access Token (PAT) is the recommended way to authenticate. In this demo PAT is USED.\n* You can generate a new one from Github settings\n* You need to encrypt a secret before you can create or update secrets.\n\n\n# How code works for create or update secret\n\n\n* First this will execute the `get_public_key.sh` shell script to get the Organization public key \n    *  This public key is required and used for encryption of secret\n\n    `Reference`: [get-an-organization-public-key](https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#get-an-organization-public-key)\n\n* Then it will execute the `get_public_key_id.sh`  script to get the organization key id. \n    * This is required for creation or updation of secret\n\n* Then the `python program` `encrypt_using_libnacl` this uses the public key from step 1 and encrypts the secret \nusing the prefered method by GitHub.\n\n    `Reference`: [create-or-update-an-organization-secret](https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret)\n\n    - Reference used for encryption : [example-encrypting-a-secret-using-python](https://docs.github.com/en/rest/guides/encrypting-secrets-for-the-rest-api?apiVersion=2022-11-28#example-encrypting-a-secret-using-python )\n\n* Then `Python program` `create_or_update_github_org_secret` is used to take the public key id from step 2 and encrypted secret value from step 3 to create or update the secret.\n\n| status code | operation |\n|-------------|-----------|\n| 201  | Create Org secret|\n| 204  | Update an Org secret |\n\n\n- visibility of organization secret has been set to all organization repositories. selected means only the repositories specified by selected_repository_ids can access the secret.\n- Can be one of: `all`, `private`, `selected`\n\n\n## Inputs of workflow\n\n| input name | description|\n|------------|------------|\n| organization | name of github organization |\n| secret_name | organization Secret name |\n| secret_value | Secret value |\n\n\n# # How code works for deleting an organization secret\n\n* This runs the shell script `delete_github_org_secret.sh` which takes 2 inputs from github workflow \n1. organization name\n2. secret name\n\n* Then deletes the secret\n\n| input | description| \n|-------|--------------|\n| organization | GitHub Organization name |\n| secret_name | Secert to be deleted |\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwithkrishna%2Fautomatically-create-delete-update-github-organization-secrets/lists"}