Commit 96b34f9
authored
release/0.1.0-dev.6 (#17)
* feat: add core suppression infrastructure
- Add Suppression class to parse shield_ignore comments
- Support line-level and file-level suppression
- Add toUnderscoreCase() method to RuleId enum
- Handle underscore format rule IDs for consistency
* feat: add mixed configuration format support
- Add RuleConfig class for parsing string and object rule formats
- Update LintRuleConverter to handle dynamic rule configurations
- Support per-rule exclude patterns in configuration
- Regenerate shield_config.g.dart with build_runner
* feat: integrate suppression system with analysis engine
- Add suppression checking in SecurityAnalyzer._analyzeUnit()
- Implement file exclusion check in LintRule.check() method
- Update LintIssue to use underscore format rule IDs
- Support three-layer filtering: global, per-rule, and line-level
* test: add comprehensive suppression system tests
- Add unit tests for Suppression class parsing
- Test line-level and file-level suppression
- Test multiple rule suppression in single comment
- Add integration test data file with example suppressions
* test: update configuration tests and fix existing tests
- Add tests for mixed format rule configuration parsing
- Update existing tests to use underscore format rule IDs
- Test string and object format rule configurations
- Fix prefer_secure_random_test to expect correct rule ID format
* docs: update example configuration with mixed format rules
- Update example shield_options.yaml with mixed format rules
- Include per-rule exclude patterns in configuration
- Add comment examples showing new syntax
* feat: add test reorganization plan and create fixtures/helpers structure
- Add comprehensive test reorganization plan document
- Create test/fixtures/ directory with sample Dart files and configs
- Create test/helpers/ directory with test utilities
- Add TestAnalyzer helper for AST analysis in tests
- Add MockWorkspace helper for workspace mocking
- Add TestDataBuilder helper for test data generation
- Add sample vulnerable, secure, and mixed code files
- Add sample configuration files (minimal, complete, invalid)
- Add suppression example file for testing
* test: add comprehensive unit tests for enums
- Add RuleId enum tests covering fromYamlName and toUnderscoreCase methods
- Add Severity enum tests covering values, analysisSeverity mapping, and comparison
- Add RuleStatus enum tests covering lifecycle status management
- Test edge cases, error handling, and enum integrity
- Ensure 100% coverage for all enum types
* test: add comprehensive unit tests for models
- Add MatchingPattern tests covering constructor, regex property, fromJson factory
- Add ShieldSecrets tests covering constructor, containsSecret method, YAML parsing
- Add LintIssue tests covering constructor, withRule factory, JSON serialization
- Test error handling, edge cases, and property validation
- Ensure 100% coverage for all model classes
* test: add unit tests for core components
- Add RuleRegistry tests covering rule creation, registration, and immutability
- Add Workspace tests covering path normalization, config management, and file operations
- Test rule creation consistency and property validation
- Test workspace edge cases including parent directory references
- Ensure comprehensive coverage for core security analyzer components
* refactor: move existing tests to new unit test structure
- Move configuration tests to test/unit/security_analyzer/configuration/
- Move utility tests to test/unit/security_analyzer/utils/ and test/unit/utils/
- Update import paths to use new fixtures directory structure
- Fix type inference issues in test files
- Maintain all existing test functionality while improving organization
* refactor: move PreferSecureRandom test to new structure
- Move prefer_secure_random_test.dart to test/unit/security_analyzer/rules/rules_list/crypto/
- Maintain all existing test functionality
- Improve test organization by categorizing security rules
* cleanup: remove old test files after reorganization
- Remove old test/data/ directory files
- Remove old test/src/ directory structure
- Complete migration to new test organization structure
- All tests now properly organized in unit/, fixtures/, and helpers/ directories
* style: formatting
* feat!: convert configuration from kebab-case to snake_case
BREAKING CHANGE: Configuration fields and rule names now use snake_case instead of kebab-case.
- Change FieldRename from kebab to snake in configuration classes
- Update RuleId.fromYamlName() to parse snake_case instead of kebab-case
- Update error messages to use snake_case field names
- Update rule config documentation examples
This aligns the configuration format with Dart's analysis_options.yaml conventions.
* build: regenerate code generation files for snake_case
Update generated files to use snake_case field names instead of kebab-case.
* refactor: update suppression and workspace for snake_case
- Simplify suppression canonicalization to remove kebab-case compatibility
- Update default config template to use snake_case rule names
- Update suppression comments to use snake_case format
* docs: update examples and documentation for snake_case
- Update example/shield_options.yaml to use snake_case format
- Update README.md configuration examples
- Align documentation with new snake_case naming convention
* test: update test fixtures for snake_case configuration
- Update all YAML test fixtures to use snake_case format
- Update inline config strings in test helpers
- Ensure tests use the new snake_case naming convention
* test: update unit tests for snake_case format
- Update lint rule converter tests to expect snake_case rule names
- Update rule ID tests to parse snake_case instead of kebab-case
- Update suppression tests to use snake_case format
- Update workspace tests to expect snake_case in default config
- Remove backward compatibility tests for kebab-case
* docs: update changelog for snake_case breaking change
Document the breaking change from kebab-case to snake_case configuration format.
Includes detailed migration guide for all affected configuration fields and rule names.
* chore: update CHANGELOG
* chore: raise version
* style: formatting
* chore: update description
* chore: update todos
* chore: README
* chore: update README
* chore: update todos1 parent 1c25729 commit 96b34f9
File tree
43 files changed
+2413
-104
lines changed- example
- lib
- assets
- src/security_analyzer
- configuration
- rules
- enums
- models
- rule
- utils
- test
- fixtures
- configs
- dart_files
- helpers
- src/security_analyzer/configuration
- unit
- security_analyzer
- configuration
- rules
- enums
- models
- rules_list/crypto
- utils
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+2413
-104
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
20 | | - | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | | - | |
119 | | - | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | | - | |
123 | | - | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
24 | | - | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | | - | |
14 | | - | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
18 | 29 | | |
0 commit comments