|
| 1 | +{ |
| 2 | + "scoring_categories": { |
| 3 | + "breaking_changes": { |
| 4 | + "weight": 0.50, |
| 5 | + "items": [ |
| 6 | + { |
| 7 | + "name": "S3 Backend: Removal of deprecated IAM role attributes", |
| 8 | + "patterns": [ |
| 9 | + "(?i)s3.*backend", |
| 10 | + "(?i)assume.*role", |
| 11 | + "(?i)deprecated.*attribute", |
| 12 | + "role_arn|session_name|external_id|policy" |
| 13 | + ], |
| 14 | + "weight": 0.15 |
| 15 | + }, |
| 16 | + { |
| 17 | + "name": "S3 Backend: Migration to assume_role block", |
| 18 | + "patterns": [ |
| 19 | + "assume_role\\s*\\{", |
| 20 | + "(?i)before.*after|migration.*example", |
| 21 | + "(?i)role_arn.*moved|session_name.*moved" |
| 22 | + ], |
| 23 | + "weight": 0.10 |
| 24 | + }, |
| 25 | + { |
| 26 | + "name": "Moved Blocks: resource. prefix requirement", |
| 27 | + "patterns": [ |
| 28 | + "(?i)moved.*block", |
| 29 | + "resource\\..*identifier", |
| 30 | + "(?i)prepend.*resource\\.", |
| 31 | + "(?i)type.*name.*match.*top.*level" |
| 32 | + ], |
| 33 | + "weight": 0.15 |
| 34 | + }, |
| 35 | + { |
| 36 | + "name": "Moved Blocks: Migration examples", |
| 37 | + "patterns": [ |
| 38 | + "moved\\s*\\{", |
| 39 | + "from\\s*=.*to\\s*=", |
| 40 | + "resource\\.data|resource\\.locals|resource\\.module" |
| 41 | + ], |
| 42 | + "weight": 0.10 |
| 43 | + }, |
| 44 | + { |
| 45 | + "name": "Sensitive Values: Conditional expression behavior change", |
| 46 | + "patterns": [ |
| 47 | + "(?i)sensitive.*conditional|conditional.*sensitive", |
| 48 | + "(?i)mark.*preserved|mark.*propagat", |
| 49 | + "\\?.*:.*sensitive|sensitive.*\\?.*:" |
| 50 | + ], |
| 51 | + "weight": 0.15 |
| 52 | + }, |
| 53 | + { |
| 54 | + "name": "Sensitive Values: nonsensitive() override usage", |
| 55 | + "patterns": [ |
| 56 | + "nonsensitive\\(", |
| 57 | + "(?i)override.*sensitive|explicit.*non.?sensitive", |
| 58 | + "(?i)false.*\\?.*sensitive.*:.*value" |
| 59 | + ], |
| 60 | + "weight": 0.10 |
| 61 | + }, |
| 62 | + { |
| 63 | + "name": "Ephemeral Resources: Introduction and impact", |
| 64 | + "patterns": [ |
| 65 | + "(?i)ephemeral.*resource|ephemeral.*value", |
| 66 | + "(?i)not.*stored.*state|secret.*handling", |
| 67 | + "ephemeral_resource|ephemeral.*input|ephemeral.*output" |
| 68 | + ], |
| 69 | + "weight": 0.15 |
| 70 | + }, |
| 71 | + { |
| 72 | + "name": "S3 Backend: Native state locking", |
| 73 | + "patterns": [ |
| 74 | + "(?i)s3.*native.*lock|native.*state.*lock", |
| 75 | + "(?i)dynamodb.*deprecat", |
| 76 | + "(?i)state.*lock.*s3" |
| 77 | + ], |
| 78 | + "weight": 0.10 |
| 79 | + } |
| 80 | + ] |
| 81 | + }, |
| 82 | + "migration_steps": { |
| 83 | + "weight": 0.30, |
| 84 | + "items": [ |
| 85 | + { |
| 86 | + "name": "S3 Backend: Step-by-step assume_role migration", |
| 87 | + "patterns": [ |
| 88 | + "(?i)step.*1|first.*step|1\\.", |
| 89 | + "(?i)update.*backend.*configuration|modify.*s3.*backend", |
| 90 | + "assume_role\\s*\\{" |
| 91 | + ], |
| 92 | + "weight": 0.25 |
| 93 | + }, |
| 94 | + { |
| 95 | + "name": "Moved Blocks: Step-by-step resource. prefix migration", |
| 96 | + "patterns": [ |
| 97 | + "(?i)step.*\\d|\\d+\\.", |
| 98 | + "(?i)search.*moved.*block|find.*moved", |
| 99 | + "(?i)add.*resource\\.|prepend.*resource\\." |
| 100 | + ], |
| 101 | + "weight": 0.25 |
| 102 | + }, |
| 103 | + { |
| 104 | + "name": "Sensitive Values: Identifying affected conditionals", |
| 105 | + "patterns": [ |
| 106 | + "(?i)identify.*sensitive.*conditional|find.*sensitive", |
| 107 | + "(?i)test.*plan|terraform.*plan", |
| 108 | + "(?i)warning.*sensitive" |
| 109 | + ], |
| 110 | + "weight": 0.20 |
| 111 | + }, |
| 112 | + { |
| 113 | + "name": "Sensitive Values: Applying nonsensitive() fixes", |
| 114 | + "patterns": [ |
| 115 | + "(?i)wrap.*nonsensitive|add.*nonsensitive", |
| 116 | + "nonsensitive\\(", |
| 117 | + "(?i)example.*fix|how.*to.*fix" |
| 118 | + ], |
| 119 | + "weight": 0.15 |
| 120 | + }, |
| 121 | + { |
| 122 | + "name": "Testing migration", |
| 123 | + "patterns": [ |
| 124 | + "(?i)test.*migration|validat.*upgrade", |
| 125 | + "terraform.*init|terraform.*plan", |
| 126 | + "(?i)verify.*no.*error|confirm.*success" |
| 127 | + ], |
| 128 | + "weight": 0.15 |
| 129 | + } |
| 130 | + ] |
| 131 | + }, |
| 132 | + "code_examples": { |
| 133 | + "weight": 0.15, |
| 134 | + "items": [ |
| 135 | + { |
| 136 | + "name": "S3 Backend: Before/after assume_role example", |
| 137 | + "patterns": [ |
| 138 | + "```.*hcl|```.*terraform", |
| 139 | + "(?i)before:|# before", |
| 140 | + "(?i)after:|# after", |
| 141 | + "assume_role\\s*\\{" |
| 142 | + ], |
| 143 | + "weight": 0.30 |
| 144 | + }, |
| 145 | + { |
| 146 | + "name": "Moved Blocks: Before/after resource. prefix example", |
| 147 | + "patterns": [ |
| 148 | + "```", |
| 149 | + "(?i)before:|# before", |
| 150 | + "(?i)after:|# after", |
| 151 | + "moved\\s*\\{.*from.*=.*to.*=" |
| 152 | + ], |
| 153 | + "weight": 0.30 |
| 154 | + }, |
| 155 | + { |
| 156 | + "name": "Sensitive Values: nonsensitive() usage example", |
| 157 | + "patterns": [ |
| 158 | + "```", |
| 159 | + "nonsensitive\\(", |
| 160 | + "\\?.*:.*sensitive|sensitive.*\\?.*:" |
| 161 | + ], |
| 162 | + "weight": 0.25 |
| 163 | + }, |
| 164 | + { |
| 165 | + "name": "Ephemeral Resources: Basic usage example", |
| 166 | + "patterns": [ |
| 167 | + "```", |
| 168 | + "ephemeral_resource|ephemeral.*{", |
| 169 | + "(?i)ephemeral.*input|ephemeral.*output" |
| 170 | + ], |
| 171 | + "weight": 0.15 |
| 172 | + } |
| 173 | + ] |
| 174 | + }, |
| 175 | + "documentation_structure": { |
| 176 | + "weight": 0.05, |
| 177 | + "items": [ |
| 178 | + { |
| 179 | + "name": "Overview section", |
| 180 | + "patterns": [ |
| 181 | + "(?i)^#+.*overview|^#+.*introduction|^#+.*summary", |
| 182 | + "(?i)terraform.*1\\.9.*1\\.10|v1\\.9.*v1\\.10" |
| 183 | + ], |
| 184 | + "weight": 0.20 |
| 185 | + }, |
| 186 | + { |
| 187 | + "name": "Breaking Changes section", |
| 188 | + "patterns": [ |
| 189 | + "(?i)^#+.*breaking.*change" |
| 190 | + ], |
| 191 | + "weight": 0.30 |
| 192 | + }, |
| 193 | + { |
| 194 | + "name": "Migration steps section", |
| 195 | + "patterns": [ |
| 196 | + "(?i)^#+.*migration|^#+.*upgrad.*step|^#+.*how.*to" |
| 197 | + ], |
| 198 | + "weight": 0.20 |
| 199 | + }, |
| 200 | + { |
| 201 | + "name": "Testing section", |
| 202 | + "patterns": [ |
| 203 | + "(?i)^#+.*test|^#+.*validat|^#+.*verif" |
| 204 | + ], |
| 205 | + "weight": 0.15 |
| 206 | + }, |
| 207 | + { |
| 208 | + "name": "Rollback guidance section", |
| 209 | + "patterns": [ |
| 210 | + "(?i)^#+.*rollback|^#+.*revert|^#+.*downgrad" |
| 211 | + ], |
| 212 | + "weight": 0.15 |
| 213 | + } |
| 214 | + ] |
| 215 | + } |
| 216 | + } |
| 217 | +} |
0 commit comments