Skip to content

damienbod/aspnetcore-scan-testing

Repository files navigation

ASP.NET Core scan testing

Note

All Azure related secrets are real secrets which got deactivated before pushing them to the repository

SonarQube Cloud

Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Reliability Rating Security Rating Technical Debt Maintainability Rating Vulnerabilities

other scans

.NET

.NET

TruffleHog

GitHub secret scanning (reported under Security tab)

gh-secret-scanning-push-protection-alert

gh-secret-scanning-mail-notification

secrets added to the appsettings.json

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=tcp:mfafidomeid.database.windows.net,1433;Initial Catalog=gridcard;Persist Security Info=False;User ID=damienadmin;Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;",
    "AzureServiceBus": "Endpoint=sb://damienbod-service-bus.servicebus.windows.net/;SharedAccessKeyName=coolkey;SharedAccessKey=ef13VEvOsypQT4Ca0F4w/LIS1susAkzkP+ASbDTk5GI="
  },
  "AzureAd": {
    "ClientSecret": "zkI8Q~HUbCVLgmdbDA6u9XkdA27zpZbqVdEz7a~z",
  },
  "ApiTwo": {
    "accessToken": "eygregertg4ert3gtrhzi76gfnDghmjhmjhmdfrsfreterhgfndghvbfvb"
  },
  "ApiThree": {
    "key": "fgfgfgmr43rfef)333ffrvvdedcggfd43r43gtjnumjnb"
  },
  "CosmosSecrets": {
    "PrimaryKey": "XYOWweBXrNUTlQR1lAi4FhurQa0RX6IfN4PvRWlwS3b7RjZ1vnTjJmi5ZKKW8riByAhtqgUxFqflACDbBtwnHA=="
  },
  "SecretMatchingGitHubPatternExactly": {
    "azure_app_configuration_connection_string": "Endpoint=https://rufer7-app-config.azconfig.io;Id=Rzwa;Secret=2j0xmEQpVWhIrXfjRoKpjtNXQzblP9dgNR9fLFa8rePX31E7s87AJQQJ99BDACYeBjFCQ7wWAAACAZACMRzn"
  }
}

secrets added to AzureStorageProvider.cs

private string _blobConnectionString = "https://sarufer7.blob.core.windows.net/test?sp=r&st=2025-06-18T11:07:27Z&se=2025-06-18T11:09:27Z&spr=https&sv=2024-11-04&sr=c&sig=JLS7wLGXxvFConsaEGWd4UeD%2BpfC2o9fYcMhH%2FAwnD8%3D";

private string _blobKey = "sp=r&st=2025-06-18T11:07:27Z&se=2025-06-18T11:09:27Z&spr=https&sv=2024-11-04&sr=c&sig=JLS7wLGXxvFConsaEGWd4UeD%2BpfC2o9fYcMhH%2FAwnD8%3D";

var blobClient2 = new BlobClient("https://sarufer7.blob.core.windows.net/test?sp=r&st=2025-06-18T11:07:27Z&se=2025-06-18T11:09:27Z&spr=https&sv=2024-11-04&sr=c&sig=JLS7wLGXxvFConsaEGWd4UeD%2BpfC2o9fYcMhH%2FAwnD8%3D", "test", "arbitrary-file.txt");

secrets added to Program.cs

var password = "admin1234";

Links

About

ASP.NET Core project with secrets in code and config files, used to validate code scanning tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •