-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a helper for saving command output in a file
This will be a very needed functionality: plugin runs a command, and its output needs to be saved in a dedicated file, usualy because the output represents some interesting, standalone piece of information. For example, an AVC denial report generated by `ausearch`. If it would be the only such actor, it would be fine to keep the implementation in the `avc` plugin. But, with the advent of saving results of `prepare` and `finish` phases, the question is, if I get `results.yaml` for a `prepare` step, would it even contain anything besides `pass` or `error`? Well, it can contain logs of commands like `ansible-playbook` or shell scripts. And suddenly we have several plugins that may need to save some walls of texts, usually produced by a command, in files, and then link those files to results and present them to user. And because of that, it makes sense to provide a helper function that would produce unified output for all of them? Why should `avc` separate stdout and stderr by two lines and `prepare/shell` with just one? Not on my watch.
- Loading branch information
Showing
5 changed files
with
172 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters