diff options
| author | Ophestra <cat@gensokyo.uk> | 2024-12-22 13:20:33 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2024-12-22 13:20:33 +0900 |
| commit | 8a9ba5e0ad5536f9a09040ad5b1cfe3f38c8ff36 (patch) | |
| tree | be59db2ed72bd5964ed3e249cf3d1c5609502d9f /print.go | |
| parent | f608f28a6ab6fdba9c357913a28afe476f4f7344 (diff) | |
fortify: show short mode omit filesystems
Filesystem information can be quite noisy in permissive defaults.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'print.go')
| -rw-r--r-- | print.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -16,7 +16,7 @@ import ( "git.gensokyo.uk/security/fortify/internal/state" ) -func printShow(instance *state.State, config *fst.Config) { +func printShow(instance *state.State, config *fst.Config, short bool) { if flagJSON { v := any(config) if instance != nil { @@ -81,7 +81,7 @@ func printShow(instance *state.State, config *fst.Config) { fmt.Fprintf(w, " Command:\t%s\n", strings.Join(config.Command, " ")) fmt.Fprintf(w, "\n") - if config.Confinement.Sandbox != nil && len(config.Confinement.Sandbox.Filesystem) > 0 { + if !short && config.Confinement.Sandbox != nil && len(config.Confinement.Sandbox.Filesystem) > 0 { fmt.Fprintf(w, "Filesystem:\n") for _, f := range config.Confinement.Sandbox.Filesystem { expr := new(strings.Builder) |
