security_doctor_lints 0.1.0 copy "security_doctor_lints: ^0.1.0" to clipboard
security_doctor_lints: ^0.1.0 copied to clipboard

IDE lints for security_doctor: OWASP MASVS and CWE mapped security findings from SD001-SD004 and SD008 shown right in the editor, with quick fixes, via custom_lint.

example/lib/main.dart

// Every Dart-side security_doctor rule fires in this file. Open it in
// an IDE with custom_lint enabled to see the squiggles.
import 'dart:developer';

// sd001 — hardcoded secret.
const awsAccessKey = 'AKIAIOSFODNN7RE4LKEY';

// sd002 — cleartext URL (comes with a "Use https://" quick fix).
const apiBase = 'http://api.example.com/v1';

Future<void> persist(dynamic prefs, String authToken) async {
  // sd003 — sensitive key in SharedPreferences.
  await prefs.setString('authToken', authToken);
}

void hash(dynamic md5, List<int> bytes) {
  // sd004 — weak cryptography.
  md5.convert(bytes);
}

void dump(String password) {
  // sd008 — credentials in log output.
  log('password: $password');
}
1
likes
60
points
101
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

IDE lints for security_doctor: OWASP MASVS and CWE mapped security findings from SD001-SD004 and SD008 shown right in the editor, with quick fixes, via custom_lint.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, custom_lint_builder, security_doctor

More

Packages that depend on security_doctor_lints