Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
Allowlist-only diagnostic of protected NSIS error and direct-retry status
davoodmehraban89 committed
Oct 19, 2026 at 02:02 UTC
f46a208527ee4b126f7029b37dfb195c4b604763
1 file changed
+31
.github/workflows/private-v6-builder-ephemeral-20261018.yml
+31
@@ -103,6 +103,37 @@ jobs:
103
}
104
}
105
$record=Get-Content $privateLog -Raw
106
+ $attempts=[regex]::Matches($record,'PRIVATE_QA_PHASE=NSIS_DIRECT_(?:BINARY_RETRY|RETRY_SUCCEEDED|RETRY_FAILED)')
107
+ Write-Host ('PRIVATE_QA_DIRECT_RETRY_MARKERS='+($attempts.Count))
108
+ foreach($a in $attempts){Write-Host ('PRIVATE_QA_ATTEMPT='+$a.Value)}
109
+ if(Test-Path -LiteralPath $nsisLog){
110
+ # Preapproved generic English vocabulary only. No raw log,
111
+ # private paths, URLs, source lines, values, IDs or credentials.
112
+ $allowed=@('error','failed','failure','fatal','exit','code','status','process','terminated',
113
+ 'command','cannot','could','not','find','found','missing','invalid','unrecognized',
114
+ 'unexpected','argument','unknown','required','option','file','directory','path',
115
+ 'package','module','dependency','native','rebuild','electron','builder','nsis',
116
+ 'sign','signing','certificate','installer','installation','configuration',
117
+ 'config','schema','archive','asar','version','runtime','windows','win','setup',
118
+ 'permission','access','denied','exception','execution','message','warning',
119
+ 'artifact','output','input','executable','target','release','publish',
120
+ 'upload','download','network','timeout','certificate','digest','hash',
121
+ 'checksum','integrity','symlink','extract','copy','rename','remove',
122
+ 'read','write','create','open','close','unsupported','environment',
123
+ 'value','type','object','null','undefined','function','property','properties',
124
+ 'string','number','boolean','parse','syntax','operation','system','is',
125
+ 'was','with','at','to','in','from','for','and','or','of','on','the','a','an',
126
+ 'after','before','during','while','as','due','because','by','already',
127
+ 'exists','cannot','isnt','doesnt','trying','use','using','please',
128
+ 'cannot','build','building','built','pack','packaging','unpack',
129
+ 'not','proper','invalid','has','have','had','failed','called')
130
+ $failureLines=@($nsisText -split '\\r?\\n' | Where-Object {$_ -match '(?i)error|failed|exception|⨯'})
131
+ $terminalLine=if($failureLines.Count -gt 0){[string]$failureLines[$failureLines.Count-1]}else{''}
132
+ $words=@([regex]::Matches($terminalLine,'[A-Za-z]{2,24}') |
133
+ ForEach-Object {$_.Value.ToLowerInvariant()} |
134
+ Where-Object {$allowed -contains $_} | Select-Object -First 30)
135
+ Write-Host ('PRIVATE_QA_SAFE_ERROR_WORDS='+($words -join '_'))
136
+ }
137
$phases=[regex]::Matches($record,'PRIVATE_QA_PHASE=[A-Z_]+')
138
$lastPhase=if($phases.Count -gt 0){$phases[$phases.Count-1].Value}else{'PRIVATE_QA_PHASE=BEFORE_ARCHIVE_PREFLIGHT'}
139
Write-Host ('DIAGNOSTIC_LAST_VERIFIED_PHASE='+$lastPhase)