René's URL Explorer Experiment


Title: Go: Support `git_source` by mbg · Pull Request #20368 · github/codeql · GitHub

Open Graph Title: Go: Support `git_source` by mbg · Pull Request #20368 · github/codeql

X Title: Go: Support `git_source` by mbg · Pull Request #20368 · github/codeql

Description: This PR modifies the Go autobuilder/extractor to support git_source private registry configurations, in addition to the goproxy_server configurations that were already supported. In github/codeql-action#3079, we modified the CodeQL Action so that git_source configurations are now propagated to the Go autobuilder/extractor. With the changes in this PR, if a git_source configuration is provided, we set GOPRIVATE to include a pattern for the hostname provided in the configuration. The GOPRIVATE variable instructs go which packages should not be fetched via a GOPROXY (whether it's the default one or a custom one). For example, if the git_source configuration is for https://github.com/foo, then we'd set GOPRIVATE=github.com/foo*. This is a simplification of what is necessary for GOPRIVATE, because Go modules may not have the same name as the address of the repository that contains them. Ideally, we would make GOPRIVATE configurable somehow, possibly using a go.env file in the repository or similar. However, for initially supporting this, the behaviour here should be sufficient. If a git_source is configured, we also configure git on the runner to use the self-signed proxy certificate. Otherwise, it will refuse to connect.

Open Graph Description: This PR modifies the Go autobuilder/extractor to support git_source private registry configurations, in addition to the goproxy_server configurations that were already supported. In github/codeql-a...

X Description: This PR modifies the Go autobuilder/extractor to support git_source private registry configurations, in addition to the goproxy_server configurations that were already supported. In github/codeql-a...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:794f1bb6-34ac-1beb-5a3f-c4cf9af1597b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA388:2FCF6D:315F2B:46561A:6A54814F
html-safe-noncee19b273caaf9ca4ef32857298e759df652e29334f804029290c3c6294c6c14c4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzg4OjJGQ0Y2RDozMTVGMkI6NDY1NjFBOjZBNTQ4MTRGIiwidmlzaXRvcl9pZCI6IjMzOTAxMjgxODk0MzUzMTQ1MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2194430bd7df19e7a68980b44c65195de4ea9149e7ca59891394d7d7fefd8a3f
hovercard-subject-tagpull_request:2799785939
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/20368/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 modifies the Go autobuilder/extractor to support git_source private registry configurations, in addition to the goproxy_server configurations that were already supported. In github/codeql-a...
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
release6d28624802c2f7d9500239dd6870ed7031b7353b
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/20368/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F20368%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%2F20368%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/20368/files
Reloadhttps://github.com/github/codeql/pull/20368/files
Reloadhttps://github.com/github/codeql/pull/20368/files
Please reload this pagehttps://github.com/github/codeql/pull/20368/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 988 https://github.com/github/codeql/issues
Pull requests 430 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/support-git-sourcehttps://github.com/github/codeql/tree/mbg/go/support-git-source
Conversation 3 https://github.com/github/codeql/pull/20368
Findings https://github.com/github/codeql/pull/20368/findings
Commits 7 https://github.com/github/codeql/pull/20368/commits
Checks 7 https://github.com/github/codeql/pull/20368/checks
Files changed https://github.com/github/codeql/pull/20368/files
Please reload this pagehttps://github.com/github/codeql/pull/20368/files
Go: Support git_source https://github.com/github/codeql/pull/20368/files#top
Show all changes 7 commits https://github.com/github/codeql/pull/20368/files
711d497 Improve logging to include proxy vars mbg Sep 5, 2025 https://github.com/github/codeql/pull/20368/commits/711d49770f878f62031ee352058789af6cabf594
23a0461 Set lower-case variants of `HTTP_PROXY` and `HTTPS_PROXY` mbg Sep 4, 2025 https://github.com/github/codeql/pull/20368/commits/23a04613c08ef2c5ef75309c4336c4561321461b
895399f Rename `proxy_configs` to `goproxy_servers` and only store URLs mbg Sep 4, 2025 https://github.com/github/codeql/pull/20368/commits/895399ff0569686e0b7995e7fadc7ab82e811716
a8fa1a7 Use `git_source` configurations for `GOPRIVATE` mbg Sep 4, 2025 https://github.com/github/codeql/pull/20368/commits/a8fa1a76c482146e9cc59c1d58309e6c0eb02f90
4ef8ff9 Append `*` to `git_source` URL if not present mbg Sep 5, 2025 https://github.com/github/codeql/pull/20368/commits/4ef8ff9a0fe87940510a2dffe2e1defdfd64c5f2
bc38b79 Convert URLs to expected format mbg Sep 5, 2025 https://github.com/github/codeql/pull/20368/commits/bc38b79c9a185d589e16f38f634f878d2995c029
8c84992 Configure `git` to use the certificate, if needed mbg Sep 4, 2025 https://github.com/github/codeql/pull/20368/commits/8c8499229d3dd32440a39909b069235dbbd21e83
Clear filters https://github.com/github/codeql/pull/20368/files
Please reload this pagehttps://github.com/github/codeql/pull/20368/files
Please reload this pagehttps://github.com/github/codeql/pull/20368/files
registryproxy.go https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
registryproxy_test.go https://github.com/github/codeql/pull/20368/files#diff-857faf8f637ade28c92af900a1de7889fe0a55f77e1abf95bc5c5ea12357ec3f
https://github.com/github/codeql/blob/main/CODEOWNERS#L13
go/extractor/util/registryproxy.gohttps://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
View file https://github.com/github/codeql/blob/8c8499229d3dd32440a39909b069235dbbd21e83/go/extractor/util/registryproxy.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/20368/{{ revealButtonHref }}
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/pull/20368/files#diff-4d389f9082168ed8a41bedf1fbd3febe96d812439f370a2ca2b9146dd40619c9
https://github.com/github/codeql/blob/main/CODEOWNERS#L13
go/extractor/util/registryproxy_test.gohttps://github.com/github/codeql/pull/20368/files#diff-857faf8f637ade28c92af900a1de7889fe0a55f77e1abf95bc5c5ea12357ec3f
View file https://github.com/github/codeql/blob/8c8499229d3dd32440a39909b069235dbbd21e83/go/extractor/util/registryproxy_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/20368/{{ revealButtonHref }}
https://github.com/github/codeql/pull/20368/files#diff-857faf8f637ade28c92af900a1de7889fe0a55f77e1abf95bc5c5ea12357ec3f
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.