Skip to content
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

Fix unknown format err while check-update on RHEL6.5 #93

Merged
merged 1 commit into from
Jun 13, 2016
Merged

Fix unknown format err while check-update on RHEL6.5 #93

merged 1 commit into from
Jun 13, 2016

Conversation

sadayuki-matsuno
Copy link
Collaborator

I fixed the following error of scaning RHEL servers.

 % go run main.go scan
INFO[0000] Start scanning
INFO[0000] config: /Users/matsunosadayuki/go/plugins/src/github.com/future-architect/vuls/config.toml
INFO[0000] cve-dictionary: http://127.0.0.1:1323
[Jun  5 12:59:22]  INFO [localhost] Validating Config...
[Jun  5 12:59:22]  INFO [localhost] Detecting Server OS...
[Jun  5 12:59:26]  INFO [localhost] (1/1) Detected vuls-dev-rhel: rhel 6.5
[Jun  5 12:59:26]  INFO [localhost] Detecting Container OS...
[Jun  5 12:59:26]  INFO [localhost] Scanning vulnerabilities...
[Jun  5 12:59:26]  INFO [localhost] Check required packages for scanning...
[Jun  5 12:59:26]  INFO [localhost] Scanning vulnerable OS packages...
[Jun  5 13:00:36] ERROR [vuls-dev-rhel] Failed to scan vulnerable packages
[Jun  5 13:00:36] ERROR [localhost] Failed to scan. err: ec2-user@54.199.248.145:22: Failed to parse LANG=en_US.UTF-8 yum --color=never check-update. err: Unknown format: Red_Hat_Enterprise_Linux-Release_Notes-6-en-US.noarch

This error is caused by check-update format.
https://github.com/future-architect/vuls/blob/master/scan/redhat.go#L265
Specifically, vuls should check a few lines when the line field is not 3.

@sadayuki-matsuno
Copy link
Collaborator Author

add this format into redhat_test.go
and fix typo.

@sadayuki-matsuno
Copy link
Collaborator Author

I changed ssh terminal width to avoid this error.
Please check this.

@kotakanbe
Copy link
Member

Many Thanks!!

@kotakanbe kotakanbe merged commit c209564 into future-architect:master Jun 13, 2016
@kotakanbe kotakanbe changed the title fix rhel check-update format and add *config.toml into .gitignore Fix unknown format err while check-update on RHEL6.5 Jun 13, 2016
@kotakanbe kotakanbe added the bug label Jun 13, 2016
@kotakanbe kotakanbe mentioned this pull request Jun 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants