fix(jetbrains): use file-based signing secrets for bundled publish workflow - #12570
Merged
Merged
Conversation
…rkflow Passing the JETBRAINS_CERTIFICATE_CHAIN / JETBRAINS_PRIVATE_KEY multiline secret content directly as certificateChain/privateKey Gradle properties gets mishandled by the zip-signer CLI when signPlugin and verifyPluginSignature run as separate Gradle invocations (#12567), causing verifyPluginSignature to fail with 'Invalid argument: ***' as the masked multiline content is split into extra CLI args. Mirror script/build-version.sh: write the certificate chain and private key to temp files under $RUNNER_TEMP and wire certificateChainFile/privateKeyFile (file-based) into the intellij signing extension instead of certificateChain/privateKey (raw content). Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Reviewed the file-based signing secret rewiring in both the workflow (temp-file write/cleanup, permission handling, env var propagation via Files Reviewed (2 files)
Reviewed by claude-sonnet-5 · Input: 26 · Output: 8.5K · Cached: 532.7K Review guidance: REVIEW.md from base branch |
johnnyeric
approved these changes
Jul 27, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
…-publish-signing-file-vars fix(jetbrains): use file-based signing secrets for bundled publish workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
#12567 (51d6603) split the JetBrains bundled publish workflow's Gradle build into separate
./gradlewinvocations forbuildPlugin,signPlugin,verifyPluginSignature, andverifyPluginto fix a Gradle 9 task-dependency issue between:signPluginand:verifyPluginSignature.After that split,
verifyPluginSignaturestarted failing in its own invocation with:Failed run: https://github.com/Kilo-Org/kilocode/actions/runs/30278909051
The workflow was passing
JETBRAINS_CERTIFICATE_CHAIN/JETBRAINS_PRIVATE_KEY(multiline PEM secrets) directly into the intellij-platform-gradle-plugin'scertificateChain/privateKeyProperty<String>config, which the zip-signer CLI wiring can mishandle — the masked multiline content ends up split into extra CLI arguments — whenverifyPluginSignatureruns as its own Gradle invocation instead of sharing a task graph withsignPlugin.packages/kilo-jetbrains/script/build-version.sh(used for local releases) avoids this by writing the secrets to temp files and exportingJETBRAINS_CERTIFICATE_CHAIN_FILE/JETBRAINS_PRIVATE_KEY_FILE/JETBRAINS_PRIVATE_KEY_PASSWORDinstead, butbuild.gradle.ktsnever actually wired those*_FILEvariables into the signing extension — it only read the raw-contentJETBRAINS_CERTIFICATE_CHAIN/JETBRAINS_PRIVATE_KEYenv vars.Fix
packages/kilo-jetbrains/build.gradle.kts: wiresigning.certificateChainFile/signing.privateKeyFile(file-based, viafileProvider(...)) fromJETBRAINS_CERTIFICATE_CHAIN_FILE/JETBRAINS_PRIVATE_KEY_FILEinstead of the raw-contentcertificateChain/privateKeyproperties. This makes the localbuild-version.shflow and CI consistent, and avoids ever passing multiline secret content as a CLI-facing value..github/workflows/publish-jetbrains-bundled.yml: writeJETBRAINS_CERTIFICATE_CHAIN/JETBRAINS_PRIVATE_KEYto mode-600 temp files under$RUNNER_TEMP/jetbrains-signing(dir mode 700) before the Gradle build step, export the*_FILEenv vars via$GITHUB_ENVso they're available to every subsequent./gradlewinvocation (signPlugin,verifyPluginSignature,verifyPlugin), and remove the temp files in anif: always()cleanup step. No secret values are printed to logs.Validation
bun run script/check-workflows.ts— passesgit diff --check -- .github/workflows/publish-jetbrains-bundled.yml— cleancertificateChainFile/privateKeyFile/fileProvider(Provider<File>)API against theorg.jetbrains.intellij.platformGradle plugin (2.17.0)Signingextension source and the Gradle 9RegularFilePropertyJavadoc../gradlew typecheck/ a full Gradle build in this sandbox — the sandbox's outbound network path fails TLS certificate validation when Gradle tries to download its distribution (PKIX path building failed), unrelated to this change. Recommend running./gradlew typecheckfrompackages/kilo-jetbrains/in CI/locally before merge as a final check.Re-dispatch after merge
Built for Kirill Kalishev by Kilo for Slack