Commit d3dea9c
committed
fix(cortex-cli): integrate allows_risk() for proper autonomy level validation
Address Greptile review feedback by actually calling the allows_risk() method
in the exec command approval flow. Previously, the security fix only added the
method but did not integrate it into the command execution path.
Changes:
- Replace simple AutonomyLevel::ReadOnly check with allows_risk(risk, command)
- Extract risk_level from sandbox_assessment if available
- Pass actual command string to validate read-only commands properly
- Provide clearer error messages including risk level and autonomy mode1 parent 239e0af commit d3dea9c
1 file changed
+23
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
481 | 492 | | |
482 | 493 | | |
483 | 494 | | |
| |||
0 commit comments