Hi @Prabhuguna,
Thanks for reaching out, and welcome to the Community!
Secrets detection is available in Community Build, but looking at your config, there are a couple of things to fix.
You have sonar.text.inclusions defined twice, the second overrides the first:
sonar.text.inclusions=**/*.bicep,**/*.json ← this gets overridden
...
sonar.text.inclusions=**/*.env ← only this takes effect
So right now, only .env files are covered by sonar.text.inclusions. Your .json files aren’t in scope for secrets scanning via that path. Merge them into a single value:
sonar.text.inclusions=**/*.bicep,**/*.json,**/*.env
One thing to note, the engine doesn’t flag arbitrary "password": "somevalue" fields, it matches against a catalog of specific secret patterns (AWS keys, Azure SAS tokens, connection strings, API tokens, etc.).
For your test to work, use a realistic-looking credential that matches one of the built-in patterns, for example an Azure Storage connection string or a Base64-encoded token. Can you share some test code so we can see what you’re trying to trigger?
Community Build ships with basic secrets detection. Developer Edition adds 400+ patterns covering 340+ rules. If the specific secret type you’re testing isn’t in the Community Build’s pattern catalog, it simply won’t be detected regardless of configuration. See the edition comparison for details.
For ARM templates, two analyzers run side by side: the ARM analyzer (which finds security misconfigurations like open firewall rules, missing encryption) and the JSON analyzer (which enables secrets scanning when sonar.json.activate=true). Your sonar.json.activate=true is correct for this, but the file still needs to contain a pattern the secrets engine recognises.
When sonar.text.inclusions.activate=true, only files tracked by git are included in the secrets scan. Make sure your ARM template file is committed to the repository, not gitignored.
Run your analysis with debug logging to confirm which files are being picked up:
sonar.verbose=true
Look for lines like Analyzing language associated files and files included via "sonar.text.inclusions" that are tracked by git, that’ll tell you which files the secrets engine is looking at.
Hope that helps.
Best regards,
Stevan