Skip to content

DART-259 Modify rule S6291: Add Dart language #4990

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

Closed

Conversation

antonioaversa
Copy link
Contributor

@antonioaversa antonioaversa commented May 2, 2025

DART-259

Review

A dedicated reviewer checked the rule description successfully for:

  • logical errors and incorrect information
  • information gaps and missing content
  • text style and tone
  • PR summary and labels follow the guidelines

Copy link

sonarqube-next bot commented May 2, 2025

Quality Gate passed Quality Gate passed for 'rspec-tools'

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link

sonarqube-next bot commented May 2, 2025

Quality Gate passed Quality Gate passed for 'rspec-frontend'

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@antonioaversa antonioaversa marked this pull request as ready for review May 2, 2025 19:15
Copy link
Contributor

@egon-okerman-sonarsource egon-okerman-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please adjust the comments in the code samples to be consistent with other rules

import 'package:sqflite/sqflite.dart';

void openDb() async {
final db = await openDatabase("test.db"); // Noncompliant: no password support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
final db = await openDatabase("test.db"); // Noncompliant: no password support
final db = await openDatabase("test.db"); // Sensitive - no password support

import 'package:sqflite_sqlcipher/sqflite.dart';

void openDb() async {
final db = await openDatabase("test.db"); // Noncompliant: missing password
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
final db = await openDatabase("test.db"); // Noncompliant: missing password
final db = await openDatabase("test.db"); // Sensitive - missing password

import 'package:sqflite_sqlcipher/sqflite.dart';

void openDb() async {
final db = await openDatabase("test.db", password: "password"); // Compliant
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
final db = await openDatabase("test.db", password: "password"); // Compliant
final db = await openDatabase("test.db", password: "password");

@antonioaversa
Copy link
Contributor Author

antonioaversa commented May 5, 2025

Closing this PR since, during investigation work on Firestore, it was determined that the rule may not be relevant anymore in modern code, where Android takes care by default of local DB encryption.
The rule should be deprecated for both Java and Kotlin, see for https://sonarsource.atlassian.net/browse/SONARKT-654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants