Suppressing S2068 in appsettings.json

I am receiving the following warning about the appsettings.json file in one of my projects:
Warning S2068: “password” detected here, make sure this is not a hard-coded credential.

I don’t want to exclude the entire file. Is there a way to suppress the warning for parts of a json file similar to the “#pragma warning disable” in c# source?

Hey there.

Out of curiosity – why not just mark it as “Safe”?

To be honest, I couldn’t find it. I didn’t realize it was under Security Review. That works, thanks.

1 Like