policy: support reading policy from stdin via --file -

Allow passing policy content through stdin by specifying
"--file -" in the eval command. This enables piping policy
data without requiring a file on disk.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2026-03-23 11:13:46 -07:00
parent 7df7b4205b
commit 64cd4136d9
3 changed files with 77 additions and 4 deletions
+2 -1
View File
@@ -10,7 +10,8 @@ Evaluate policy for a source
| `--builder` | `string` | | Override the configured builder instance |
| `-D`, `--debug` | `bool` | | Enable debug logging |
| `--fields` | `stringSlice` | | Fields to evaluate |
| `--filename` | `string` | `Dockerfile` | Policy filename to evaluate |
| `-f`, `--file` | `string` | `Dockerfile` | Policy filename to evaluate |
| `--platform` | `string` | | Target platform for policy evaluation |
| `--print` | `bool` | | Print policy output |