You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch fixed it for me. It may be because my Ubuntu node is hardened using the CIS hardening playbook (amongst other things), similar to https://github.com/oguya/cis-ubuntu-14-ansible, and therefore sudo may be necessary for me and not for others.
diff --git a/scan/debian.go b/scan/debian.go
index 528b7d3..1071d69 100644
--- a/scan/debian.go
+++ b/scan/debian.go
@@ -443,7 +443,7 @@ func (o *debian) fillCandidateVersion(updatables models.Packages) (err error) {
names = append(names, name)
}
cmd := fmt.Sprintf("LANGUAGE=en_US.UTF-8 apt-cache policy %s", strings.Join(names, " "))
- r := o.exec(cmd, noSudo)
+ r := o.exec(cmd, sudo)
if !r.isSuccess() {
return fmt.Errorf("Failed to SSH: %s", r)
}
@@ -465,7 +465,7 @@ func (o *debian) fillCandidateVersion(updatables models.Packages) (err error) {
func (o *debian) getUpdatablePackNames() (packNames []string, err error) {
cmd := util.PrependProxyEnv("LANGUAGE=en_US.UTF-8 apt-get dist-upgrade --dry-run")
- r := o.exec(cmd, noSudo)
+ r := o.exec(cmd, sudo)
if r.isSuccess(0, 1) {
return o.parseAptGetUpgrade(r.Stdout)
}
(END)
Environment
Vuls
v0.4.2 ce56261
OS
Go
go version go1.9.4 linux/amd64
Current Output
Additional Details
Expected Behavior
It uses
sudo
to runapt-get dist-upgrade --dry-run
Actual Behavior
It does not seem to use
sudo
to runapt-get dist-upgrade --dry-run
Steps to reproduce the behaviour
Vuls runs just fine against localhost, but against my remote hosts, it always tries to run
apt-get dist-upgrade --dry-run
withoutsudo
, which failsThe text was updated successfully, but these errors were encountered: