Repository navigation
fix(security): prevent SSRF in GitHub OIDC token URL handling (CWE-918) - #2106
Merged
Erik Osterman (Cloud Posse) (osterman) merged 8 commits intoMar 2, 2026
Merged
Erik Osterman (Cloud Posse) (osterman) merged 8 commits into
Erik Osterman (Cloud Posse) (osterman) merged 8 commits into
Conversation
Validate ACTIONS_ID_TOKEN_REQUEST_URL before making HTTP requests in the GitHub OIDC, Azure OIDC, and Atmos Pro API client code paths. - Require https:// scheme (reject http://) - Require non-empty hostname - Use proper url.Parse + query manipulation instead of string concatenation in pkg/pro/api_client.go - Add injectable HTTP client to oidcProvider in pkg/auth/providers/github and variadic client support in pkg/pro/api_client.go for testability - Update all affected tests to use httptest.NewTLSServer and inject TLS-aware clients - Add TestValidateGitHubActionsURL and TestGetGitHubOIDCToken_URLValidation unit tests to cover the new validation logic Co-authored-by: nitrocode <[email protected]>
Co-authored-by: nitrocode <[email protected]>
Copilot
AI
changed the title
[WIP] Fix code scanning issue according to CLAUDE.md
fix(security): prevent SSRF in GitHub OIDC token URL handling (CWE-918)
Feb 24, 2026
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2106 +/- ##
==========================================
+ Coverage 76.51% 76.53% +0.01%
==========================================
Files 832 832
Lines 79407 79441 +34
==========================================
+ Hits 60758 60797 +39
+ Misses 14856 14852 -4
+ Partials 3793 3792 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Member
|
Copilot can you address the missing tests?
pkg/auth/providers/azure/oidc.go 0.00% 2 Missing and 2 partials |
Erik Osterman (Cloud Posse) (osterman)
marked this pull request as ready for review
February 26, 2026 18:27
Erik Osterman (Cloud Posse) (osterman)
requested a review
from a team
as a code owner
February 26, 2026 18:27
…providers - Add TestOIDCProvider_FetchGitHubActionsToken_URLValidation for azure (http scheme and empty hostname cases) covering the two new error return paths in fetchGitHubActionsToken - Add TestOIDCProvider_getHTTPClient for github to cover both branches of getHTTPClient (default &http.Client and injected custom client) - Add TestOIDCProvider_Authenticate_URLValidation for github to cover the validateGitHubActionsURL error return path in requestParams Coverage improvements: github/oidc.go: getHTTPClient 66.7%→100%, requestParams 76.9%→84.6% azure/oidc.go: fetchGitHubActionsToken 87.2%→92.3% Co-authored-by: osterman <[email protected]>
Contributor
Author
... Added coverage for the missing branches in commit 9f311a0:
|
Erik Osterman (Cloud Posse) (osterman)
enabled auto-merge (squash)
February 26, 2026 21:17
Erik Osterman (Cloud Posse) (osterman)
approved these changes
Feb 26, 2026
Erik Osterman (Cloud Posse) (osterman)
deleted the
copilot/fix-code-scanning-issue-5164
branch
March 2, 2026 02:30
|
These changes were released in v1.208.0. |
Igor Rodionov (goruha)
added a commit
that referenced
this pull request
Mar 9, 2026
…raform-plan * osterman/native-ci-terraform: (28 commits) feat: Add source cache TTL for JIT-vendored components (#2138) feat: Per-target version overrides in vendor manifests (#2141) docs: Add PRD for browser-based auth in aws/user identity (#1887) docs: Add EKS kubeconfig authentication integration PRD (#1884) fix: correct marketplace.json schema and update docs with install/uninstall commands (#2142) fix: propagate auth to all YAML functions in multi-component execution (#2140) fix: Use atmos_component for source provisioner workdir paths (#2137) Fix identity prompts to respect --interactive flag (#2130) Increase PR size thresholds to accommodate AI-assisted development (#2136) docs: Add Azure authentication provider documentation (#2132) fix: propagate component-type level dependencies through stack processor (#2127) fix: Add retry and missing workflow step properties to all schema copies (#2113) Exclude unsupported windows/arm from goreleaser build matrix (#2133) Add AI Agent Skills for LLM-Powered Infrastructure Development (#2121) Fix: Convert toolchain paths to absolute in PATH to resolve exec.LookPath failures (#2095) Fix workdir collision for component instances sharing base component (#2093) fix(auth): propagate TTY state to subprocesses for SSO device flow in workflows (#2126) fix(security): prevent SSRF in GitHub OIDC token URL handling (CWE-918) (#2106) Fix #2112: add workflow_retry definition and retry property to workflow step schema (#2114) fix(auth): auto-detect GitHub Actions WIF with proper audience, host validation, and lazy GSM init (#2109) ...
|
These changes were released in v1.208.1-test.9. |
|
These changes were released in v1.208.1-test.10. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pkg/auth/providers/github/oidc.go- addvalidateGitHubActionsURLhelper, injectable HTTP clientpkg/auth/providers/azure/oidc.go- add scheme + hostname validation infetchGitHubActionsTokenpkg/pro/api_client.go- add URL validation, proper URL query manipulation, variadic client injectionpkg/auth/providers/github/oidc_test.go- use TLS server, inject clientpkg/auth/providers/azure/oidc_test.go- use TLS server, inject clientpkg/pro/api_client_test.go- use TLS server, inject client viaoidcHTTPClientOverridepkg/pro/api_client_get_github_oidc_token_test.go- use TLS server, https URL for network testTestValidateGitHubActionsURLunit testsTestGetGitHubOIDCToken_URLValidationunit testsTestOIDCProvider_FetchGitHubActionsToken_URLValidation(azure) - cover http scheme and empty host error pathsTestOIDCProvider_getHTTPClient(github) - cover both branches of getHTTPClientTestOIDCProvider_Authenticate_URLValidation(github) - cover validateGitHubActionsURL error path in requestParams💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.