Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
c511374
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 14, 2026
6f53a4f
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 15, 2026
09af2ef
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 15, 2026
a8e8522
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 16, 2026
3442ae3
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 16, 2026
a38261a
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 16, 2026
bab848a
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
f8d98c7
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
1f96401
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 19, 2026
d5a4c55
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 21, 2026
4cfd735
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 24, 2026
a2d07e2
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 25, 2026
6536646
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 25, 2026
6bad168
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 27, 2026
d154335
Merge remote-tracking branch 'origin/release/v11.2.2' into backlog/co…
elmilan06 Jan 27, 2026
6f93bfd
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 27, 2026
49ff25c
feat: Add new ControlConfig creation component for SQL‑based complian…
elmilan06 Jan 27, 2026
ab0d4c3
Merge remote-tracking branch 'origin/release/v11.2.2' into backlog/co…
elmilan06 Jan 27, 2026
7f7d0ea
Merge remote-tracking branch 'origin/backlog/compliance-evaluation' i…
elmilan06 Jan 27, 2026
f36a597
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
3a27ff1
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 17, 2026
c2ca1ad
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 27, 2026
bde728f
feat: add compliance control and query configuration tables with rela…
elmilan06 Jan 27, 2026
44a56ae
feat: enhance compliance control configuration with section mapping a…
elmilan06 Jan 27, 2026
2d31b90
feat: Revert unnecessary changes
elmilan06 Jan 27, 2026
8d5cf6c
feat: enhance compliance control configuration with section mapping a…
elmilan06 Jan 28, 2026
e14c2a6
Merge remote-tracking branch 'origin/backlog/compliance-evaluation' i…
elmilan06 Jan 28, 2026
bde1081
feat: refactor compliance query form and related components for impro…
elmilan06 Jan 28, 2026
b8a60d6
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Jan 28, 2026
610552f
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Feb 4, 2026
94a84f5
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Feb 15, 2026
2c44b06
feat: provide endpoint for OpenSearch evaluations including latest ev…
elmilan06 Feb 25, 2026
07cc80a
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Mar 10, 2026
3b39ba3
feat: provide endpoint for OpenSearch evaluations including latest ev…
elmilan06 Mar 12, 2026
dc67353
feat: refactor compliance evaluation classes and update related mappings
elmilan06 Mar 13, 2026
004eaac
feat: implement compliance orchestrator backend client and evaluation…
elmilan06 Mar 13, 2026
16ab4b4
feat: refactor compliance evaluation classes and update related mappings
elmilan06 Mar 13, 2026
1467cff
feat: implement timeline visualization for compliance evaluations wit…
elmilan06 Feb 25, 2026
1e4b6d6
feat: implement timeline visualization for compliance evaluations wit…
elmilan06 Feb 26, 2026
75842a8
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 5, 2026
331849d
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 9, 2026
b31b8c6
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 13, 2026
2a3489f
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 16, 2026
4266061
feat: implement timeline visualization for compliance evaluations
elmilan06 Mar 17, 2026
a3d3d20
feat: enrich compliance evaluation details with rule, rule value, and…
elmilan06 Mar 19, 2026
475bd96
feat: enhance compliance control evaluation with pagination support
elmilan06 Mar 17, 2026
467ebdf
feat: extend control evaluation status with additional states and ref…
elmilan06 Mar 19, 2026
2d0baf9
feat: add evaluation rule and rule value to compliance evaluation DTO…
elmilan06 Mar 19, 2026
6102281
feat: include evaluation rule and rule value in query evaluation mode…
elmilan06 Mar 19, 2026
a904030
feat: enhance compliance control evaluation with search functionality
elmilan06 Mar 23, 2026
01e597a
feat: update application version file path for consistency
elmilan06 Mar 23, 2026
8ecf6b4
fix: implement sorting logic for compliance evaluations
elmilan06 Mar 24, 2026
88d0d7d
feat(agent): add native auditd collector for Linux
yllada Mar 27, 2026
527d744
feat(filters): add auditd support to linux filter v5.0.0
yllada Mar 27, 2026
f77ef28
refactor(filters): remove deprecated system_linux_module.yml
yllada Mar 27, 2026
c2aba9e
fix(filters): adjust auditd event severity handling in linux filter
yllada Mar 27, 2026
83eed3e
chore(agent): update version to 11.1.5
yllada Mar 27, 2026
7dbdce3
changeset[backend](linux): update linux filter
AlexSanchez-bit Mar 27, 2026
5b7cc19
fix(agent): prevent auditd buffer overflow with backpressure mitigation
yllada Mar 27, 2026
6cb6c41
fix(agent): reduce auditd log noise with threshold and execve filter
yllada Mar 30, 2026
272d2fa
fix(agent): filter false events lost from go-libaudit sequence rollover
yllada Mar 30, 2026
fbbb1af
feat(agent): expand auditd rules with log tampering and identity files
yllada Mar 30, 2026
2cf64e0
feat[backend](agent): added shell parameter to agent connection
AlexSanchez-bit Mar 30, 2026
ce1b932
feat[frontend](agent-console): added shell switch for windows agents …
AlexSanchez-bit Mar 30, 2026
8b9dc72
fix[backend](elastic-service): added space verification before removi…
AlexSanchez-bit Mar 31, 2026
5afe131
fix[backend](index-removal): added index verification before removal
AlexSanchez-bit Mar 31, 2026
95f9557
fix[backend](index-removal): fixed index state field obtention
AlexSanchez-bit Mar 31, 2026
fe5dde4
fix[backend](index-removal): fixed compilation errors on index removal
AlexSanchez-bit Mar 31, 2026
b62f094
changeset[backend](o365_visualization): updated o365 file upload visu…
AlexSanchez-bit Mar 31, 2026
c9a728e
changeset[backend](o365_visualization): updated o365 file sync downlo…
AlexSanchez-bit Mar 31, 2026
d56444b
changeset[backend](o365_visualization): updated o365 visualizations
AlexSanchez-bit Mar 31, 2026
71d2014
update windows-events filter
JocLRojas Apr 1, 2026
d1f96c6
feat[backend](dependencies): updated apache-tika to avoid vulnerable …
AlexSanchez-bit Apr 1, 2026
7eacc76
feat[backend](dependencies): updated flying-saucer-pdf dependency and…
AlexSanchez-bit Apr 1, 2026
109664b
fix(installer): enhance post-installation error handling and Docker s…
osmontero Apr 1, 2026
3ecb0c0
changeset[backend](windows_filter): updated windows filters
AlexSanchez-bit Apr 1, 2026
9bcca5a
changeset[backend](windows_rules): updated windows rules
AlexSanchez-bit Apr 1, 2026
f4936ec
feat[frotend](dependencies): updated dependencies for security improves
AlexSanchez-bit Apr 1, 2026
cca333e
changeset[backend](windows_rules): updated windows rules data types
AlexSanchez-bit Apr 1, 2026
a1a0342
fix(installer): security improvements and code cleanup
Kbayero Apr 2, 2026
cd79a09
feat(security): add OpenSearch SSL and authentication support
Kbayero Apr 2, 2026
909508e
feat[backend](updated filters and rules): added a initial process to …
AlexSanchez-bit Apr 2, 2026
3af0ef3
feat: add endpoint to retrieve latest evaluation by control ID
elmilan06 Apr 3, 2026
0c8f193
feat: enhance compliance evaluation mappers to load full Standard object
elmilan06 Apr 3, 2026
0baab17
feat(soc-ai): add multi-provider LLM support and HTTP API for manual …
Kbayero Apr 3, 2026
1f7443f
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 3, 2026
2145c70
feat(backend): add filters and rules to backend docker image
Kbayero Apr 3, 2026
ea7d894
fix(backend): update OpenSearch connection to use HTTPS with authenti…
Kbayero Apr 3, 2026
c779bd5
feat(panel): add manual alert analysis endpoint with SSL support
Kbayero Apr 3, 2026
f72e468
fix(backend): use analyzeAlert method in UtmAlertServiceImpl
Kbayero Apr 3, 2026
8f55081
feat[backend](updated filters and rules): added initial load service
AlexSanchez-bit Apr 3, 2026
8b96a58
feat[backend](updated filters and rules): added initial load service
AlexSanchez-bit Apr 3, 2026
820a1c7
feat[backend](updated filters and rules): forced systemOwnedMode on r…
AlexSanchez-bit Apr 3, 2026
bf78f42
feat[backend](updated filters and rules): added removed rules and fil…
AlexSanchez-bit Apr 3, 2026
c6d098f
feat[backend](updated filters and rules): forced filters adn rules to…
AlexSanchez-bit Apr 3, 2026
5fb23e0
feat[backend](updated filters and rules): set null to invalid module …
AlexSanchez-bit Apr 3, 2026
47acd6f
changeset[backend](socai): updated socai integration guide configuration
AlexSanchez-bit Apr 3, 2026
11fc5da
fix[frontend](integration-guide): fixed cisco asa and firepower commands
AlexSanchez-bit Apr 7, 2026
113d002
fix[backend](cypherUtil): make key|iv derivation be local instead of …
AlexSanchez-bit Apr 7, 2026
72e22d3
Merge remote-tracking branch 'origin/v11' into backlog/compliance-eva…
elmilan06 Apr 7, 2026
3ee3cd7
fix: correct query parameter for search
elmilan06 Mar 23, 2026
28656f5
fix: Corrected incorrect behavior in filtering
elmilan06 Mar 23, 2026
3a1988d
fix: update sorting direction for compliance evaluations
elmilan06 Mar 24, 2026
ab3ab54
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
3c4e2e0
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
282371e
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
f215e24
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
b2e9010
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
c53d170
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
8b63422
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
06e9990
feat: add print view for compliance evaluations with detailed report
elmilan06 Apr 3, 2026
e36994b
fix[backend](healthcheck): removed springboot healthcheck to allow cu…
AlexSanchez-bit Apr 7, 2026
d1f417d
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 8, 2026
0260a7f
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 8, 2026
031f1c1
Merge remote-tracking branch 'origin/release/v11.2.6' into backlog/co…
elmilan06 Apr 8, 2026
7c9a9c7
fix[backend](initial-setup): improved filter insertion on system load
AlexSanchez-bit Apr 8, 2026
941c847
fix[backend](initial-setup): improved filter deletion on initial setup
AlexSanchez-bit Apr 8, 2026
717bcc4
changeset[backend](data-types,modules): seeded data type - module rel…
AlexSanchez-bit Apr 8, 2026
a8bb858
fix[backend](initial-setup): improved error handling on failed to ins…
AlexSanchez-bit Apr 8, 2026
cd28b0e
fix[backend](initial-setup): fixed filter index error
AlexSanchez-bit Apr 8, 2026
5f41514
fix[backend](initial-setup):added RuleYml to parse rules yml
AlexSanchez-bit Apr 8, 2026
ca9e075
fix[backend](rules): fixed rules definitions
AlexSanchez-bit Apr 8, 2026
d05f323
feat[backend](log_events): added logs on every system admin operation
AlexSanchez-bit Apr 8, 2026
5ae77a1
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 9, 2026
c196ac7
fix[rules]: remove unused rules
Kbayero Apr 9, 2026
e7725e2
fix[baclend]: solve sintax problems in rules
Kbayero Apr 9, 2026
29fe2af
fix[backend]: solved problem with merge
Kbayero Apr 9, 2026
fe359c8
fix[backend](serialization): add @JsonIgnore to UtmModule lazy collec…
Kbayero Apr 9, 2026
9073eec
fix[agent-manager](security): prevent SQL injection in filters, add c…
Kbayero Apr 9, 2026
ce283c0
feat[backend,frontend](incident-response): add shell selection for Wi…
Kbayero Apr 9, 2026
dffce38
fix[frontend](soar): remove legacy automation route and update audit …
Kbayero Apr 9, 2026
23e8b9d
refactor(plugins): replace config polling with channel-based configur…
JocLRojas Apr 9, 2026
03d4e86
feat[soc-ai]: improve soc-ai integration
Kbayero Apr 9, 2026
84f038f
fix[backend,frontend,plugins](integrations): mask sensitive config va…
Kbayero Apr 9, 2026
edadfb6
fix[frontend](integrations): only clear saved tenant changes instead …
Kbayero Apr 9, 2026
9904393
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 9, 2026
13030a0
fix(modules-config): prevent single plugin failure from blocking all …
JocLRojas Apr 9, 2026
d5bee2c
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
JocLRojas Apr 9, 2026
5dfc003
fix[backend,frontend]: add missing Constants import and remove duplic…
Kbayero Apr 9, 2026
19d04b0
Merge branch 'release/v11.2.6' of https://github.com/utmstack/UTMStac…
Kbayero Apr 9, 2026
c7611c5
feat: refactor OpenSearch integration with new connection model
elmilan06 Apr 10, 2026
8436126
feat: rename compliance configuration changelogs
elmilan06 Apr 10, 2026
db38d2c
Merge remote-tracking branch 'origin/release/v11.2.6' into backlog/co…
elmilan06 Apr 10, 2026
e5c05e2
Merge remote-tracking branch 'origin/backlog/compliance-evaluation' i…
elmilan06 Apr 10, 2026
2a6d876
fix: correct standardId binding in compliance control create component
elmilan06 Apr 10, 2026
9bda781
fix[frontend](alert-selection): improved selection/remove alert condi…
AlexSanchez-bit Apr 9, 2026
54b99d0
fix[modules-config](socai): fixed providers configuration
AlexSanchez-bit Apr 10, 2026
f9bd402
fix[frontend](socai_module_config): fixed saving state handling
AlexSanchez-bit Apr 10, 2026
60f108b
feat[modules-config](socai): generalized socai connection check and v…
AlexSanchez-bit Apr 10, 2026
58bd6b2
feat: trigger initial scheduler dispatch when backend configs are pre…
elmilan06 Apr 10, 2026
f020478
fix[frontend](alert-selection): improved selection/remove alert condi…
AlexSanchez-bit Apr 9, 2026
7c356b4
fix[modules-config](socai): fixed providers configuration
AlexSanchez-bit Apr 10, 2026
807fb6a
fix[frontend](socai_module_config): fixed saving state handling
AlexSanchez-bit Apr 10, 2026
b6787fb
feat[modules-config](socai): generalized socai connection check and v…
AlexSanchez-bit Apr 10, 2026
827d946
Merge remote-tracking branch 'origin/release/v11.2.6' into release/v1…
elmilan06 Apr 10, 2026
41666c5
Merge remote-tracking branch 'origin/backlog/compliance-evaluation' i…
elmilan06 Apr 10, 2026
8b4743e
fix[frontend](socai_alert_analyze): updated loading status inmediatel…
AlexSanchez-bit Apr 10, 2026
e5a326f
refactor(modules-config): improve resilience and code organization
JocLRojas Apr 10, 2026
147e2ef
feat: rename compliance configuration changelogs
elmilan06 Apr 10, 2026
5c8e80c
Merge remote-tracking branch 'origin/release/v11.2.6' into backlog/co…
elmilan06 Apr 10, 2026
304e956
Merge pull request #2024 from utmstack/backlog/compliance-evaluation
AlexSanchez-bit Apr 10, 2026
4d26712
fix[modules-config](socai): trimmend config values to avoid false pos…
AlexSanchez-bit Apr 13, 2026
96345fa
fix[modules-config](socai): send model on test request to avoid wrong…
AlexSanchez-bit Apr 13, 2026
86f10b6
fix[modules-config](socai): add little message on model test to manag…
AlexSanchez-bit Apr 13, 2026
9b94cd1
fix[modules-config](socai): manage gemini test response correctly
AlexSanchez-bit Apr 13, 2026
df6940a
fix[frontend](tooltips): moved tooltip position to body so they can b…
AlexSanchez-bit Apr 13, 2026
318b1b3
fix[frontend](alert-popup): fixed alert popup position
AlexSanchez-bit Apr 13, 2026
d725cc1
fix[backend](socai_model): removed model invalidation on custom provider
AlexSanchez-bit Apr 13, 2026
56a9733
fix[frontend](socai-analysis): fixed wait status on socai alert analysis
AlexSanchez-bit Apr 13, 2026
c4e84de
fix[frontend](linux): fixed linux agent name on integration guides
AlexSanchez-bit Apr 24, 2026
ba127c7
fix[frontend](socai): selected currently configured provider once its…
AlexSanchez-bit Apr 24, 2026
8023ddd
fix[backend](modules_config): removed json ignore and desencryption o…
AlexSanchez-bit Apr 24, 2026
2f724b1
fix[backend](modules_config): removed decryption on config validation
AlexSanchez-bit Apr 24, 2026
1aa3e5d
chore[](v11-pipeline): temporary remove v11 windows agent singing fro…
AlexSanchez-bit Apr 24, 2026
41d6557
ci: unify agent signing into reusable workflow (Windows KMS + macOS)
Kbayero Apr 24, 2026
fe7bd8b
fix(ci): remove invalid --version check on jsign download
Kbayero Apr 24, 2026
a697ca0
fix(ci): drop osslsigncode verify step from Windows signing
Kbayero Apr 24, 2026
f0e6109
feat[backend](modules-config): removed decryption type in all comunic…
AlexSanchez-bit Apr 24, 2026
bfc4743
fix[backend](modules_config): setted get operations as readonly trans…
AlexSanchez-bit Apr 27, 2026
39ff859
feat(modules-config): add logging and decryption support
JocLRojas Apr 27, 2026
fc6efd3
Merge branch 'release/v11.2.7' of https://github.com/utmstack/UTMStac…
JocLRojas Apr 27, 2026
e36be16
chore(modules-config): improve error context in decryption failures
JocLRojas Apr 27, 2026
40ce119
fix[modules-config](socai): make model verification on openai come on…
AlexSanchez-bit Apr 27, 2026
80b815c
fix[frontend](alerts): added a sockai error on alert analization
AlexSanchez-bit Apr 27, 2026
fd7b4aa
fix[backend](modules_config): remove socai.model filtration on module…
AlexSanchez-bit Apr 27, 2026
dca72e9
fix[backend](modules_config): remove socai from non removable config …
AlexSanchez-bit Apr 27, 2026
f515d09
deleted: removed rootkit_files_detection rule from linux
JocLRojas Apr 28, 2026
8cddd33
deleted: removed suspicious_managedcode_host_process rule from windows
JocLRojas Apr 28, 2026
85238ed
Merge branch 'v11' into release/v11.2.7
JocLRojas Apr 28, 2026
686ab18
deleted: the suspect_managedcode_host_process and rootkit_files_detec…
JocLRojas Apr 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
289 changes: 289 additions & 0 deletions .github/workflows/reusable-sign-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
name: "Reusable: Sign Agent Binaries"

on:
workflow_call:
inputs:
os:
required: true
type: string
description: "Target OS to sign for: 'windows' or 'macos'"
artifact_name:
required: true
type: string
description: "Name of the artifact (uploaded by a previous job) that contains the unsigned binaries"
binaries:
required: true
type: string
description: |
Newline-separated list of binary paths to sign, relative to the root of the downloaded artifact.
Example:
agent/utmstack_agent_service_windows_amd64.exe
agent/updater/utmstack_updater_service_windows_amd64.exe
signed_artifact_name:
required: false
type: string
default: ""
description: "Name for the output artifact (defaults to <artifact_name>-signed)"
retention_days:
required: false
type: number
default: 1

# ---- Windows / GCP KMS (used only when os=windows) ----
gcp_project_id:
required: false
type: string
default: ""
kms_location:
required: false
type: string
default: "global"
kms_keyring:
required: false
type: string
default: ""
kms_key:
required: false
type: string
default: ""
cert_chain_path:
required: false
type: string
default: ".github/certs/codesign-chain.pem"
description: "Path (in the repo) to the PEM cert chain used by jsign"
jsign_version:
required: false
type: string
default: "7.0"
sign_name:
required: false
type: string
default: "UTMStack Agent"
sign_url:
required: false
type: string
default: "https://utmstack.com"
tsa_url:
required: false
type: string
default: "http://timestamp.sectigo.com"

secrets:
# Windows
GCP_WINDOWS_SIGNER_SA_KEY:
required: false
WINDOWS_SIGNER_CERT_CHAIN_PEM:
required: false
description: "Full PEM cert chain content. When set, overrides cert_chain_path."
# macOS
APPLE_CERTIFICATE_BASE64:
required: false
APPLE_CERTIFICATE_PASSWORD:
required: false
APPLE_SIGNING_IDENTITY:
required: false
APPLE_ID:
required: false
APPLE_APP_PASSWORD:
required: false
APPLE_TEAM_ID:
required: false

jobs:
sign:
name: Sign ${{ inputs.os }} binaries
runs-on: ${{ inputs.os == 'windows' && 'ubuntu-latest' || 'macos-latest' }}
permissions:
contents: read
id-token: write

steps:
- name: Checkout (for cert chain)
if: inputs.os == 'windows'
uses: actions/checkout@v4

- name: Download unsigned binaries
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: ./unsigned

# =========================================================
# Windows path: jsign + GCP KMS
# =========================================================
- name: Authenticate to Google Cloud
if: inputs.os == 'windows'
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_WINDOWS_SIGNER_SA_KEY }}

- name: Set up gcloud
if: inputs.os == 'windows'
uses: google-github-actions/setup-gcloud@v2

- name: Set up Java (for jsign)
if: inputs.os == 'windows'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- name: Download jsign
if: inputs.os == 'windows'
env:
JSIGN_VERSION: ${{ inputs.jsign_version }}
run: |
curl -fsSL -o jsign.jar \
"https://github.com/ebourg/jsign/releases/download/${JSIGN_VERSION}/jsign-${JSIGN_VERSION}.jar"

- name: Prepare cert chain
if: inputs.os == 'windows'
env:
CHAIN_SECRET: ${{ secrets.WINDOWS_SIGNER_CERT_CHAIN_PEM }}
CHAIN_REPO_PATH: ${{ inputs.cert_chain_path }}
run: |
set -euo pipefail
OUT="${RUNNER_TEMP}/codesign-chain.pem"
if [ -n "$CHAIN_SECRET" ]; then
echo "→ Using cert chain from secret"
printf '%s\n' "$CHAIN_SECRET" > "$OUT"
elif [ -f "$CHAIN_REPO_PATH" ]; then
echo "→ Using cert chain from repo: $CHAIN_REPO_PATH"
cp "$CHAIN_REPO_PATH" "$OUT"
else
echo "::error::No cert chain available. Set WINDOWS_SIGNER_CERT_CHAIN_PEM secret or commit a chain at ${CHAIN_REPO_PATH}"
exit 1
fi
echo "CERT_CHAIN_FILE=${OUT}" >> "$GITHUB_ENV"

- name: Sign Windows binaries
if: inputs.os == 'windows'
env:
PROJECT_ID: ${{ inputs.gcp_project_id }}
KEYRING_LOCATION: ${{ inputs.kms_location }}
KEYRING_NAME: ${{ inputs.kms_keyring }}
KEY_NAME: ${{ inputs.kms_key }}
SIGN_NAME: ${{ inputs.sign_name }}
SIGN_URL: ${{ inputs.sign_url }}
TSA_URL: ${{ inputs.tsa_url }}
BINARIES: ${{ inputs.binaries }}
run: |
set -euo pipefail

TOKEN=$(gcloud auth print-access-token)
KEYSTORE="projects/${PROJECT_ID}/locations/${KEYRING_LOCATION}/keyRings/${KEYRING_NAME}"

while IFS= read -r raw; do
bin=$(echo "$raw" | xargs)
[ -z "$bin" ] && continue
target="./unsigned/${bin}"
echo "→ Signing ${target}"
ls -la "$target"

java -jar jsign.jar \
--storetype GOOGLECLOUD \
--storepass "$TOKEN" \
--keystore "$KEYSTORE" \
--alias "$KEY_NAME" \
--certfile "$CERT_CHAIN_FILE" \
--tsaurl "$TSA_URL" \
--tsmode RFC3161 \
--name "$SIGN_NAME" \
--url "$SIGN_URL" \
"$target"

echo "✓ Signed ${target}"
done <<< "$BINARIES"

# =========================================================
# macOS path: codesign + notarytool
# =========================================================
- name: Install Apple certificate
if: inputs.os == 'macos'
env:
CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
run: |
set -euo pipefail
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
KEYCHAIN_PASSWORD=$(openssl rand -base64 32)

security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"

echo "$CERTIFICATE_BASE64" | base64 --decode > "$RUNNER_TEMP/certificate.p12"
security import "$RUNNER_TEMP/certificate.p12" -P "$CERTIFICATE_PASSWORD" \
-A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
security list-keychain -d user -s "$KEYCHAIN_PATH"

security set-key-partition-list -S apple-tool:,apple:,codesign: \
-s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"

- name: Sign macOS binaries
if: inputs.os == 'macos'
env:
SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
BINARIES: ${{ inputs.binaries }}
run: |
set -euo pipefail
while IFS= read -r raw; do
bin=$(echo "$raw" | xargs)
[ -z "$bin" ] && continue
target="./unsigned/${bin}"
echo "→ Signing ${target}"
codesign --force --options runtime \
--sign "$SIGNING_IDENTITY" \
--timestamp \
"$target"
done <<< "$BINARIES"

- name: Notarize macOS binaries
if: inputs.os == 'macos'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
BINARIES: ${{ inputs.binaries }}
run: |
set -euo pipefail
while IFS= read -r raw; do
bin=$(echo "$raw" | xargs)
[ -z "$bin" ] && continue
target="./unsigned/${bin}"
zip_path="${target}.notarize.zip"
echo "→ Notarizing ${target}"
( cd "$(dirname "$target")" && zip "$(basename "$target").notarize.zip" "$(basename "$target")" )

xcrun notarytool submit "$zip_path" \
--apple-id "$APPLE_ID" \
--password "$APPLE_APP_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait

rm -f "$zip_path"
echo "✓ Notarized ${target}"
done <<< "$BINARIES"

# =========================================================
# Upload signed binaries
# =========================================================
- name: Compute signed artifact name
id: artifact
env:
OVERRIDE: ${{ inputs.signed_artifact_name }}
DEFAULT: ${{ inputs.artifact_name }}-signed
run: |
if [ -n "$OVERRIDE" ]; then
echo "name=$OVERRIDE" >> "$GITHUB_OUTPUT"
else
echo "name=$DEFAULT" >> "$GITHUB_OUTPUT"
fi

- name: Upload signed binaries
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.name }}
path: ./unsigned/
retention-days: ${{ inputs.retention_days }}
if-no-files-found: error
Loading
Loading