Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
ci: add manual Windows VM Mayan PE run isolated from banking network using vetted QA archive
davoodmehraban89 committed
Oct 16, 2026 at 21:31 UTC
8599949df836f81f63b00200de7e9115f788f224
1 file changed
+67
.github/workflows/windows-vm-mayan-sandbox.yml
new
+67
@@ -0,0 +1,67 @@
1
+name: Mayan isolated Windows VM executable probe
2
+
3
+on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ mayan_qa_tag:
7
+ description: "PRIVATE Release tag containing Mayan-Sanitized-QA.zip"
8
+ required: true
9
+ type: string
10
+ mayan_qa_sha256:
11
+ description: "SHA-256 of exact sanitized QA asset"
12
+ required: true
13
+ type: string
14
+
15
+permissions:
16
+ contents: read
17
+
18
+jobs:
19
+ mayan-sandbox:
20
+ runs-on: windows-latest
21
+ timeout-minutes: 30
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ persist-credentials: false
26
+ - name: Fetch pinned private artifact, reject sensitive files
27
+ shell: pwsh
28
+ env:
29
+ GH_TOKEN: ${ secrets.GITHUB_TOKEN }
30
+ QA_TAG: ${ inputs.mayan_qa_tag }
31
+ QA_SHA: ${ inputs.mayan_qa_sha256 }
32
+ REPO_NAME: ${ github.repository }
33
+ run: |
34
+ $ErrorActionPreference='Stop'
35
+ if($env:QA_SHA -notmatch '^[a-fA-F0-9]{64}$'){throw 'MAYAN_QA_SHA256_REQUIRED'}
36
+ gh release download $env:QA_TAG --repo $env:REPO_NAME --pattern Mayan-Sanitized-QA.zip --dir $env:RUNNER_TEMP --clobber
37
+ $zip=Join-Path $env:RUNNER_TEMP 'Mayan-Sanitized-QA.zip'
38
+ if((Get-FileHash $zip -Algorithm SHA256).Hash -ne $env:QA_SHA.ToUpperInvariant()){throw 'MAYAN_QA_SHA256_MISMATCH'}
39
+ $destination=Join-Path $env:RUNNER_TEMP 'Mayan-Sanitized-QA'
40
+ Expand-Archive -LiteralPath $zip -DestinationPath $destination -Force
41
+ $bad=@(Get-ChildItem $destination -File -Recurse -Force | Where-Object {
42
+ $_.Name -match '(?i)^license\.key$|^config\.json$|^connectionString\.txt$|\.xlsx$|\.pdb$|\.sqlite$|\.db$|\.pfx$|\.pem$|\.key$|\.ttf$'
43
+ })
44
+ if($bad.Count){throw 'QA_ARCHIVE_CONTAINS_SENSITIVE_FILES'}
45
+ $expected=@(Get-ChildItem $destination -File -Recurse|Where-Object {
46
+ $_.Extension -notin @('.exe','.dll','.json','.txt')
47
+ })
48
+ if($expected.Count){throw 'UNEXPECTED_QA_FILE_TYPE'}
49
+ "MAYAN_QA_PATH=$destination" >> $env:GITHUB_ENV
50
+ - name: Start the real WinForms PE with per-program outbound firewall isolation
51
+ shell: pwsh
52
+ run: |
53
+ & ./scripts/windows-vm-mayan-sandbox.ps1 -QaFolder $env:MAYAN_QA_PATH
54
+ - name: Upload sanitized evidence (not real financial data)
55
+ if: always()
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ name: mayan-windows-vm-structural-evidence
59
+ path: ${ runner.temp }}/mayan-vm-evidence/*.json
60
+ retention-days: 7
61
+ if-no-files-found: warn
62
+ - name: State honest comparison boundary
63
+ if: always()
64
+ shell: pwsh
65
+ run: |
66
+ 'This probes a real sanitized Mayan EXE only. Real GUI function, licensing and financial output parity remain UNVERIFIED.' >> $env:GITHUB_STEP_SUMMARY
67
+ 'No live bank credentials, live SQL connection, customer records or real payments are used.' >> $env:GITHUB_STEP_SUMMARY