Commit f27f6dd
committed
refactor(policies): simplify findings/violations handling after review
- Fix behavioral divergence between Rego and WASM engines for empty
findings: both now use len>0 check consistently
- Gracefully handle missing violations when findings is absent (no
default findings array required in policies)
- Pre-allocate violations slice in WASM engine
- Trim redundant deprecation comments
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>1 parent af3b233 commit f27f6dd
2 files changed
Lines changed: 11 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
218 | 216 | | |
219 | 217 | | |
220 | 218 | | |
| |||
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
236 | 230 | | |
237 | 231 | | |
238 | 232 | | |
239 | 233 | | |
240 | 234 | | |
241 | | - | |
242 | | - | |
243 | 235 | | |
244 | 236 | | |
245 | 237 | | |
| |||
250 | 242 | | |
251 | 243 | | |
252 | 244 | | |
| 245 | + | |
253 | 246 | | |
254 | 247 | | |
255 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | 209 | | |
211 | 210 | | |
212 | | - | |
| 211 | + | |
213 | 212 | | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
| 222 | + | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | 270 | | |
273 | 271 | | |
274 | 272 | | |
| |||
0 commit comments