Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e5e04ad
fix(core): add macOS/Linux compatibility for provider loading and URL…
nof2504 Feb 13, 2026
a24bd87
chore: restrict pr-milestone workflow to specific branches and exclud…
marc-romu Feb 15, 2026
291773d
fix(core): add macOS compatibility for provider loading and URL handl…
marc-romu Feb 15, 2026
1167bc4
chore: bump version to 1.4.0-dev.260215 and update issue template pla…
marc-romu Feb 15, 2026
88957c0
chore: refactor ComponentStateManager event firing to prevent macOS d…
marc-romu Feb 15, 2026
57a950e
fix(settings): initialize new installations with encryption version 2…
marc-romu Feb 15, 2026
d77b850
refactor(dialogs): refactored StyledMessageDialog sizing calculations
marc-romu Feb 15, 2026
c05b3d7
fix(ui): prevent WebChatDialog crash on macOS by using null baseUri f…
marc-romu Feb 15, 2026
de6043b
feat(ui): add VersionHelper utility and enhance About dialog with aut…
marc-romu Feb 15, 2026
d3e4eb2
feat(security): add SHA-256 hash verification system for AI provider …
marc-romu Feb 15, 2026
7f51d5c
refactor(menu): remove unused VersionHelper import from AboutMenuItem
marc-romu Feb 15, 2026
c01ba22
feat(ci): add reusable GitHub Actions for build, hash calculation, an…
marc-romu Feb 15, 2026
6b8302a
feat(security): add comprehensive input validation and sanitization t…
marc-romu Feb 15, 2026
72c222f
refactor(ci): rename test workflows to user workflows and update desc…
marc-romu Feb 15, 2026
8a2b29a
chore(deps): remove commented-out Grasshopper package reference from …
marc-romu Feb 15, 2026
1cd13bf
style: apply consistent code formatting and whitespace cleanup across…
marc-romu Feb 15, 2026
5ad3517
refactor(security): improve platform name validation regex to better …
marc-romu Feb 15, 2026
e35f07e
refactor(security): simplify platform name validation to use allowlis…
marc-romu Feb 15, 2026
094ce79
refactor(security): simplify platform name validation in calculate-pr…
marc-romu Feb 15, 2026
6557fcd
refactor(actions): standardize output names to uppercase in calculate…
marc-romu Feb 15, 2026
483a6e8
refactor(ci): remove PR comment steps from validation workflows
marc-romu Feb 15, 2026
6506680
refactor(ci): improve hash file conflict detection in PR build valida…
marc-romu Feb 15, 2026
684ccab
feat(security): add SHA-256 provider verification and macOS compatibi…
marc-romu Feb 15, 2026
1b269b5
chore: prepare release 1.4.0-alpha with version update and code style…
actions-user Feb 15, 2026
7df7013
chore: prepare release 1.4.0-alpha with version update and code style…
marc-romu Feb 15, 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
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ body:
attributes:
label: Rhino Version
description: What version of Rhino are you using?
placeholder: e.g. RH8.26
placeholder: e.g. RH8.28
validations:
required: true

Expand All @@ -44,7 +44,7 @@ body:
attributes:
label: SmartHopper Version
description: What version of SmartHopper are you using?
placeholder: e.g. 1.2.2-alpha
placeholder: e.g. 1.4.0-alpha
validations:
required: true

Expand Down
171 changes: 171 additions & 0 deletions .github/actions/calculate-provider-hashes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
name: 'Calculate Provider SHA-256 Hashes'
description: 'Calculates SHA-256 hashes for SmartHopper provider DLLs and generates a JSON manifest'
inputs:
artifacts-path:
description: 'Path to the artifacts directory containing provider DLLs'
required: true
version:
description: 'Version string for the manifest (e.g., 1.2.3 or 1.2.3-alpha)'
required: true
platforms:
description: 'JSON array of platform names to process (e.g., ["net7.0-windows", "net7.0"])'
required: false
default: '["net7.0-windows", "net7.0"]'
build-number:
description: 'GitHub Actions build/run number'
required: false
default: ''
commit-sha:
description: 'Git commit SHA'
required: false
default: ''
repository:
description: 'GitHub repository (owner/repo)'
required: false
default: ''
outputs:
HASH_FILE:
description: 'Path to the generated hash manifest JSON file'
value: ${{ steps.calculate.outputs.HASH_FILE }}
HASH_COUNT:
description: 'Number of provider DLLs hashed'
value: ${{ steps.calculate.outputs.HASH_COUNT }}

runs:
using: 'composite'
steps:
- name: Calculate Provider Hashes
id: calculate
shell: pwsh
run: |
# Parse and validate platforms input
$platformsJson = '${{ inputs.platforms }}'
try {
$platforms = $platformsJson | ConvertFrom-Json -ErrorAction Stop
} catch {
Write-Host "##[error] Failed to parse platforms JSON: $_"
exit 1
}

if ($null -eq $platforms -or $platforms.Count -eq 0) {
Write-Host "##[error] Platforms array is empty or invalid"
exit 1
}

# Validate platform names to prevent path traversal
foreach ($platform in $platforms) {
if ([string]::IsNullOrWhiteSpace($platform)) {
Write-Host "##[error] Platform name cannot be empty or whitespace"
exit 1
}
if ($platform -notmatch '^[a-zA-Z0-9\.-]+$') {
Write-Host "##[error] Invalid platform name (potential path traversal): '$platform'"
exit 1
}
}

# Validate and sanitize artifacts path to prevent path traversal
$artifactsPath = "${{ inputs.artifacts-path }}"
if ([string]::IsNullOrWhiteSpace($artifactsPath)) {
Write-Host "##[error] Artifacts path cannot be empty"
exit 1
}

# Resolve to absolute path and validate it doesn't escape workspace
$artifactsPath = $artifactsPath -replace '\.\.[\\/]', ''
$artifactsPath = $artifactsPath -replace '^[\\/]+', ''

# Validate version format
$version = "${{ inputs.version }}"
if ($version -notmatch '^[0-9]+\.[0-9]+(\.[0-9]+)?(-[a-zA-Z0-9\.\-]+)?$') {
Write-Host "##[error] Invalid version format: '$version'"
exit 1
}

# Build parameters for the hash calculation tool
$params = @{
ArtifactsPath = $artifactsPath
Version = $version
Platforms = $platforms
}

# Add optional parameters
if ("${{ inputs.build-number }}" -ne "") {
$params.BuildNumber = "${{ inputs.build-number }}"
}
if ("${{ inputs.commit-sha }}" -ne "") {
$params.CommitSha = "${{ inputs.commit-sha }}"
}
if ("${{ inputs.repository }}" -ne "") {
$params.Repository = "${{ inputs.repository }}"
}

# Call the reusable hash calculation tool
try {
& ./tools/Calculate-ProviderHashes.ps1 @params -ErrorAction Stop
} catch {
Write-Host "##[error] Hash calculation failed: $_"
exit 1
}

# Extract outputs - use default output file name
$hashFile = "provider-hashes-$version.json"

# Validate hash file exists and is not empty
if (!(Test-Path $hashFile)) {
Write-Host "##[error] Hash file was not created by the tool!"
Write-Host "Expected file: $hashFile"
exit 1
}

$fileInfo = Get-Item $hashFile -ErrorAction Stop
if ($fileInfo.Length -eq 0) {
Write-Host "##[error] Hash file is empty!"
exit 1
}

# Count providers in the manifest with comprehensive error handling
try {
$manifestJson = Get-Content $hashFile -Raw -ErrorAction Stop

if ([string]::IsNullOrWhiteSpace($manifestJson)) {
Write-Host "##[error] Hash manifest file is empty or contains only whitespace"
exit 1
}

$manifest = $manifestJson | ConvertFrom-Json -ErrorAction Stop

# Validate manifest structure
if ($null -eq $manifest) {
Write-Host "##[error] Failed to parse hash manifest: result is null"
exit 1
}

if ($null -eq $manifest.providers) {
Write-Host "##[error] Hash manifest does not contain 'providers' property"
exit 1
}

# Validate required fields
if ([string]::IsNullOrWhiteSpace($manifest.version)) {
Write-Host "##[error] Hash manifest missing 'version' field"
exit 1
}

if ([string]::IsNullOrWhiteSpace($manifest.algorithm)) {
Write-Host "##[error] Hash manifest missing 'algorithm' field"
exit 1
}

$hashCount = $manifest.providers.PSObject.Properties.Count

if ($hashCount -eq 0) {
Write-Host "##[warning] No providers found in hash manifest"
}
} catch {
Write-Host "##[error] Failed to parse hash manifest: $_"
exit 1
}

echo "HASH_FILE=$hashFile" >> $env:GITHUB_OUTPUT
echo "HASH_COUNT=$hashCount" >> $env:GITHUB_OUTPUT
Loading
Loading