From ad4ebe4d2bc161796c2a519dea144aa09da96a25 Mon Sep 17 00:00:00 2001 From: autoantohaki Date: Wed, 21 Oct 2026 21:09:24 -0300 Subject: [PATCH] fix(ci): approve branding assets and keep privacy scan exit code clean The branding commit added docs/assets/impossible-voice-scene.gif and social-preview.png without approving their hashes, so the privacy scan rejected them. The scan also ended with the exit code of an unset 'git config --get user.name' on CI, failing the step after a passing scan. Approve both assets by hash and exit 0 explicitly on success. --- scripts/privacy-scan.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/privacy-scan.ps1 b/scripts/privacy-scan.ps1 index fc32421..a885afa 100644 --- a/scripts/privacy-scan.ps1 +++ b/scripts/privacy-scan.ps1 @@ -16,6 +16,8 @@ $credentialPatterns = @( $safeValue = '(?i)^(?:\$\{[A-Z_][A-Z0-9_]*\}|\$env:[A-Z_][A-Z0-9_]*|<[^>]+>|example|placeholder|dummy|fixture|test|test[-_]?placeholder|change[-_]?me|none|null|redacted|not[-_]?set|x{3,})$' $approvedBinaryHashes = @{ 'docs/assets/impossible-voice-header.png' = 'a75515ffbe2dbbb90800b723c8db65ec1f4b5c17fcc63225bafa79f655fdad80' + 'docs/assets/impossible-voice-scene.gif' = 'c5ec70a8a8f01a23d3d9238309c98ad549bc4c3402d34923f1a10de0456d0fb4' + 'docs/assets/social-preview.png' = '6c0449a3f2eb39b22e3f55b22bc462cbeb9408f8eb69e7b0ca0ceac81cac4481' } Push-Location $repoRoot @@ -98,6 +100,9 @@ try { exit 1 } Write-Output "Privacy scan passed for $($files.Count) tracked and nonignored untracked candidates." + # An unset user.name or user.email leaves `git config --get` exit code 1 in $LASTEXITCODE, + # which hosts such as GitHub Actions would otherwise report as a failed scan. + exit 0 } finally { Pop-Location }