Skip to content

docs(mssql): describe MSSQL issue with negative certificates#3417

Merged
mdelapenya merged 3 commits intotestcontainers:mainfrom
mdelapenya:docs-mssql
Oct 7, 2025
Merged

docs(mssql): describe MSSQL issue with negative certificates#3417
mdelapenya merged 3 commits intotestcontainers:mainfrom
mdelapenya:docs-mssql

Conversation

@mdelapenya
Copy link
Member

What does this PR do?

It documents the MSSQL issue with self-signed certificates.

Why is it important?

Improve the docs

@mdelapenya mdelapenya requested a review from a team as a code owner October 7, 2025 11:52
@mdelapenya mdelapenya added the documentation Docs, docs, docs. label Oct 7, 2025
@mdelapenya mdelapenya self-assigned this Oct 7, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 7, 2025

Warning

Rate limit exceeded

@mdelapenya has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 8ef86aa and afa0a49.

📒 Files selected for processing (1)
  • docs/modules/mssql.md (1 hunks)

Summary by CodeRabbit

  • Documentation
    • Updated MS SQL module docs with a notice about certificate validation issues caused by negative serial numbers in some MSSQL Docker images.
    • Added guidance to use GODEBUG=x509negativeserial=1 as a temporary workaround.
    • Documented the SQL Server cumulative update versions where the issue is fixed.
    • Included a warning about required EULA acceptance for container images and placed these notes before the usage section.

Walkthrough

Documentation for the MS SQL module was updated to add notes about requiring GODEBUG=x509negativeserial=1 due to negative-serial-number certificates in certain MSSQL Docker images, outline affected versions and a fix in specific SQL Server CU releases, and include a warning about EULA acceptance for container images.

Changes

Cohort / File(s) Summary
Docs: MSSQL module
docs/modules/mssql.md
Added informational blocks describing negative-serial-number certificate issue, required GODEBUG setting, affected/fixed SQL Server versions, and an EULA acceptance warning. No code changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A bunny taps the docs with care,
"Set GODEBUG right, avoid the snare!"
MSSQL certs with numbers sly,
Now footnotes tell you when and why.
EULA nodded, carrots stacked—
Ship the containers, trust intact. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and accurately summarizes the primary change by indicating that documentation has been added to describe the MSSQL negative-certificate issue, and it uses clear, specific terminology without unnecessary detail.
Description Check ✅ Passed The description directly relates to the documentation update by stating that it documents the MSSQL issue with self-signed certificates and explains why the change is important, aligning well with the actual changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Oct 7, 2025

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit afa0a49
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-go/deploys/68e5019cab0cc60008594192
😎 Deploy Preview https://deploy-preview-3417--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/modules/mssql.md (3)

17-19: Fix bare URL and show non-destructive GODEBUG example

Replace the bare URL (MD034) and add a quick example that appends to existing GODEBUG instead of overwriting.

-!!!info
-    In order to use this module, you must set the `GODEBUG=x509negativeserial=1` environment variable. See https://github.com/microsoft/mssql-docker/issues/895 for more details.
-
+!!!info
+    To use this module with Go 1.23+, set `GODEBUG=x509negativeserial=1`. See the related issue in the [mssql-docker repository](https://github.com/microsoft/mssql-docker/issues/895) for details.
+    
+    ```shell
+    # append to any existing GODEBUG flags instead of overwriting
+    export GODEBUG="${GODEBUG:+$GODEBUG,}x509negativeserial=1"
+    ```

20-26: Tighten wording and add safety note

Clarify the bullets and highlight that the flag should be limited to affected images/environments.

-This is happening because:
+This occurs because:
 - The MSSQL Docker image uses a self-signed certificate with a negative serial number
-- Go 1.23+ has stricter certificate validation that rejects certificates with negative serial numbers by default
-- The `x509negativeserial=1` flag tells Go to accept certificates with negative serial numbers
+- Go 1.23+ has stricter certificate validation that rejects certificates with negative serial numbers by default
+- The `x509negativeserial=1` flag temporarily re‑enables acceptance of such certificates
-
-The error you're seeing is a security feature in Go 1.23+ that was introduced to prevent potential certificate-related attacks. The MSSQL Docker image hasn't been updated to use certificates with positive serial numbers yet, which is why we need to use this workaround.
+Note: This stricter check in Go 1.23+ is a security hardening. Prefer using images with fixed certificates (see below). Use the GODEBUG workaround only with affected images and in test environments.

27-30: Replace bare URL; nudge users toward fixed images

Fix MD034 and point users to prefer fixed CU images to avoid GODEBUG.

-!!!info
-    This is fixed in SQL2019 CU32 and SQL2022 CU18:
-https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate18#3867855
+!!!info
+    This is fixed in SQL2019 CU32 and SQL2022 CU18 (see [SQL Server 2022 CU18 — KB 3867855](https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate18#3867855)).
+    
+    Prefer using container images based on these (or newer) CUs to avoid setting `GODEBUG`.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0139214 and 8ef86aa.

📒 Files selected for processing (1)
  • docs/modules/mssql.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/modules/mssql.md

18-18: Bare URL used

(MD034, no-bare-urls)


29-29: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (go)

@mdelapenya mdelapenya merged commit 17839ea into testcontainers:main Oct 7, 2025
15 checks passed
@mdelapenya mdelapenya deleted the docs-mssql branch October 7, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Docs, docs, docs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant