GovTech Modernization · Read-only Audit Findings

e-District Uttarakhand

Legacy ASP.NET Web Forms citizen-services portal assessed across four independent lenses — security, maintainability, complexity, and testability — with an evidence-backed migration plan.

CriticalHighMediumLow
Platform
.NET 3.5
Web Forms · VS2008
Codebase
~2,150
files · ~91.6K VB LOC
Security posture
CRITICAL
5 critical findings
Test coverage
0%
no tests · no CI
Target
.NET 10
Blazor · C# · LTS
Risk posture
four lenses
CRITICAL
Security
Poor
Maintainability
High
Complexity (concentrated)
None
Testability
Findings by severity
per register
Secrets exposed
active-incident grade
Plaintext DB credentials, API key & session key in web.config F-05
Private signing certificate committed and made web-downloadable F-04
Open DocUp.ashx hands out other people's documents F-02

→ Closed first, in Phase 0 (days, not months).

Consolidated risk heatmap
modules × four lenses · click a row or cell
Security
Debt
Complexity
Test
Root-cause convergence — one defect, seen four ways
Root causeSecurityTech DebtComplexityTest
DAL bypass + inline string-concatenated SQL
closes U-4
F-01F-02F-03
TD-04TD-06TD-09TD-16
5.6
CG-06
Logic trapped in fat Page_Load / handlers
closes U-8
F-08
TD-08
H1H5H12
CG-01CG-04CG-05
No verification fabric (no tests / compile / logging)
closes U-3
(enables all)
TD-01TD-02TD-03TD-07
7
whole audit
God classes / god modules
closes U-8
TD-05
C1C3C6
CG-06
Copy-paste duplication of files/logic
closes U-7
F-17
TD-11TD-12
5.5
CG-22CG-24
Secrets in source / web-downloadable
closes U-1
F-04F-05
TD-21

The big-ticket items are not separate problems. Fixing the root cause once retires findings across all four registers — which is why U-4 (centralize data access) is the single highest-leverage move in the codebase.

Risk register
· · ·
IDFindingSeverityEffortPriorityLocation
F-01Systemic SQL injection via string-concatenated SQLCriticalLP0~190 files · BL.vb, Dal.vb
F-02Unauthenticated SQLi + document IDOR in DocUp.ashxCriticalSP0Certificates/Preview/DocUp.ashx
F-03Unauthenticated web-service SQLi (mobile API)CriticalMP0WSM.vb, Edistmservice.vb
F-04Private signing cert committed & web-downloadableCriticalSP0nicesign.pfx · web.config
F-05Plaintext DB credentials, API key & session keyCriticalSP0web.config
F-06Verbose errors + debug enabled; exceptions reflectedHighSP1web.config · multiple pages
F-07Broken/absent framework authorizationHighMP1web.config · no LoginPage/web.config
F-08Weak auth & credential storage (unsalted MD5)HighLP1SecureSewaLogin.aspx.vb
F-09ValidateRequest="false" + reflected XSSHighMP1login / edit pages
F-10Web services via HttpGet/HttpPost + WSDL metadataHighSP1web.config
F-11Sensitive data export from public / unauth servicesHighMP1Download.aspx.vb
F-12No CSRF protection / ViewStateUserKey absentMediumMP2app-wide
F-13Weak machineKey (3DES, auto-generated)MediumSP2web.config
F-14Transport/cookie hardening gapsMediumSP2web.config
F-15Session management weaknessesMediumMP2web.config · login
F-16Excessive request size + IDOR file handlingMediumSP2file handlers
F-17Duplicated code/config trees multiply attack surfaceLowLP3*1 forks · bin - Copy
TD-01No automated tests anywhereCriticalLP1
TD-02Website-project model → runtime-only errorsCriticalLP1
TD-03Swallowed exceptions, no central loggingCriticalMP1
TD-04ADO.NET boilerplate never centralized (DAL bypassed)CriticalLP1
TD-05God classes mixing unrelated responsibilitiesHighLP1
TD-06Inline SQL string concatenation app-wideHighLP1
TD-08Business logic + auth in presentation layerHighLP1
TD-11Massive page/folder duplication (copy-paste forks)HighLP1
TD-13EOL platform: .NET 3.5 / Web Forms / VS2008HighLP1
Complexity hotspots
FileFunctionLOCCCCogNestPri
ApprovalReport1.aspx.vbPage_Load314762686P0
ApprovalReport.aspx.vbPage_Load277772586P0
RemarkNewApplication.aspx.vbPage_Load280652276P0
SecureSewaLogin.aspx.vbbtn_login_Click2773017310P0
MasterPage.master.vbbtn_login_Click2612817110P0
Foodlicenes.aspx.vbcheckentry366811504P1
DeathRegistration.aspx.vbcheckentry322731474P1
WidowPensionRural.aspx.vbcheckentry357801263P1
DomicileCertificate.aspx.vbcheckentry298651394P1
receipt.aspx.vbPage_Load199591705P1
God modules
size = risk
WebServicem.vb2,173 LOC · 55 methods
BL.vb2,176 LOC · 87 methods
Edistmservice.vb1,941 LOC · 40 methods
WSM.vb1,433 LOC · 42 methods
Dal.vb590 LOC · 18 methods

Breadth, not depth: BL.vb has 87 mostly-simple methods but is called app-wide — fragile to touch. WebServicem.vb has methods taking up to 20 parameters.

~89
dangerous functions
91.6%
functions simple (CC≤10)