{"id":17093034,"url":"https://github.com/peter-murray/github-ip-allow-list-action","last_synced_at":"2025-03-22T18:33:04.145Z","repository":{"id":44332745,"uuid":"377741555","full_name":"peter-murray/github-ip-allow-list-action","owner":"peter-murray","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-03T16:03:21.000Z","size":599,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T13:51:22.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peter-murray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-06-17T07:23:32.000Z","updated_at":"2025-02-20T03:28:50.000Z","dependencies_parsed_at":"2024-10-14T14:04:27.099Z","dependency_job_id":"0e54392f-cfff-4585-a382-42642072e6eb","html_url":"https://github.com/peter-murray/github-ip-allow-list-action","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"c11d57dacadf642bc3a17659d14b281eb0bb2e93"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fgithub-ip-allow-list-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fgithub-ip-allow-list-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fgithub-ip-allow-list-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Fgithub-ip-allow-list-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-murray","download_url":"https://codeload.github.com/peter-murray/github-ip-allow-list-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245003149,"owners_count":20545574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-14T14:04:19.608Z","updated_at":"2025-03-22T18:33:03.678Z","avatar_url":"https://github.com/peter-murray.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-ip-allow-lists-action\n\nA GitHub Action that will load the Enterprise IP Allow List Entries with the CIDRs that are returned from the GitHub meta API (https://api.github.com/meta).\n\n\n## Requirements \u0026 Implmentation Details\n\nYou will need a GitHub PAT that has the `admin:enterprise` permission to run this action and make use of it's features. This type of permission is pretty extreme so you should protect the access to any repository that you are going to use this action.\n\nThere is a potential that you might end up adding a large pool of CIDRs to your enterprise. All added CIDRs will be named in a way so as to track then back to the GitHub Meta API as a source of the entry.\n\nWhen adding a large number of entries, you can run into the risk of hitting abuse or API limits with the endpoints that this Action uses (e.g. adding the `actions` meta CIDRs).\n\nTo mitigate these problems, firstly only new CIDRs are added, which means that if the CIDR is already present in the IP Allow List entries, no modifications or API calls will be performed. One thing that may result in is that the `active` state may be different to what you set the Action to so in the parameters if this is the case.\n\nAPI retry and rate throttling along with a secondary queue is implemented to control the rate a retires and to be respectful to the APIs being targeted. This will ensure that the Action should avoid all failures due to rate limiting or abuse triggering protections on GitHub.com.\n\n\n## Parameters\n\n* `github_token`: A GitHub Access Token that has the `admin:enterprise` permission. `Required`\n\n* `enterprise_slug`: The slug for the enterprise account to be modified. `Required`\n\n* `metadata_section`: The CIDRs in the meta endpoint to be added to the allow list, e.g. `actions` or `hooks`. Check the [meta API](https://api.github.com/meta) for the names of the various services.\n\n* `custom_cidrs`: A list of custom CIDRs `,` separated that you wish to add, e.g. `192.168.2.0/24, 192.168.3.0/24`\n\n* `custom_cidrs_label`: A custom label to apply to the custom CIDRs when you add them as IP Allow List entries, defaults to `Custom CIDR from github-ip-allow-list-action`.\n\n* `active`: A boolean that will create the IP Allow List entries in an active state (`true`) or disabled (any other value than `true`). `Optional`\n\n**At least one of `custom_cidrs` or `metadata_section` must be specified, but you can also include both together.**\n\n\n## Examples\n\nThe following invocation will add all the meta API CIDRs as separate IP Allow List entries on the enterprise `goodcorp` in a disabled state for the `actions` ecosystem.\n\n```yml\n- name: Add Actions to IP Allow List\n  uses: peter-murray/github-ip-allow-list-action@v1\n  with:\n    github_token: ${{ secrets.ENTERPRISE_ACCESS_PAT }}\n    enterprise_slug: goodcorp\n    metadata_section: actions\n    active: false\n```\n\nAdding some custom CIDRs to the allow list `192.168.2.0/24`, `192.168.3.0/24` and `10.0.1.0/24`\n\n```yml\n- name: Add Custom CIDRs to IP Allow List\n  uses: peter-murray/github-ip-allow-list-action@v1\n  with:\n    github_token: ${{ secrets.ENTERPRISE_ACCESS_PAT }}\n    enterprise_slug: goodcorp\n    custom_cidrs: |\n      192.168.2.0/24,\n      192.168.3.0/24,\n      10.0.1.0/24\n    active: false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-murray%2Fgithub-ip-allow-list-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-murray%2Fgithub-ip-allow-list-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-murray%2Fgithub-ip-allow-list-action/lists"}