Skip to content

12.3 · Critical findings summary

ตารางนี้รวมทุก finding ที่ถูก mark เป็น Critical/🔴 จากการอ่าน *scorecard*.md/*-debt.md ทั้ง 27 ไฟล์ของ Volume 3-9 — รวมทั้งหมด 48 finding จาก 21 repo (repo ที่เหลือใน 25 repo ไม่มี Critical finding เลย หรือเป็น placeholder ที่ยังไม่มีโค้ด)

ID คงรูปแบบเดิมตามที่ต้นทางกำหนด (ส่วนใหญ่ prefix SEC-, centralize-api ใช้ CRIT- แยกจากกัน) — ไม่มีการ renumber


Volume 3 · Legacy Core (14 finding)

IDRepofile:lineคำอธิบาย
SEC-VTRC-API-01vtrc-apiroutes.js:73,120,227,277,355Command injection ผ่าน execSync ใน PDF pipeline (qpdf) — 5 call site active
SEC-VTRC-API-02vtrc-apiconfig.js:12Default JWT_SECRET = 'secret' — forge token ได้ถ้า env ไม่ override
SEC-VTRC-API-03vtrc-apiroutes.js:975-984/webdeployment รัน shell binary โดยไม่มี auth
SEC-VTRC-API-04vtrc-apiroutes.js:464/file/:id/download ไม่มี apiKey check
SEC-CU-01cu-central-apiconfig.js, jwtToken.jsJWT_SECRET default เป็น empty string — jsonwebtoken@8.5.1 ยอม sign ด้วย empty string โดยไม่ throw
SEC-CU-02cu-central-apilib/auth/auth.controller.jsapiKeys hardcoded ในโค้ด (2 keys)
SEC-CU-03cu-central-apirepo root (.env.develop-test).env.develop-test (UAT secrets) commit อยู่ในโค้ด
SEC-CU-04cu-central-apiroutes.js/auth/signinbypass — passwordless signin ที่ live ใน production
SEC-CU-05cu-central-apidirectives/auth.js, searchProfile.jsignoreAuth bypass ที่ apiKey อย่างเดียวพอ
SEC-CU-06cu-central-apiactiveDirectory.connector.jsrejectUnauthorized: false ใน LDAP connection
CRIT-01centralize-api.env:1-15.env committed มี plaintext DB password + internal IP
CRIT-02centralize-api.env:15SECRET_KEY เป็น SSH public key fragment ไม่ใช่ random secret
CRIT-03centralize-apiทุก controllerAuth bypass 100% — @Public() ทุก route (17/17 endpoint)
CRIT-04centralize-apiทุก endpoint ที่ return PIIPII exposure ไม่มี auth — ละเมิด PDPA มาตรา 26

Volume 4 · Web Frontends (4 finding)

IDRepofile:lineคำอธิบาย
SEC-BONEW-01vtrc-backoffice-newsrc/pages/Login/index.js:93-103login flow ส่ง access token + refresh token เป็น path segment ของ URL ข้ามorigin
C1vtrc-rc-backoffice.env (6 บรรทัด, ไม่อยู่ใน .gitignore).env committed ลง git มี secret จริง (REACT_APP_PRIVATE_KEY, REACT_APP_STIMUL_CONN_STRING, ฯลฯ)
C2vtrc-rc-backofficebuild bundle (CRA inline REACT_APP_*)REACT_APP_STIMUL_CONN_STRING (MSSQL connection string) ฝังใน bundle ส่งให้ browser
C3vtrc-rc-backofficecontainers/App/index.js:24SSO bypass /pathLogin/:token/:refreshToken รับ token ใน URL

vtrc-backoffice และ vtrc-web ไม่มี finding ที่ mark เป็น Critical อย่างชัดเจนในสองบทนี้ (สูงสุดคือ High)

Volume 5 · 2way Platform (8 finding)

IDRepofile:lineคำอธิบาย
SEC-2WAYAPI-012way-apisrc/modules/auth/auth.service.ts:184-240Backdoor login hardcode username/password (i3admin/aA123456!) ออก JWT อายุ 48 ชม.
SEC-2WAYAPI-022way-apisrc/modules/auth/auth.service.ts:20-26SSO/JWT secret มี default fallback ฝังในซอร์สโค้ด
SEC-2WAYAPI-032way-apisrc/modules/announces/announces.service.ts:164-296,297-463 (+ surveys.service.ts, complaints.service.ts)SQL injection จาก string interpolation ใน raw SQL WHERE clause
SEC-2WAYAPI-042way-apisrc/modules/announces/announces.controller.ts:45,56,79,85, src/modules/line/line.controller.tsGlobal JwtAuthGuard bypass ด้วย @Public() บนแทบทุก write endpoint
SEC-2WAYLINE-012way-line-servicesrc/modules/line/line.controller.ts:13,19,25,31ทุก endpoint ของ LineController เป็น @Public()
SEC-2WAYVTRC-012way-vtrc-apimiddleware/checkbypasstoken.ts:24Master bypass token static string "testnaja"
SEC-2WAYVTRC-022way-vtrc-apiroutes/TwoWayAPI/userLine/getProfile.ts:34-63,79-134POST /2way/getProfile ไม่มี middleware ป้องกัน — คืน PII (idCard, birthDate, phone) จาก lineID
SEC-2WAYVTRC-032way-vtrc-apiutil/mongo.config.ts:8Credential MongoDB production commit ตรงในซอร์ส

2way-batch และ 2way-meeting-backoffice ไม่มี Critical finding

Volume 6 · Domain Microservices (15 finding)

IDRepofile:lineคำอธิบาย
SEC-BENEFIT-01benefit-api.env:18,25,32,64, exportpaymentreport.service.ts:5271,5824,6151Production credential หลุดเข้า git — MSSQL password ×3, JWT secret, SFTP password hardcode ในโค้ด
SEC-BENEFIT-02benefit-apipayments.service.ts:415-573,640-720,1032-1183,1185-1435, approvedisaster.service.ts:415-417Raw SQL string interpolation ข้าม 2 database (schema vtrc) — SQL injection surface ขนาดใหญ่
SEC-RECRUIT-01recruitment-api.env:11,18,25,32,44,45,52,55, vtrc-gcp-sa-key.jsonProduction credential หลุดเข้า git — MSSQL, JWT ×2, SMTP, reCAPTCHA, GCP key
SEC-RECRUIT-02recruitment-apicandidate.repositories.ts:1324-1338SQL injection ผ่าน dynamic EXEC stored procedure string (connection ai)
SEC-AIRECRUIT-01ai-recruitment-api.env:2,5,7,9-10,11Production credential + OpenAI/remove.bg/HCTI API key ที่มีค่าใช้จ่ายจริง หลุดเข้า git
SEC-AIRECRUIT-02ai-recruitment-apimiddleware/verifyJWT.js:7-40ไม่มี authorization ระดับ role/scope — ทุกคนที่มี JWT (จาก secret ที่ share) เรียก AI generation ได้ไม่จำกัด
SEC-PMS-01pms-apisrc/modules/budget/budget.controller.ts:49-53GET /budget/getEmployeeSalary เป็น @Public() — คืนเงินเดือนพนักงานไม่ต้อง login
SEC-PMS-02pms-api.env:12,19,26,33,41,45, vtrc-gcp-sa-key.jsonCredential (UAT) + JWT secret ที่ share กับ prod ของ 3 service อื่น หลุดเข้า git
SEC-CHAT-01chat-center-apisrc/modules/chat/chat.service.ts:103-157, src/modules/tags/tags.service.ts:55-61Raw SQL string interpolation จาก query param ผู้ใช้ — SQL injection
SEC-CHAT-04chat-center-api.env:10-11,26,28-29.env commit เข้า git — MSSQL sa (h@ckm3SA?), MongoDB, LINE channel secret/token
SEC-JOBSCHED-01job-scheduler-api.env:9-11,18.env commit เข้า git — MSSQL sa password + RSA-format secret key ร่วมกับหลาย repo
SEC-COMMON-01vtrc-commonfile.controller.ts:18,24, address.controller.ts:14,20,26,32,38,44, bank.controller.ts:13,19, .env:12ทุก endpoint จริงเข้าถึงได้แบบไม่ auth จริง (@Public() หรือ secret ที่ commit ทำให้ forge JWT ได้)
SEC-COMMON-03vtrc-common.env:11,17.env commit — MSSQL sa password + SECRET_KEY (RSA format) ร่วมกับ chat-center-api/job-scheduler-api
SEC-WORKFLOW-01workflow-apisrc/main.ts:9-82, src/common/auth/jwt-actor.util.ts:1-4,33-47, src/modules/ipd/ipd-user.util.ts:20-65ไม่มี JWT guard ระดับ global/module ใดในทั้ง repo — role อนุมานจาก payload ที่ไม่ verify signature
SEC-WORKFLOW-02workflow-api.env.example:11,31,44.env.example มีรหัสผ่านจริง — AI_ROUTER_API_KEY, DB_PMS_PASSWORD, MSSQL sa

sso-api ไม่มี Critical finding (สูงสุดคือ High — CORR-SSO-01)

Volume 7 · Meeting Platform (2 finding)

IDRepofile:lineคำอธิบาย
SEC-MTVTRC-01meeting-vtrc-api.envprod:1-9 (และ .envdev/.envuat).envdev/.envuat/.envprod commit เข้า git plaintext — API_KEY, SECRET_JWT_MEETING, MAIL_PASS
SEC-MTVTRC-02meeting-vtrc-apiroutes/mockdelatlast/mockuser.ts:29-60, mount app.ts:209-210/meeting/mockuser/one ไม่มี auth — คืน PII จริง (ชื่อ, อีเมล, เบอร์โทร) hardcode ในซอร์ส

meeting-backoffice และ meeting-backoffice-new ไม่มี Critical finding

Volume 8 · Mobile (3 finding)

IDRepofile:lineคำอธิบาย
SEC-MOBILE-01vtrc-mobilesrc/utils/login.js:16-42RSA private key (PEM เต็ม) hardcode ในซอร์สที่ compile เข้า JS bundle
SEC-MOBILE-02vtrc-mobileandroid/app/build.gradle:174-179Android release keystore path + storePassword/keyPassword/keyAlias plaintext commit
SEC-NEW-01new-vtrc-mobilesrc/constants/RSAKey.ts:11-38RSA private key เดียวกับ vtrc-mobile ถูก copy มา hardcode ซ้ำ

vtrc-application-front ไม่มี Critical finding

Volume 9 · OCR & Auxiliary (2 finding)

IDRepofile:lineคำอธิบาย
SEC-RCWEB-01recruitment-web.env:2,9, .env.uat:2,7, src/utils/cryptoJs.js:1-32.env/.env.dev/.env.uat tracked ใน git — REACT_APP_SECRET_KEY/REACT_APP_PRIVATE_KEY เข้ารหัส PII ผู้สมัครงานฝังอยู่ในทั้ง git history และ bundle
SEC-REPORTLOG-01report-logrequest_2023-02-17.log (และ -18, -19 เป็นอย่างน้อย จากทั้งหมด 50 ไฟล์)ไฟล์ request_*.log มี citizenId/birthDate/empCode จริงของผู้ใช้ในรูปแบบ plaintext commit เข้า git

vtrc-ocr-api ไม่มี Critical finding


สรุปจำนวนต่อ repo

Repoจำนวน Critical
vtrc-api4
cu-central-api6
centralize-api4
vtrc-backoffice-new1
vtrc-rc-backoffice3
2way-api4
2way-line-service1
2way-vtrc-api3
benefit-api2
recruitment-api2
ai-recruitment-api2
pms-api2
chat-center-api2
job-scheduler-api1
vtrc-common2
workflow-api2
meeting-vtrc-api2
vtrc-mobile2
new-vtrc-mobile1
recruitment-web1
report-log1
รวม48

หมายเหตุความคลาดเคลื่อนที่พบระหว่างสังเคราะห์Volume 6 index.md รายงานยอดรวม Critical ของกลุ่ม Domain Microservices ไว้ที่ 16 (ระบุ benefit-api = 3) แต่การอ่าน benefit-api/06-scorecard.md ตรงพบว่ามีเพียง 2 finding ที่ mark หัวข้อ "Severity: Critical" จริง (SEC-BENEFIT-01, SEC-BENEFIT-02SEC-BENEFIT-03 อยู่ใต้หัวข้อ "Severity: High") ตารางในบทนี้ยึดตาม scorecard รายไฟล์เป็นหลัก (2 สำหรับ benefit-api) ทำให้ยอดรวม Volume 6 ที่ถูกต้องคือ 15 ไม่ใช่ 16 — ควรแก้ตัวเลขใน Volume 6 index.md ให้ตรงกับ scorecard ต้นทาง (ดู 12.4 สำหรับ debt ID ของความคลาดเคลื่อนเชิง documentation นี้)


Repo ที่ไม่มี Critical finding เลย

vtrc-backoffice, vtrc-web, 2way-batch, 2way-meeting-backoffice, sso-api, meeting-backoffice, meeting-backoffice-new, vtrc-application-front, vtrc-ocr-api — ไม่ได้แปลว่าไม่มีความเสี่ยงเลย (หลายตัวมี High finding ที่ควรแก้เช่นกัน) แต่ไม่ถึงระดับที่ scorecard ต้นทาง mark เป็น Critical


Pattern เชิงระบบที่ทำให้เกิด 48 finding นี้ ดู 12.4 Scorecard