Skip to content

Commit 7385797

Browse files
tofikwestclaude
andcommitted
fix(ci): replace broken sslcom/esigner-codesign action with direct CodeSignTool invocation
The sslcom/esigner-codesign GitHub Action (both @develop and @v1.3.2) has a bug where it fails to pass -username and -password flags to the CodeSignTool CLI. Replaced with direct download and invocation of CodeSignTool v1.3.0 via PowerShell. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5f35e35 commit 7385797

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed

.github/workflows/device-agent-release.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -179,24 +179,38 @@ jobs:
179179
AUTO_UPDATE_URL: ${{ needs.detect-version.outputs.auto_update_url }}
180180
run: bun run package:win
181181

182-
- name: Setup SSL.com eSigner CodeSignTool
183-
uses: sslcom/esigner-codesign@v1.3.2
182+
- name: Setup Java for CodeSignTool
183+
uses: actions/setup-java@v4
184184
with:
185-
command: get_credential_ids
186-
username: ${{ secrets.ESIGNER_USERNAME }}
187-
password: ${{ secrets.ESIGNER_PASSWORD }}
188-
totp_secret: ${{ secrets.ESIGNER_TOTP_SECRET }}
185+
distribution: 'corretto'
186+
java-version: '11'
189187

190-
- name: Sign Windows EXE with SSL.com eSigner
191-
uses: sslcom/esigner-codesign@v1.3.2
192-
with:
193-
command: sign
194-
username: ${{ secrets.ESIGNER_USERNAME }}
195-
password: ${{ secrets.ESIGNER_PASSWORD }}
196-
credential_id: ${{ secrets.ESIGNER_CREDENTIAL_ID }}
197-
totp_secret: ${{ secrets.ESIGNER_TOTP_SECRET }}
198-
file_path: ${{ github.workspace }}/packages/device-agent/release
199-
override: true
188+
- name: Sign Windows EXE with SSL.com CodeSignTool
189+
shell: powershell
190+
working-directory: packages/device-agent/release
191+
env:
192+
ESIGNER_USERNAME: ${{ secrets.ESIGNER_USERNAME }}
193+
ESIGNER_PASSWORD: ${{ secrets.ESIGNER_PASSWORD }}
194+
ESIGNER_CREDENTIAL_ID: ${{ secrets.ESIGNER_CREDENTIAL_ID }}
195+
ESIGNER_TOTP_SECRET: ${{ secrets.ESIGNER_TOTP_SECRET }}
196+
run: |
197+
# Download and extract CodeSignTool
198+
Invoke-WebRequest -Uri "https://github.com/SSLcom/CodeSignTool/releases/download/v1.3.0/CodeSignTool-v1.3.0-windows.zip" -OutFile "codesigntool.zip"
199+
Expand-Archive -Path "codesigntool.zip" -DestinationPath "codesigntool"
200+
$cstDir = Get-ChildItem -Path "codesigntool" -Directory | Select-Object -First 1
201+
202+
# Sign each .exe file
203+
Get-ChildItem -Filter "*.exe" | ForEach-Object {
204+
Write-Host "Signing $($_.Name)..."
205+
& "$($cstDir.FullName)\CodeSignTool.bat" sign `
206+
-username="$env:ESIGNER_USERNAME" `
207+
-password="$env:ESIGNER_PASSWORD" `
208+
-credential_id="$env:ESIGNER_CREDENTIAL_ID" `
209+
-totp_secret="$env:ESIGNER_TOTP_SECRET" `
210+
-input_file_path="$($_.FullName)" `
211+
-override="true"
212+
Write-Host "Signed $($_.Name) successfully"
213+
}
200214
201215
- name: Recalculate latest.yml hash after signing
202216
shell: bash

packages/device-agent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@comp/device-agent",
33
"version": "1.0.0",
4-
"description": "Comp AI Device Compliance Agent - Device Compliance Checks",
4+
"description": "Comp AI Device Agent - Endpoint Compliance",
55
"author": "Comp AI <hello@trycomp.ai>",
66
"homepage": "https://trycomp.ai",
77
"private": true,

0 commit comments

Comments
 (0)