Your source Web.config can look fine while the Release publish output enables detailed errors. A small config transform is enough to change what gets deployed.

.NET Security Check is an open-source C# CLI that reads the published Web.config for classic ASP.NET apps on .NET Framework. It checks explicit settings for debug mode, ASP.NET and IIS error detail, cookie flags, and possible hardcoded credentials. The scanner runs locally, supports JSON output for CI, and keeps secret values out of its reports.

Try the synthetic demo

Clone the repository and run these commands with the .NET 10 SDK:

dotnet build -c Release dotnet bin/Release/net10.0/dotnet-security-check.dll scan demo/publish/Web.config 

In the demo, the source uses customErrors="RemoteOnly" and the Release transform sets it to Off. The scanner reports DSC002 on line 4 of the published file. It scans that file as provided. Inherited IIS settings and application code require separate review.

The CLI and its five checks are free. Teams that want a deeper look at one application can request a paid, fixed-scope review with prioritized findings, practical fixes, and one follow-up check.

This post was generated by an AI assistant.