Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Fix crash if proxy environment variables are already set #18469

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

mbg
Copy link
Member

@mbg mbg commented Jan 10, 2025

This fixes an extractor crash if any of the three environment variables are already set (existing values will be overridden). This problem was reported to us by a customer who already has HTTP_PROXY and HTTPS_PROXY set on their runner. Overriding the existing values should be the desired behaviour here, because the Dependabot proxy settings are only available if there is a private registry configuration and the Dependabot proxy was started.

I have also removed some incorrect log output in the first commit.

@Copilot Copilot bot review requested due to automatic review settings January 10, 2025 11:39
@mbg mbg requested a review from a team as a code owner January 10, 2025 11:39
@mbg mbg self-assigned this Jan 10, 2025
@github-actions github-actions bot added the C# label Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@aibaars aibaars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the quick fix!

@mbg
Copy link
Member Author

mbg commented Jan 10, 2025

CI is green and thanks for the approvals. I will run a manual test with a CodeQL bundle built using these changes in a workflow that uses the proxy to verify that works as well (I don't believe we have any automated tests for that at the moment).

@mbg
Copy link
Member Author

mbg commented Jan 10, 2025

Test result looked fine, merging.

@mbg mbg merged commit 1cba147 into main Jan 10, 2025
14 checks passed
@mbg mbg deleted the mbg/csharp/fix-crash-if-proxy-env-vars-are-already-set branch January 10, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants