Skip to content

Commit

Permalink
docs: add warning about reading stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Dec 4, 2023
1 parent 1750fa5 commit 834593a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/docs/advanced/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ $ trivy image --format json --output plugin=<plugin_name> [--output-plugin-arg <

Since scan results are passed to the plugin via standard input, plugins must be capable of handling standard input.

!!! warning
To avoid Trivy hanging, you need to read all data from `Stdin` before the plugin exits successfully or stops with an error code.

While the example passes JSON to the plugin, other formats like SBOM can also be passed (e.g., `--format cyclonedx`).

If a plugin requires flags or other arguments, they can be passed using `--output-plugin-arg`.
Expand Down

0 comments on commit 834593a

Please sign in to comment.