add xml-report
add struct tag for encoding/xml update README update glide.lock
This commit is contained in:
@@ -67,6 +67,7 @@ type ScanCmd struct {
|
||||
reportText bool
|
||||
reportS3 bool
|
||||
reportAzureBlob bool
|
||||
reportXML bool
|
||||
|
||||
awsProfile string
|
||||
awsS3Bucket string
|
||||
@@ -106,6 +107,7 @@ func (*ScanCmd) Usage() string {
|
||||
[-report-s3]
|
||||
[-report-slack]
|
||||
[-report-text]
|
||||
[-report-xml]
|
||||
[-http-proxy=http://192.168.0.1:8080]
|
||||
[-ask-key-password]
|
||||
[-debug]
|
||||
@@ -204,6 +206,11 @@ func (p *ScanCmd) SetFlags(f *flag.FlagSet) {
|
||||
false,
|
||||
fmt.Sprintf("Write report to text files (%s/results/current)", wd),
|
||||
)
|
||||
f.BoolVar(&p.reportXML,
|
||||
"report-xml",
|
||||
false,
|
||||
fmt.Sprintf("Write report to XML files (%s/results/current)", wd),
|
||||
)
|
||||
|
||||
f.BoolVar(&p.reportS3,
|
||||
"report-s3",
|
||||
@@ -333,6 +340,9 @@ func (p *ScanCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
|
||||
if p.reportText {
|
||||
reports = append(reports, report.TextFileWriter{ScannedAt: scannedAt})
|
||||
}
|
||||
if p.reportXML {
|
||||
reports = append(reports, report.XMLWriter{ScannedAt: scannedAt})
|
||||
}
|
||||
if p.reportS3 {
|
||||
c.Conf.AwsRegion = p.awsRegion
|
||||
c.Conf.AwsProfile = p.awsProfile
|
||||
|
||||
Reference in New Issue
Block a user