feat(go): port process access detectors
This commit is contained in:
parent
f02509aab5
commit
fc9b5f0448
22 changed files with 554 additions and 40 deletions
|
|
@ -28,6 +28,9 @@ detectors = [
|
|||
"deleted_exe",
|
||||
"egress",
|
||||
]
|
||||
input_snooper_allow_comms = ["Xorg"]
|
||||
credential_access_allow_comms = ["firefox"]
|
||||
credential_access_extra_paths = ["/srv/secrets/"]
|
||||
unknown_future_key = true
|
||||
`)
|
||||
if err := os.WriteFile(path, raw, 0o600); err != nil {
|
||||
|
|
@ -43,6 +46,13 @@ unknown_future_key = true
|
|||
if !cfg.Enabled("deleted_exe") || !cfg.Enabled("egress") || cfg.Enabled("reverse_shell") {
|
||||
t.Fatalf("unexpected detector set: %#v", cfg.Detectors)
|
||||
}
|
||||
if !cfg.InputSnooperAllowComms["Xorg"] || cfg.InputSnooperAllowComms["sway"] {
|
||||
t.Fatalf("unexpected input allowlist: %#v", cfg.InputSnooperAllowComms)
|
||||
}
|
||||
if !cfg.CredentialAccessAllowComms["firefox"] || len(cfg.CredentialAccessExtraPaths) != 1 {
|
||||
t.Fatalf("unexpected credential tuning: %#v %#v",
|
||||
cfg.CredentialAccessAllowComms, cfg.CredentialAccessExtraPaths)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMissingFileKeepsDefaults(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue