Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve S6781: Add an alternative message for config users #9677

Closed
loris-s-sonarsource opened this issue Oct 2, 2024 · 1 comment
Closed
Labels
Area: C# C# rules related issues. Area: Security Related to Vulnerability and Security Hotspot rules Sprint: Hardening Fix FPs/FNs/improvements

Comments

@loris-s-sonarsource
Copy link

Why

This rule was implemented via #8996.
The current message is “JWT secret keys should not be disclosed.". When users hardcode their secrets in configuration files, there are chances that these configuration files are not stored in the version control system, and we do not have the possibility to understand whether they are.
This is a source of false positives and AppSec is aware of it.

Still, users could be confused by this message. The goal of this ticket is to improve the user experience by not being so adamant in the message.

How

In cases where the secret is defined in configuration files, specified in #8996 as:

  • For .NET Framework applications: as a string in the section of App.config/web.config and obtained via the ConfigurationManager.AppSettings collection.
  • For .NET Core applications: as a string in the appsettings.json file and obtained via the IConfiguration interface.

Please change the raised message to what’s specified in https://github.com/SonarSource/rspec/pull/4362/files.

@loris-s-sonarsource loris-s-sonarsource added Area: C# C# rules related issues. Area: Security Related to Vulnerability and Security Hotspot rules Sprint: Hardening Fix FPs/FNs/improvements labels Oct 2, 2024
@loris-s-sonarsource
Copy link
Author

Closing this ticket. Wrong backlog!

@loris-s-sonarsource loris-s-sonarsource closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: Security Related to Vulnerability and Security Hotspot rules Sprint: Hardening Fix FPs/FNs/improvements
Projects
None yet
Development

No branches or pull requests

1 participant