Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
just set MALICE_ELASTICSEARCH in all plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jul 27, 2018
1 parent e315590 commit c32c363
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plugins/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions plugins/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func (plugin Plugin) StartPlugin(docker *client.Docker, arg string, scanID strin
env := plugin.getPluginEnv()

env = append(env, "MALICE_SCANID="+scanID)
env = append(env, "MALICE_ELASTICSEARCH=elasticsearch")

log.WithFields(log.Fields{
"name": plugin.Name,
"env": config.Conf.Environment.Run,
Expand Down Expand Up @@ -116,9 +118,6 @@ func (plugin *Plugin) getPluginEnv() []string {
for _, pluginEnv := range plugin.Env {
if os.Getenv(pluginEnv) != "" {
env = append(env, fmt.Sprintf("%s=%s", pluginEnv, os.Getenv(pluginEnv)))
if strings.EqualFold(pluginEnv, "MALICE_ELASTICSEARCH") {
env = append(env, fmt.Sprintf("%s=%s", pluginEnv, "elasticsearch"))
}
}
}
return env
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugins.toml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ title = "Malice Plugin Configurations"
build = false
mime = "application/pdf"
cmd = "scan"
env = ["MALICE_TIMEOUT", "MALICE_ELASTICSEARCH"]
env = ["MALICE_TIMEOUT"]

[[plugin]]
enabled = false
Expand Down

0 comments on commit c32c363

Please sign in to comment.