-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the XML output #240
Add the XML output #240
Conversation
Please fix glide.lock
|
2dfb2f5
to
5f6d806
Compare
) | ||
|
||
const ( | ||
VulsOpenTag = "<vulsreport>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change const name to vulsOpenTag, vulsCloseTag
Lint error is Occurred.
➜ vuls git:(xml) make lint
report/xml.go:15:2: exported const VulsOpenTag should have comment (or a comment on this block) or be unexported
) | ||
|
||
// XMLDirs array of xml files path. | ||
type XMLDirs []string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XML Dirs is unused.
Please remove this.
return fmt.Errorf("Failed to Marshal to XML: %s", err) | ||
} | ||
|
||
allBytes := bytes.Join([][]byte{[]byte(xml.Header + VulsOpenTag), xmlBytes, []byte(VulsCloseTag)},[]byte{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply go fmt to format this source code.
$ cd /path/to/vuls
$ make fmt
@@ -700,11 +703,11 @@ Defaults:vuls !requiretty | |||
| empty password | - | | | |||
| with password | required | or use ssh-agent | | |||
|
|||
## -report-json , -report-text option | |||
## -report-json , -report-text , -report-xml option | |||
|
|||
結果をファイルに出力したい場合に指定する。出力先は、`$PWD/result/current/` | |||
`all.(json|txt)`には、全サーバのスキャン結果が出力される。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません、all.jsonは廃止されたので、all.jsonの下りを削除していただけますか。(私の修正漏れです)
|
||
At the end of the scan, scan results will be available in the `$PWD/result/current/` directory. | ||
`all.(json|txt)` includes the scan results of all servers and `servername.(json|txt)` includes the scan result of the server. | ||
`all.(json|txt)` includes the scan results of all servers and `servername.(json|txt|xml)` includes the scan result of the server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all.json no kudari wo keshite kudasai
add struct tag for encoding/xml update README update glide.lock
5f6d806
to
ce2daf2
Compare
I applied golint/gofmt and update README. |
LGTM :) |
Add the XML output in order to facilitate cooperation with other tools.