Skip to content

feat: new security rules (Dart)#26

Closed
yardexx wants to merge 4 commits intorelease/0.1.0from
feature/new-security-rules
Closed

feat: new security rules (Dart)#26
yardexx wants to merge 4 commits intorelease/0.1.0from
feature/new-security-rules

Conversation

@yardexx
Copy link
Copy Markdown
Owner

@yardexx yardexx commented Jan 26, 2026

Status

IN DEVELOPMENT

Description

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@docs-page
Copy link
Copy Markdown

docs-page bot commented Jan 26, 2026

To view this pull requests documentation preview, visit the following URL:

docs.page/yardexx/dart_shield~26

Documentation is deployed and generated using docs.page.

@yardexx yardexx changed the base branch from master to release/0.1.0 January 26, 2026 16:09
- Add modular SARIF module (sarif_document, sarif_builder, sarif_reporter)
- Map dart_shield severity levels to SARIF levels (high->error, medium->warning, low/info->note)
- Support --reporter=sarif CLI option
- Add comprehensive tests (29 tests for SARIF module)
- Add GitHub Actions integration documentation

This enables:
- GitHub Security tab integration
- PR annotations showing security issues inline
- Tracking security issues over time
- Add BaselineManager for creating and loading baseline files
- Add `dart_shield baseline` command to create baseline from current issues
- Add `--baseline` option to analyze command to filter baselined issues
- Fingerprints are MD5 hashes of (ruleId:filePath:line)
- Baseline files are human-readable YAML format
- Add comprehensive tests (12 tests for baseline manager)

This enables teams to adopt dart_shield in existing projects
without being overwhelmed by legacy issues.
New rules:
- avoid_empty_catch: Detects empty catch blocks (CWE-390)
- avoid_logging_sensitive_data: Detects logging of sensitive variables (CWE-532)
- avoid_certificate_pinning_bypass: Detects SSL bypass patterns (CWE-295)
- avoid_dynamic_sql_queries: Detects SQL injection risks (CWE-89)
- avoid_shared_preferences_for_secrets: Detects unencrypted secret storage (CWE-312)
- avoid_insecure_file_storage: Detects sensitive file writes (CWE-922)

Total rules: 11 (5 existing + 6 new)
@yardexx yardexx force-pushed the feature/new-security-rules branch from 6e0708e to 37f57c9 Compare February 1, 2026 22:34
@yardexx yardexx closed this Feb 2, 2026
@yardexx yardexx deleted the feature/new-security-rules branch February 2, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant