We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c1e400 commit 948f8c0Copy full SHA for 948f8c0
contrib/future-vuls/cmd/main.go
@@ -7,6 +7,7 @@ import (
7
"fmt"
8
"os"
9
"strconv"
10
+ "strings"
11
12
"github.com/future-architect/vuls/config"
13
"github.com/future-architect/vuls/models"
@@ -21,6 +22,7 @@ var (
21
22
serverUUID string
23
groupID int64
24
token string
25
+ tags []string
26
url string
27
)
28
@@ -47,6 +49,9 @@ func main() {
47
49
if len(token) == 0 {
48
50
token = os.Getenv("VULS_TOKEN")
51
}
52
+ if len(tags) == 0 {
53
+ tags = strings.Split(os.Getenv("VULS_TAGS"), ",")
54
+ }
55
56
var scanResultJSON []byte
57
if stdIn {
@@ -69,6 +74,9 @@ func main() {
69
74
return
70
75
71
76
scanResult.ServerUUID = serverUUID
77
+ if 0 < len(tags) {
78
+ scanResult.Optional["VULS_TAGS"] = tags
79
72
80
73
81
config.Conf.Saas.GroupID = groupID
82
config.Conf.Saas.Token = token
0 commit comments