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

Failed to scan via docker. err: Unknown format #404

Closed
sandats opened this issue Mar 27, 2017 · 5 comments
Closed

Failed to scan via docker. err: Unknown format #404

sandats opened this issue Mar 27, 2017 · 5 comments

Comments

@sandats
Copy link

sandats commented Mar 27, 2017

Environment

Vuls

Hash : vuls v0.3.0 b0d9c0b

OS

  • Target Server: CentOS 6.8
  • Vuls Server: CentOS 6.8
  • Docker Version: Docker version 1.7.1, build 786b29d

Current Output

Vuls scan

[sandats@hoge docker]$ sudo docker run --rm -it \
>     -v ~/.ssh:/root/.ssh:ro \
>     -v $PWD:/vuls \
>     -v $PWD/vuls-log:/var/log/vuls \
>     -v /etc/localtime:/etc/localtime:ro \
>     -e "TZ=Asia/Tokyo" \
>     vuls/vuls scan \
>     -config=./config.toml
[Mar 27 17:29:04]  INFO [localhost] Start scanning
[Mar 27 17:29:04]  INFO [localhost] config: ./config.toml
[Mar 27 17:29:04]  INFO [localhost] Validating config...
[Mar 27 17:29:04]  INFO [localhost] Detecting Server/Container OS...
[Mar 27 17:29:04]  INFO [localhost] Detecting OS of servers...
[Mar 27 17:29:04]  INFO [localhost] (1/1) Detected: test: centos 6.8
[Mar 27 17:29:04]  INFO [localhost] Detecting OS of containers...
[Mar 27 17:29:04]  INFO [localhost] Detecting Platforms...
[Mar 27 17:29:05]  INFO [localhost] (1/1) test is running on other
[Mar 27 17:29:05]  INFO [localhost] Scanning vulnerabilities...
[Mar 27 17:29:05]  INFO [localhost] Scanning vulnerable OS packages...
[Mar 27 17:29:07] ERROR [test] Failed to scan vulnerable packages
[Mar 27 17:29:07] ERROR [localhost] Error: test, err: [Failed to parse LANGUAGE=en_US.UTF-8 yum --color=never ]check-update. err: Unknown format: https://access.redhat.com/articles/1320623


One Line Summary
================
test	Error		Run with --debug to view the details

Vuls scan -debug

  stderr:
  err: %!s(<nil>)
[Mar 27 17:10:56] ERROR [test] Failed to scan vulnerable packages
[Mar 27 17:10:56] ERROR [localhost] Error: test, err: [Failed to parse LANGUAGE=en_US.UTF-8 yum --color=never ]check-update. err: Unknown format: https://access.redhat.com/articles/1320623


One Line Summary
================
test	Error		Run with --debug to view the details

Addition Details

Vuls Configtest

[sandats@hoge docker]$ sudo docker run --rm -it\
>     -v ~/.ssh:/root/.ssh:ro \
>     -v $PWD:/vuls \
>     -v $PWD/vuls-log:/var/log/vuls \
>     vuls/vuls configtest \
>     -config=./config.toml
[Mar 27 08:25:15]  INFO [localhost] Validating config...
[Mar 27 08:25:15]  INFO [localhost] Detecting Server/Container OS...
[Mar 27 08:25:15]  INFO [localhost] Detecting OS of servers...
[Mar 27 08:25:15]  INFO [localhost] (1/1) Detected: test: centos 6.8
[Mar 27 08:25:15]  INFO [localhost] Detecting OS of containers...
[Mar 27 08:25:15]  INFO [localhost] Checking dependendies...
[Mar 27 08:25:15]  INFO [test] Dependencies... Pass
[Mar 27 08:25:15]  INFO [localhost] Checking sudo settings...
[Mar 27 08:25:15]  INFO [test] Checking... sudo yum --changelog --assumeno update yum
[Mar 27 08:25:17]  INFO [test] Sudo... Pass
[Mar 27 08:25:17]  INFO [localhost] Scannable servers are below...
test
@knqyf263
Copy link
Contributor

It seems to be something wrong with the yum repository in the target server.
Can you paste the result of the following command on the target server?

$ yum repolist

@sandats
Copy link
Author

sandats commented Mar 28, 2017

Thank you for responding!
It is the result of repolist.
Is it possible to resolve by disabling the problematic yum repository?

[sandats@test ~]$ yum repolist
読み込んだプラグイン:changelog, fastestmirror
Repository mcp is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * extras: ftp.riken.jp
 * remi-safe: mirror.innosol.asia
 * updates: ftp.riken.jp
base                                                                                          | 3.7 kB     00:00
beats                                                                                         | 2.9 kB     00:00
http://rpms.famillecollet.com/enterprise/remi-release-6.rpm/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
他のミラーを試します。
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

extras                                                                                        | 3.4 kB     00:00
remi-safe                                                                                     | 2.9 kB     00:00
updates                                                                                       | 3.4 kB     00:00
リポジトリー ID                   リポジトリー名                                                               状態
base                              CentOS-6 - Base                                                               6,696
beats                             Elastic Beats Repository                                                         44
epel                              EPEL YUM repo                                                                12,164
extras                            CentOS-6 - Extras                                                                64
remi-safe                         Safe Remi's RPM repository for Enterprise Linux 6 - x86_64                    1,768
updates                           CentOS-6 - Updates                                                              974
repolist: 21,710

@knqyf263
Copy link
Contributor

Is it possible to resolve by disabling the problematic yum repository?

Yes, I think so.
It seems to be something wrong with remi repository.

Could you set enabled=0 in /etc/yum.repos.d/remi.repo (or a similar file name) ?

@sandats
Copy link
Author

sandats commented Mar 28, 2017

After setting enable=0, it was successfully scanned.
Thanks knqyf263 for your reply.
I'm sorry to have caused you trouble.

@sandats sandats closed this as completed Mar 28, 2017
@knqyf263
Copy link
Contributor

Good! You're welcome.
Feel free to ask us if you have any problems!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants