Repository: securego/gosec (language: go)

Issue:
terse mode for `gosec`
### Summary 
By default, `gosec run ./...` prints the name of each directory and file it checks, and then the results and summary.

Please add a `-terse` option, which acts like `-quiet` but which still prints the summary.

### Steps to reproduce the behavior
`gosec run ./...`

### gosec version
2.16.0

### Go version (output of 'go version')
go version go1.19.11 linux/amd64

### Operating system / Environment
Ubunto 20.04

### Expected behavior
```
`gosec run ./...`
Summary:
  Gosec  : 2.16.0
  Files  : 95
  Lines  : 34975
  Nosec  : 8
  Issues : 0
```
### Actual behavior
```
[gosec] 2023/07/17 13:12:17 Including rules: default
[gosec] 2023/07/17 13:12:17 Excluding rules: default
[gosec] 2023/07/17 13:12:17 Skipping: . Path doesn't exist.
[gosec] 2023/07/17 13:12:17 Skipping: . Path doesn't exist.
[gosec] 2023/07/17 13:12:17 Import directory: /home/jlearman/ws2/gateway/cmd/common/protocol/discovery
[gosec] 2023/07/17 13:12:17 Skipping: . Path doesn't exist.
[gosec] 2023/07/17 13:12:17 Import directory: /home/jlearman/ws2/gateway/cmd/common/protocol
[gosec] 2023/07/17 13:12:17 Import directory: /home/jlearman/ws2/gateway/cmd/fwnatd
[gosec] 2023/07/17 13:12:17 Import directory: /home/jlearman/ws2/gateway/cmd/ctld
[gosec] 2023/07/17 13:12:17 Import directory: /home/jlearman/ws2/gateway/cmd/common/nft_utils/nft_counter
[gosec] 2023/07/17 13:12:17 Import directory: /home/jlearman/ws2/gateway/cmd/common/protocol/opstatus
...
Results:


Summary:
  Gosec  : 2.16.0
  Files  : 95
  Lines  : 34975
  Nosec  : 8
  Issues : 0
```


Discussion / hints:

Fix patch:
diff --git a/cmd/gosec/main.go b/cmd/gosec/main.go
index e09b008ba5..e108ba9948 100644
--- a/cmd/gosec/main.go
+++ b/cmd/gosec/main.go
@@ -143,6 +143,9 @@ var (
 	// output suppression information for auditing purposes
 	flagTrackSuppressions = flag.Bool("track-suppressions", false, "Output suppression information, including its kind and justification")
 
+	// flagTerse shows only the summary of scan discarding all the logs
+	flagTerse = flag.Bool("terse", false, "Shows only the results and summary")
+
 	// exclude the folders from scan
 	flagDirsExclude arrayFlags
 
@@ -354,7 +357,7 @@ func main() {
 		}
 	}
 
-	if *flagQuiet {
+	if *flagQuiet || *flagTerse {
 		logger = log.New(io.Discard, "", 0)
 	} else {
 		logger = log.New(logWriter, "[gosec] ", log.LstdFlags)


Test patch: