Skip to content

Volume 19 · Modernization Roadmap (Deep Redo)

แผน modernization ของแพลตฟอร์ม VTRC จัดตาม ขอบฟ้าเวลา (time horizon) ไม่ใช่ตาม debt ID อย่างเดียว — สังเคราะห์จาก ROI sections ของ deep scorecards หลัง DEEP REDO 2026-07 และจาก Volume 12 · Critical addendum

/ Modernization plan for the VTRC platform, ordered by time horizon (not debt-ID alone) — synthesized from deep-scorecard ROI sections after the 2026-07 DEEP REDO and from Vol 12 critical addendum.

บทในเล่มนี้ / Chapters

บทขอบฟ้าสิ่งที่ปิดแหล่ง ROI หลัก
19.1 · 90-day emergency securityวัน 1–90backdoor, secrets-in-git, SQLi, execSync, @Public() บน PII/writeVol 12.5, 2way-api/04, benefit-api/06, pms-api/06, vtrc-api/10
19.2 · 6-month correctnessเดือน 3–6transaction broken, cron race, dual-schema drift, SSO broken signvtrc-api/10, pms-api/06, benefit-api/06
19.3 · 12-month platformเดือน 6–12secret manager, NestJS consolidation, remove backdoor culture, token standardVol 12.5 ROI, long-horizon items จากทุก scorecard
19.4 · What NOT to rewriteตลอดpublic contracts / typos ที่ต้องคงไว้vtrc-api/10 Public contract, vtrc-web/07, vtrc-rc-backoffice/07, benefit-api/06

ทำไมไม่ใช้ wave แบบ Vol 17 อย่างเดียว / Why not Wave 1–4 alone

Volume 17 ยังอ้าง 275 items จาก shallow passVol 12.5 ระบุชัดว่าตัวเลขนั้น ไม่ใช่ canonical อีกต่อไป จนกว่าจะ reconcile กับ deep IDs (SEC-VTRC-RC-01 แทน C1, ฯลฯ)

Volume นี้จึงจัดงานตาม ผลกระทบ × ความเร่งด่วน × coordination cost จาก ROI จริงของ deep docs — ไม่ใช่การคัดลอกตาราง Wave 1–4 แบบเดิม

/ Volume 17 still cites 275 shallow-pass itemsVol 12.5 states that count is no longer canonical until reconciled with deep IDs. This volume orders work by impact × urgency × coordination cost from deep ROI sections, not by copying the old Wave tables.

หลักการจัดลำดับ ROI (ข้าม repo) / Cross-repo ROI ordering

ลำดับแพลตฟอร์มจาก Vol 12.5 § ROI:

  1. Rotate ทุก secret ที่หลุดใน git + git filter-repo
  2. ลบ backdoor (i3admin, testnaja, signinbypass) + ปิด @Public() ที่ write/PII
  3. Parameterized SQL ทั้ง injection cluster
  4. แทนที่ execSync qpdf (SEC-VTRC-API-01)
  5. SSO redesign (CORR-SSO-01)
  6. HttpOnly cookie / CSP / dompurify ฝั่ง frontend

ลำดับนี้ตรงกับ ROI ของแต่ละ service:

ServiceROI #1 (deep scorecard)Citation
2way-apiลบ backdoor i3admin + rotate SECRET_JWT_TWOWAY2way-api/04 § Modernization
benefit-apiRotate credential ใน .env + SFTP passwordbenefit-api/06 § ROI
pms-apiลบ @Public() จาก getEmployeeSalarypms-api/06 § ROI
vtrc-apiแทนที่ execSync qpdfvtrc-api/10 § ROI
vtrc-rc-backofficeลบ .env + rotate secretvtrc-rc-backoffice/07 § ROI
vtrc-webdompurify สำหรับ dangerouslySetInnerHTMLvtrc-web/07 § ROI

Shared-secret coordination (ห้าม rotate ทีละ repo)

SECRET_KEY ชุดเดียวกันถูก share ข้าม benefit-api / recruitment-api / ai-recruitment-api / pms-apiVol 12.5 secrets cluster และ pms-api SEC-PMS-02

MSSQL sa ถูก share ระหว่าง vtrc-common (SEC-COMMON-03) และ job-scheduler-api (SEC-JOBSCHED-01)

กฎ: rotate เป็น ชุดพร้อมกัน หรือไม่ทำเลยในรอบนั้น — มิฉะนั้น credential เก่ายัง valid ที่ service ที่ยังไม่ rotate

/ Rotate as a simultaneous set, or skip that round — otherwise old credentials remain valid on un-rotated services.

ความสัมพันธ์กับ Vol 17 / 18

Deep scorecards (Vol 3–9)


Vol 12.5 Critical addendum  ──►  Vol 19 (เล่มนี้)  time-horizon plan
        │                              │
        ▼                              ▼
Vol 17 master register          Vol 18 security review
  (ต้อง reconcile)                (import ตาราง 12.5)
  • Volume 17 — ทะเบียน debt (shallow; รอ reconcile)
  • Volume 18 — รายละเอียด SEC Critical/High
  • Volume 16 runbooks — incident response ตอน rotate / backdoor close

สมมติฐานที่ระบุไว้ / Stated assumptions

  1. Production deploy ยังมี backdoor / @Public() ตามซอร์สบน canonical branch — ยืนยันจาก deep scorecards; runtime ACL ภายนอกยัง UNVERIFIED (2way-api/04 verified vs unverified)
  2. Effort ในบทถัดไปเป็นสัมพัทธ์ (ชั่วโมง / วัน / สัปดาห์) ไม่ใช่ man-day ที่ล็อกกับทีมใดทีมหนึ่ง
  3. งานที่กระทบ public contract ต้องอ่าน 19.4 ก่อนเปิด PR

ไป 19.1 · 90-day emergency