Access problem on GitHub Organization which using IP Allowlist
Resolved 💬 14 comments Opened May 21, 2025 by powerstrong Closed Nov 25, 2025
Hello, we are testing Codex and trying to connect to our GitHub organization.
Our organization has IP allowlisting enabled on GitHub Enterprise. Despite enabling the option to bypass IPallowlist for OAuth apps, codex is unable to access our repos.
Is there any way to allow Codex access to IP Allowlisted GitHub Organization?
Or can I know your public IP ranges so that I can add IP ranges into our list?
14 Comments
I'm in the same boat, I did come across a page on there docs for action IP CIDR ranges. https://platform.openai.com/docs/actions/production#ip-egress-ranges.
I wrote a little bash script to add them via GitHub's graph API to our organization whitelist all 87 CIDRs I believe it was. We still get the "problem setting up environment" error in codex.
The script @powerstrong if you wanted to try it too just requires your token (needs org:admin) & your org name at the top
I agree that this would be a useful feature. We've reached out to enterprise support directly, but if this could be implemented in a way that supports IP restrictions in Github organizations or allows a bypass, that would be great.
Now my Codex can access to my IP allowlist enabled GitHub Org. However I'm not sure if it's because it happend to match one of my registered CIDRs, or because the ChatGPT Connector or the ChatGPT Verification app started working a day late.
@shanehughes1990 Thanks though. I will try your script if the problem occurs again.
Lol I'm still struggling over here not, we've resorted to mirrors to our personal accounts for the time being lol. I will have to try the Github openapt connector app. Thanks for the tip
Sadly Codex can't access to my GitHub right now. So it's pretty seems that in the past Codex had been included my allowlist range luckily, but not this time.
This IP allow list is vast and not guaranteed to be operated by OpenAI. If the Codex GitHub Connector app adds
0.0.0.0/0to the IP Allow list for the app (screenshot below) this would allow the app to authenticate from any IP address, while allowing us to leave existing IP address restrictions in place for other clients!Image
GitHub Organization accounts that have IP allow lists enabled, as we do, would see something like the following in their IP allow list:
!Image
@phil-hotchkiss Thanks for your answer. Do you mean I need to create my own app and add '0.0.0.0/8'? If so, how to my app links to Codex?
@powerstrong No, my suggestion is for Open AI to implement this feature. It is a native behavior of Github Apps. It seems a reasonable way for them to maintain IP address lists from within their application instead of requiring any organization using IP restrictions to manually maintain address lists that are not guaranteed to be leveraged by OpenAI.
@phil-hotchkiss After I made a test GitHub app, now I understand what you're saying. Yeah, I think that's the only way if OpenAI doesn't want to open their IP ranges.
any updates on this?
@shanehughes1990 where do i generate the GITHUB_TOKEN for organization?
@rokx it's just a PAT you generate under an account having access to modify the whitelist on the organization.
I had to create a PAT - Token (classic). New fine-grained tokens did not work. Thank you @shanehughes1990
btw: token should have admin:org or admin:enterprise roles