Skip to content

Commit

Permalink
🐛 disable ssh agent auth for packer plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Sep 8, 2019
1 parent 3c2e4c9 commit d37229b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packer-provisioner-mondoo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion packer-provisioner-mondoo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit d37229b

Please sign in to comment.