Skip to content

vscode-extensions.valentjn.vscode-ltex: drop bundled JDK, run ltex-ls on nixpkgs jdk - #577782

Merged
JohnRTitor merged 1 commit into
NixOS:masterfrom
irgolic:cacert/vscode-extensions.valentjn.vscode-ltex
Oct 24, 2026
Merged

JohnRTitor merged 1 commit into
NixOS:masterfrom
irgolic:cacert/vscode-extensions.valentjn.vscode-ltex

Conversation

@irgolic

@irgolic irgolic commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Part of #576543.

The LTeX extension for VS Code, vscode-extensions.valentjn.vscode-ltex, has a bundled JDK 11 in lib/ltex-ls-15.2.0/jdk-11.0.12+7. The package does not patch the ELF files of this JDK, thus this JDK cannot operate on NixOS. Seemingly, it's a 74MB blob that is never invoked, but contains the eMuhdra trust chain so #576543 flagged it. The package sets ltex.java.path to the nixpkgs jdk, and the extension starts ltex-ls with this JDK. This change removes the bundled JDK, and the output becomes 74 MB smaller. This change also sets the ltex-ls and ltex-cli launchers to use the nixpkgs jdk when JAVA_HOME is not set. After this change, ltex-ls --version with no JAVA_HOME shows Java 21.0.12.1.

Warning

AI Disclosure: Claude Code made the code change, the commit message and the first version of this pull request description. Claude Code used Claude Fable 5.1 and Claude Opus 5.5. I examined all of this work. Claude Code also wrote all of nix-cacert-harness. This pull request description is written in ASD-STE100 (Simplified Technical English), examined with memelint in strict mode.

Test

nix-cacert-harness examines the package before and after this change. A local copy of nixpkgs is not necessary.

nix run github:irgolic/nix-cacert-harness -- vscode-extensions.valentjn.vscode-ltex --pr 577782 --emudhra
Harness output: vscode-extensions.valentjn.vscode-ltex
$ nix run github:irgolic/nix-cacert-harness -- vscode-extensions.valentjn.vscode-ltex --base 8915027df75d0403ef013dd0cbf09ff3c602fd03 --after github:irgolic/nixpkgs/944e72d46890fa0d93c9549b7fac708d857d7188 --emudhra
[1/2] static check + eMudhra chains: offline, reproducible
base (before) = 8915027df75d0403ef013dd0cbf09ff3c602fd03
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR vscode-extensions.valentjn.vscode-ltex
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/944e72d46890fa0d93c9549b7fac708d857d7188
before ok (0 built, 1s)
        drv /nix/store/…-vscode-extension-valentjn-vscode-ltex-13.1.0.drv
after  ok (0 built, 1s)
        drv /nix/store/…-vscode-extension-valentjn-vscode-ltex-13.1.0.drv

| output:path | before | after |
|---|---|---|
| out:/share/vscode/extensions/valentjn.vscode-ltex/lib/ltex-ls-15.2.0/jdk-11.0.12+7/lib/security/cacerts | keystore 128 certs: 40 not in cacert, 17 in cacert but not for TLS, 47 cacert TLS roots missing [no-password]; scanner: AAA,ECC G3 | absent |

jar signature blocks (META-INF/*.RSA|DSA|EC: code-signing certificate chains, not trust stores; not counted; listed in static/<side>/sigblocks.tsv):
  before 0 files + 6 in archives
  after 0 files + 6 in archives

cacert in runtime closure (before): no
cacert in runtime closure (after): no
CAs trusted before but not trusted for TLS by cacert (57 total), e.g.:
  - CN=AAA Certificate Services, O=Comodo CA Limited, L=Salford, ST=Greater Manchester, C=GB
  - CN=emSign ECC Root CA - C3, O=eMudhra Inc, OU=emSign PKI, C=US
  - CN=emSign ECC Root CA - G3, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN
  - CN=emSign Root CA - C1, O=eMudhra Inc, OU=emSign PKI, C=US
  - C=DE, O=Atos, CN=Atos TrustedRoot 2011
  - CN=AffirmTrust Commercial, O=AffirmTrust, C=US
  - CN=AffirmTrust Networking, O=AffirmTrust, C=US
  - CN=AffirmTrust Premium ECC, O=AffirmTrust, C=US
  - CN=AffirmTrust Premium, O=AffirmTrust, C=US
  - CN=Autoridad de Certificacion Firmaprofesional CIF A62634068, C=ES
VERDICT vscode-extensions.valentjn.vscode-ltex: FIXED: before trusted CAs outside cacert; after: 0 store(s) == cacert, none with extra CAs

eMudhra chains (--emudhra; offline and reproducible): the 14 chains in fixtures/emudhra,
each leaf verified against each store (openssl verify -purpose sslserver, at 2026-10-23):
| output:path | before | after |
|---|---|---|
| out:/share/vscode/extensions/valentjn.vscode-ltex/lib/ltex-ls-15.2.0/jdk-11.0.12+7/lib/security/cacerts | keystore: accepted 14/14 (g3: 7/7, aaa: 7/7, noct: 2/2) | absent |
VERDICT vscode-extensions.valentjn.vscode-ltex emudhra: FIXED: before accepted 14/14 compromised eMudhra chains (g3: 7/7, aaa: 7/7, noct: 2/2); after 0/14

[2/2] live eMudhra test hosts: needs network, NOT reproducible offline
(no shims/vscode-extensions.valentjn.vscode-ltex.{nix,sh} or shims/live/vscode-extensions.valentjn.vscode-ltex.{nix,sh}: live check skipped)

The harness tests the package with the certificate chains of the eMudhra incident, from https://emudhra.we-have-a-problem.com/ (only the certificates, not the keys). Before this change, the trust store of the bundled JDK accepts all 14 chains (accepted 14/14). Thus, it accepts the eMudhra intermediate certificates through emSign ECC Root CA - G3 and through the Sectigo cross-sign by AAA Certificate Services. This change removes this trust store with the bundled JDK. ltex-ls and ltex-cli operate on the nixpkgs jdk, and cacert makes the trust store of this JDK. The output has no second part, because the bundled JDK cannot operate on NixOS.

Things done

… on nixpkgs jdk

Assisted-by: Claude Code (Claude Fable 5.1)
Assisted-by: Claude Code (Claude Opus 5.5)
@irgolic irgolic added 1.severity: security Issues which raise a security issue, or PRs that fix one and removed 1.severity: security Issues which raise a security issue, or PRs that fix one labels Oct 23, 2026
@zimbatm zimbatm mentioned this pull request Oct 23, 2026
28 of 37 tasks
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. llm-assisted Contributions that include code generation with LLMs 7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! 6.topic: vscode A free and versatile code editor that supports almost every major programming language. labels Oct 23, 2026
@JohnRTitor
JohnRTitor added this pull request to the merge queue Oct 24, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Oct 24, 2026
Merged via the queue into NixOS:master with commit abe8f15 Oct 24, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: vscode A free and versatile code editor that supports almost every major programming language. 7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants