Skip to content
Permalink
Browse files

πŸ› disable ssh agent auth for packer plugin

  • Loading branch information...
chris-rock committed Sep 8, 2019
1 parent 3c2e4c9 commit d37229b7942f56ac9ed03d0241ab9a06031d783e
Showing with 6 additions and 1 deletion.
  1. +2 βˆ’0 packer-provisioner-mondoo/go.mod
  2. +4 βˆ’1 packer-provisioner-mondoo/main.go
@@ -4,3 +4,5 @@ require (
github.com/hashicorp/packer v1.3.4-0.20190225173202-1c3bc70b127b
golang.org/x/crypto v0.0.0-20180322175230-88942b9c40a4
)

go 1.13
@@ -83,6 +83,9 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
}
}

// ensure that we disable ssh auth, since the packer proxy only allows one auth mechanism
p.config.MondooEnvVars = append(p.config.MondooEnvVars, "SSH_AUTH_SOCK=")

if !p.config.UseSFTP {
p.config.MondooEnvVars = append(p.config.MondooEnvVars, "MONDOO_SSH_SCP=on")
}
@@ -224,7 +227,7 @@ func (p *Provisioner) executeMondoo(ui packer.Ui, comm packer.Communicator, priv
envvars = append(envvars, p.config.MondooEnvVars...)
}

args := []string{"vuln"}
args := []string{"scan"}

conf := &VulnOpts{
Asset: &VulnOptsAsset{

0 comments on commit d37229b

Please sign in to comment.
You can’t perform that action at this time.