Skip to content

Commit ef6504b

Browse files
[7.17](backport #40130) Osquerybeat: Disable allow_unsafe osquery configuration (#41239)
* Osquerybeat: Disable allow_unsafe osquery configuration (#40130) * Osquerybeat: Disable allow_unsafe osquery configuration * Make linter happier * Added changelog * Make linter happier (cherry picked from commit fec980b) * Fix CHANGELOG.next.asciidoc --------- Co-authored-by: Aleksandr Maus <aleksandr.maus@elastic.co>
1 parent 5596bba commit ef6504b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.next.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
2020

2121
*Metricbeat*
2222

23+
*Osquerybeat*
24+
25+
- Disable allow_unsafe osquery configuration. {pull}40130[40130]
2326

2427
*Packetbeat*
2528

x-pack/osquerybeat/internal/osqd/osqueryd_windows.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ func SocketPath(dir string) string {
2929
}
3030

3131
func platformArgs() map[string]interface{} {
32-
return map[string]interface{}{
33-
"allow_unsafe": true,
34-
}
32+
return nil
3533
}
3634

3735
func setpgid() *syscall.SysProcAttr {
@@ -42,6 +40,6 @@ func setpgid() *syscall.SysProcAttr {
4240
// For clean process tree kill
4341
func killProcessGroup(cmd *exec.Cmd) error {
4442
// https://github.com/golang/dep/pull/857
45-
exec.Command("taskkill", "/F", "/T", "/PID", fmt.Sprint(cmd.Process.Pid)).Run()
46-
return nil
43+
//nolint:gosec // works as expected
44+
return exec.Command("taskkill", "/F", "/T", "/PID", fmt.Sprint(cmd.Process.Pid)).Run()
4745
}

0 commit comments

Comments
 (0)