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

Target OS is SLES variant, so vuls tui failed to fill OVAL information as vuls can't get the os #671

Closed
jenningsloy318 opened this issue Jun 13, 2018 · 2 comments · Fixed by #672

Comments

@jenningsloy318
Copy link
Contributor

Environment

Vuls

vuls 0.4.2 e788e6a
Hash : e788e6a

To check the commit hash of HEAD
$ vuls -v
vuls 0.4.2 e788e6a

or

OS

  • Target Server:
    NAME="SLES_SAP"
    VERSION="12-SP1"
    VERSION_ID="12.1.0.1"
    PRETTY_NAME="SUSE Linux Enterprise Server for SAP Applications 12 SP1"
    ID="sles_sap"
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/o:suse:sles_sap:12:sp1"

  • Vuls Server: CentOS Linux release 7.5.1804 (Core)

Go

Current Output

Please re-run the command using -debug and provide the output below.


[Jun 13 16:00:24] DEBUG [localhost] Executing... cat /etc/os-release
[Jun 13 16:00:24] DEBUG [localhost] execResult: servername: 10-36-50-11
  cmd: /bin/ssh -tt -o StrictHostKeyChecking=yes -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none vulsscan@10.36.50.11 -p 22 -i /home/vulsscan/.ssh/id_rsa -o PasswordAuthentication=no stty cols 1000; cat /etc/os-release
  exitstatus: 0
  stdout: NAME="SLES_SAP"
VERSION="12-SP1"
VERSION_ID="12.1.0.1"
PRETTY_NAME="SUSE Linux Enterprise Server for SAP Applications 12 SP1"
ID="sles_sap"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles_sap:12:sp1"

  stderr:
  err: %!s(<nil>)
[Jun 13 16:00:24]  WARN [localhost] Failed to parse SUSE edition: %sexecResult: servername: 10-36-50-11
  cmd: /bin/ssh -tt -o StrictHostKeyChecking=yes -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none vulsscan@10.36.50.11 -p 22 -i /home/vulsscan/.ssh/id_rsa -o PasswordAuthentication=no stty cols 1000; cat /etc/os-release
  exitstatus: 0
  stdout: NAME="SLES_SAP"
VERSION="12-SP1"
VERSION_ID="12.1.0.1"
PRETTY_NAME="SUSE Linux Enterprise Server for SAP Applications 12 SP1"
ID="sles_sap"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles_sap:12:sp1"

  stderr:
  err: %!s(<nil>)

Addition Details

The scan phase is sucessfully, but without the OS


One Line Summary
================
10-36-50-11             688 updatable packages

but nomal summary should be like following


One Line Summary
================
10-36-52-136    centos7.4.1708  176 updatable packages

Expected Behavior

vuls tui or vuls report can run successfully

Actual Behavior


[vulsscan@yh-vm-vulscan-prod01 vuls]$ vuls tui
[Jun 13 16:06:55]  INFO [localhost] Validating config...
[Jun 13 16:06:55]  INFO [localhost] Loaded: /opt/vuls/results/2018-06-13T16:06:43+08:00
[Jun 13 16:06:55]  INFO [localhost] Fill CVE detailed information with OVAL
[Jun 13 16:06:55] ERROR [localhost] Failed to fill OVAL information: OVAL for  is not implemented yet

Steps to reproduce the behaviour

@kotakanbe
Copy link
Member

kotakanbe commented Jun 18, 2018

@jenningsloy318

This line detects a type of SLES. You can edit this line to support "SLES_SAP"
https://github.com/future-architect/vuls/blob/master/scan/suse.go#L47

Then, edit this switch-case to use OVAL of SLES.
https://github.com/future-architect/vuls/blob/master/report/report.go#L179

Pull Request always welcome! :)

@jenningsloy318
Copy link
Contributor Author

@kotakanbe

I have created one pull request for this fix, and I have tested it at my side, it is working now. and this is my first pull request, if there is anything need to do further, just point out.

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

Successfully merging a pull request may close this issue.

2 participants