Skip to content

re-add invalid email cert test cases#3253

Merged
psasidhar merged 2 commits intomasterfrom
invalid-email
Mar 24, 2026
Merged

re-add invalid email cert test cases#3253
psasidhar merged 2 commits intomasterfrom
invalid-email

Conversation

@havetisyan
Copy link
Copy Markdown
Collaborator

@havetisyan havetisyan commented Mar 21, 2026

Description

after golang developers introduced the strict domain checks in the 1.25.2 release, it caused way too production incidents so they actually rolled back that change and implemented a different one.

From the 1.25.3 release:

This release addresses breakage caused by a security patch included in Go 1.25.2
and 1.24.8, which enforced overly restrictive validation on the parsing of X.509
certificates. We've removed those restrictions while maintaining the security
fix that the initial release addressed.
We apologize for any issues this may have caused.

So we're adding back our test cases with certs with invalid email address

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request restores test cases that were temporarily removed due to a breaking change in Go's X.509 certificate parsing. The Go team has since addressed the issue, making these test cases relevant again. The changes primarily involve re-introducing test cases with certificates containing invalid email addresses to ensure continued compatibility.

Highlights

  • Reintroduction of Test Cases: This PR re-adds test cases that were previously removed due to overly strict domain checks in Go 1.25.2. These checks have since been rolled back in Go 1.25.3.
  • Invalid Email Certificates: The test cases being re-added involve certificates with invalid email addresses, which are now valid again due to the Go rollback.
  • Impact of Go 1.25.2: Go 1.25.2 introduced strict domain checks that caused production incidents, leading to a rollback and a new implementation in Go 1.25.3.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request re-introduces test cases for X.509 certificates with invalid email addresses, following a relaxation of validation rules in a dependency. The changes correctly add a test case to TestExtractInstanceIdValid to verify that instance ID extraction remains functional, and another to TestExtractServicePrincipalInValid to ensure principal extraction fails as expected for role certificates with invalid emails. The additions are logical and enhance test coverage appropriately.

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
@psasidhar psasidhar merged commit 2938a89 into master Mar 24, 2026
8 checks passed
@psasidhar psasidhar deleted the invalid-email branch March 24, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants