Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
Test explicit fixed 7.1.1 MSAL transitive override where Azure identity 4.x still pins vulnerable ^6; commit only after full QA
davoodmehraban89 committed
Oct 26, 2026 at 08:01 UTC
875440b1b22ceb5378188474c3fc635541169cc3
1 file changed
+15
-8
.github/workflows/v7-azure-msal-advisory-remediation-once.yml
+15
-8
@@ -23,11 +23,18 @@ jobs:
23
set -euo pipefail
24
test "$GITHUB_REF_NAME" = 'dev/v7-production-failclosed-20261021'
25
npm ci --ignore-scripts --no-audit --no-fund >/dev/null
26
- npm audit fix --package-lock-only --no-fund > "$RUNNER_TEMP/npm-security-patch.log" 2>&1 || {
27
- echo 'GATE_FAIL_LOCKFILE_SECURITY_PATCH'
26
+ # @azure/identity 4.14 depends on MSAL ^6.0.0, but the vendor's
27
+ # security patch is MSAL 7.1.0+. Explicit override is required.
28
+ npm pkg set 'overrides.@azure/msal-node=7.1.1'
29
+ npm install --package-lock-only --ignore-scripts --no-audit --no-fund > "$RUNNER_TEMP/npm-security-patch.log" 2>&1 || {
30
+ echo 'GATE_FAIL_EXPLICIT_MSAL_OVERRIDE_LOCK_RESOLUTION'
31
exit 1
32
}
30
- git diff --exit-code -- package.json
33
+ node - <<'NODE'
34
+ const pkg=require('./package.json');
35
+ if(pkg.overrides?.['@azure/msal-node']!=='7.1.1')throw Error('MSAL_OVERRIDE_NOT_PINNED');
36
+ console.log('GATE_PASS_EXPLICIT_MSAL_7_1_1_OVERRIDE_PINNED');
37
+ NODE
38
node - <<'NODE'
39
const lock=require('./package-lock.json');
40
const dependency=lock.packages?.['node_modules/@azure/msal-node'];
@@ -56,14 +63,14 @@ jobs:
63
run: |
64
set -euo pipefail
65
test "$GITHUB_REF_NAME" = 'dev/v7-production-failclosed-20261021'
59
- test -z "$(git status --porcelain --untracked-files=no | grep -v 'package-lock.json' || true)"
60
- if git diff --quiet -- package-lock.json; then
66
+ test -z "$(git status --porcelain --untracked-files=no | grep -Ev 'package(-lock)?.json' || true)"
67
+ if git diff --quiet -- package.json package-lock.json; then
68
echo 'GATE_PASS_LOCKFILE_ALREADY_SECURE'
69
else
70
git config user.name "TreasuryFlow CI security bot"
71
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
65
- git add -- package-lock.json
66
- git commit -m 'fix: resolve MSAL Node high-severity transitive advisory in lockfile'
72
+ git add -- package.json package-lock.json
73
+ git commit -m 'fix: pin patched MSAL Node transitively and validate finance suite'
74
git push origin HEAD:refs/heads/dev/v7-production-failclosed-20261021
68
- echo 'GATE_PASS_VALIDATED_LOCKFILE_COMMITTED_ON_FEATURE_BRANCH'
75
+ echo 'GATE_PASS_VALIDATED_MSA_LOWER_BOUND_COMMITTED_ON_FEATURE_BRANCH'
76
fi