René's URL Explorer Experiment


Title: Go: Support private registries via `GOPROXY` by mbg · Pull Request #19248 · github/codeql · GitHub

Open Graph Title: Go: Support private registries via `GOPROXY` by mbg · Pull Request #19248 · github/codeql

X Title: Go: Support private registries via `GOPROXY` by mbg · Pull Request #19248 · github/codeql

Description: This PR is part of work to enable private package registries to be used in Default Setup. See prior work for C#: #18029 and #18850 The existing Default Setup workflow will initialise the Dependabot package proxy, if a private package registry configuration is set. The host, port, certificate, and configurations used by the proxy are then passed to CodeQL in the analyze step. For Go, we will likely need to modify this to make these environment variables available to the autobuild step as well. The changes in this PR modify the Go extractor to recognise when the corresponding environment variables are set. If so, we use the data from those environment variables to: Construct the proxy address from the host and port and pass it to go via the HTTP_PROXY and HTTPS_PROXY environment variables. Store the certificate on disk, and pass the path to go via SSL_CERT_FILE. Identify goproxy_server configurations and use them to set an appropriate value for the GOPROXY environment variable. This has the effect that go will attempt to make requests to obtain packages to the GOPROXY servers. These will go via the Dependabot proxy configured by HTTP_PROXY and HTTPS_PROXY, which handles the needed authentication for the GOPROXY servers.

Open Graph Description: This PR is part of work to enable private package registries to be used in Default Setup. See prior work for C#: #18029 and #18850 The existing Default Setup workflow will initialise the Dependabot...

X Description: This PR is part of work to enable private package registries to be used in Default Setup. See prior work for C#: #18029 and #18850 The existing Default Setup workflow will initialise the Dependabot...

Opengraph URL: https://github.com/github/codeql/pull/19248

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:414e4786-3de5-85df-564b-90bdc3a7c835
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCD8A:2D0224:777FAA:A121EE:6A51D49C
html-safe-nonce7eaeda0cb438f21f811fc22fc3ab521e6eeab08406a33bd304053046335cc05f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDhBOjJEMDIyNDo3NzdGQUE6QTEyMUVFOjZBNTFENDlDIiwidmlzaXRvcl9pZCI6IjE3MzM0NTI2ODkzOTQ3NTA2MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca4a1b8095bce4c9c1fe6c57690eaa494011bc935c61fca07149c394409244244
hovercard-subject-tagpull_request:2445592238
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql/pull/19248/files
twitter:imagehttps://avatars.githubusercontent.com/u/278086?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/278086?s=400&v=4
og:image:altThis PR is part of work to enable private package registries to be used in Default Setup. See prior work for C#: #18029 and #18850 The existing Default Setup workflow will initialise the Dependabot...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql git https://github.com/github/codeql.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id143040428
octolytics-dimension-repository_nwogithub/codeql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143040428
octolytics-dimension-repository_network_root_nwogithub/codeql
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/19248/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F19248%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F19248%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/19248/files
Reloadhttps://github.com/github/codeql/pull/19248/files
Reloadhttps://github.com/github/codeql/pull/19248/files
Please reload this pagehttps://github.com/github/codeql/pull/19248/files
github https://github.com/github
codeqlhttps://github.com/github/codeql
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql
Fork 2k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Star 9.8k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Code https://github.com/github/codeql
Issues 987 https://github.com/github/codeql/issues
Pull requests 428 https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality 0 https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Code https://github.com/github/codeql
Issues https://github.com/github/codeql/issues
Pull requests https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
mbghttps://github.com/mbg
mainhttps://github.com/github/codeql/tree/main
mbg/go/private-registrieshttps://github.com/github/codeql/tree/mbg/go/private-registries
Conversation 13 https://github.com/github/codeql/pull/19248
Findings https://github.com/github/codeql/pull/19248/findings
Commits 9 https://github.com/github/codeql/pull/19248/commits
Checks 0 https://github.com/github/codeql/pull/19248/checks
Files changed https://github.com/github/codeql/pull/19248/files
Please reload this pagehttps://github.com/github/codeql/pull/19248/files
Go: Support private registries via GOPROXY https://github.com/github/codeql/pull/19248/files#top
Show all changes 9 commits https://github.com/github/codeql/pull/19248/files
ded27bc Go: Replace `exec.Command("go"` with `toolchain.GoCommand(` mbg Apr 7, 2025 https://github.com/github/codeql/pull/19248/commits/ded27bcee45adf55f1c97a2f1b36af4c02fa1201
0f78e11 Go: Detect and apply proxy settings (WIP) mbg Apr 8, 2025 https://github.com/github/codeql/pull/19248/commits/0f78e11376315a15a62375e535313851e16cd66e
e210be7 Go: Preserve environment variables in `ApplyProxyEnvVars` mbg Apr 8, 2025 https://github.com/github/codeql/pull/19248/commits/e210be7bb29b79f1005821ce832dd789ac5fd458
cafe1ef Go: Refactor `ApplyProxyEnvVars` mbg Apr 25, 2025 https://github.com/github/codeql/pull/19248/commits/cafe1efefa9c85da7df8d53a61641b15b3fe0ac0
e805d1e Merge remote-tracking branch 'origin/main' into mbg/go/private-regist… mbg Apr 25, 2025 https://github.com/github/codeql/pull/19248/commits/e805d1ee904a45358b651a5e5cbca5d781265ecb
9cfa451 Go: Fix/improve comment about environment variable preservation mbg Apr 25, 2025 https://github.com/github/codeql/pull/19248/commits/9cfa4514772c252d39b17a28f23dc928672383f7
5172a4d Go: Remove check from `getEnvVars` mbg Apr 25, 2025 https://github.com/github/codeql/pull/19248/commits/5172a4d6ec381ae3e6e4453da3b0b2907e83ac2a
91a7944 Go: Change "Unable" to "Failed" for consistency mbg Apr 25, 2025 https://github.com/github/codeql/pull/19248/commits/91a794433ae8d5dafb5bab604fdeef61d64e61f0
7592ce4 Go: Restore `parseRegistryConfigsFail` test for the empty string mbg Apr 25, 2025 https://github.com/github/codeql/pull/19248/commits/7592ce47e3cb2ba4ccfb9cc75a975ee6047fb245
Clear filters https://github.com/github/codeql/pull/19248/files
Please reload this pagehttps://github.com/github/codeql/pull/19248/files
Please reload this pagehttps://github.com/github/codeql/pull/19248/files
go-autobuilder.go https://github.com/github/codeql/pull/19248/files#diff-595f1f9802e011faa620466f247e0b4b486b81529df287c34c224ef5258106b3
toolchain.go https://github.com/github/codeql/pull/19248/files#diff-ea262bcda766399afa1352f9f99dab5b1b5f9cab3b41658ff6f5ac085501b285
BUILD.bazel https://github.com/github/codeql/pull/19248/files#diff-54fc343d50f74ca15062e4b6531165b0bd9bcc8e7e8a9eba2fb2851985a71f8d
registryproxy.go https://github.com/github/codeql/pull/19248/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
registryproxy_test.go https://github.com/github/codeql/pull/19248/files#diff-857faf8f637ade28c92af900a1de7889fe0a55f77e1abf95bc5c5ea12357ec3f
https://github.com/github/codeql/blob/main/CODEOWNERS#L13
go/extractor/cli/go-autobuilder/go-autobuilder.gohttps://github.com/github/codeql/pull/19248/files#diff-595f1f9802e011faa620466f247e0b4b486b81529df287c34c224ef5258106b3
View file https://github.com/github/codeql/blob/7592ce47e3cb2ba4ccfb9cc75a975ee6047fb245/go/extractor/cli/go-autobuilder/go-autobuilder.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19248/{{ revealButtonHref }}
https://github.com/github/codeql/pull/19248/files#diff-595f1f9802e011faa620466f247e0b4b486b81529df287c34c224ef5258106b3
https://github.com/github/codeql/pull/19248/files#diff-595f1f9802e011faa620466f247e0b4b486b81529df287c34c224ef5258106b3
https://github.com/github/codeql/pull/19248/files#diff-595f1f9802e011faa620466f247e0b4b486b81529df287c34c224ef5258106b3
https://github.com/github/codeql/pull/19248/files#diff-595f1f9802e011faa620466f247e0b4b486b81529df287c34c224ef5258106b3
https://github.com/github/codeql/blob/main/CODEOWNERS#L13
go/extractor/toolchain/toolchain.gohttps://github.com/github/codeql/pull/19248/files#diff-ea262bcda766399afa1352f9f99dab5b1b5f9cab3b41658ff6f5ac085501b285
View file https://github.com/github/codeql/blob/7592ce47e3cb2ba4ccfb9cc75a975ee6047fb245/go/extractor/toolchain/toolchain.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19248/{{ revealButtonHref }}
https://github.com/github/codeql/pull/19248/files#diff-ea262bcda766399afa1352f9f99dab5b1b5f9cab3b41658ff6f5ac085501b285
https://github.com/github/codeql/pull/19248/files#diff-ea262bcda766399afa1352f9f99dab5b1b5f9cab3b41658ff6f5ac085501b285
https://github.com/github/codeql/pull/19248/files#diff-ea262bcda766399afa1352f9f99dab5b1b5f9cab3b41658ff6f5ac085501b285
https://github.com/github/codeql/pull/19248/files#diff-ea262bcda766399afa1352f9f99dab5b1b5f9cab3b41658ff6f5ac085501b285
https://github.com/github/codeql/pull/19248/files#diff-ea262bcda766399afa1352f9f99dab5b1b5f9cab3b41658ff6f5ac085501b285
https://github.com/github/codeql/blob/main/CODEOWNERS#L13
go/extractor/util/BUILD.bazelhttps://github.com/github/codeql/pull/19248/files#diff-54fc343d50f74ca15062e4b6531165b0bd9bcc8e7e8a9eba2fb2851985a71f8d
View file https://github.com/github/codeql/blob/7592ce47e3cb2ba4ccfb9cc75a975ee6047fb245/go/extractor/util/BUILD.bazel
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql/pull/19248/files
https://github.com/github/codeql/blob/main/CODEOWNERS#L13
go/extractor/util/registryproxy.gohttps://github.com/github/codeql/pull/19248/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
View file https://github.com/github/codeql/blob/7592ce47e3cb2ba4ccfb9cc75a975ee6047fb245/go/extractor/util/registryproxy.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19248/{{ revealButtonHref }}
owen-mchttps://github.com/owen-mc
Apr 25, 2025https://github.com/github/codeql/pull/19248/files#r2060161920
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/19248/files
mbghttps://github.com/mbg
Apr 25, 2025https://github.com/github/codeql/pull/19248/files#r2060382443
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/codeql/pull/19248/files
https://github.com/github/codeql/blob/main/CODEOWNERS#L13
go/extractor/util/registryproxy_test.gohttps://github.com/github/codeql/pull/19248/files#diff-857faf8f637ade28c92af900a1de7889fe0a55f77e1abf95bc5c5ea12357ec3f
View file https://github.com/github/codeql/blob/7592ce47e3cb2ba4ccfb9cc75a975ee6047fb245/go/extractor/util/registryproxy_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/19248/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.