Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when auditctl not found #18

Closed
diogomonica opened this issue May 10, 2016 · 2 comments
Closed

Panic when auditctl not found #18

diogomonica opened this issue May 10, 2016 · 2 comments

Comments

@diogomonica
Copy link
Owner

diogomonica commented May 10, 2016

This should probably not give a runtime panic, and should just skip the tests.

➜  ./main -f default.toml 
2016/05/10 12:14:17 Running Audit: Host Configuration
[WARN] - 1.1 Create a separate partition for containers 
     Containers NOT in seperate partition

[PASS] - 1.2 Use the updated Linux Kernel 
[INFO] - 1.4 Remove all non-essential services from the host 
     Host listening on 29 ports: [4371 57621 53 17500 4381 17600 17603 47856 48516 44692 33926 59646 42908 35872 54582 44670 53846 34510 36274 52994 37242 53816 52452 39380 42390 35768 39618 56460 37950]

[PASS] - 1.5 Keep Docker up to date 
[INFO] - 1.6 Only allow trusted users to control Docker daemon 
     The following users control the Docker daemon: [diogo]

2016/05/10 12:14:18 Could not find auditctl tool
panic: Could not find auditctl tool

goroutine 1 [running]:
panic(0x7afe00, 0xc8204de500)
    /usr/lib/go-1.6/src/runtime/panic.go:464 +0x3e6
log.Panicf(0x95b2c0, 0x1c, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/log/log.go:327 +0xd8
github.com/diogomonica/actuary/checks.checkAuditRule(0x8ff2b0, 0xf, 0xc8204f1d10)
    /home/diogo/go/src/github.com/diogomonica/actuary/checks/checks.go:250 +0x308
github.com/diogomonica/actuary/checks.AuditDockerDaemon(0xc8200f2120, 0x945ef0, 0x17, 0x0, 0x0, 0x0, 0x0)
    /home/diogo/go/src/github.com/diogomonica/actuary/checks/dockerhost.go:139 +0x85
main.main()
    /home/diogo/go/src/github.com/diogomonica/actuary/cmd/actuary/main.go:67 +0x57e
@zuBux
Copy link
Collaborator

zuBux commented May 10, 2016

Yup, I added some extra code to just skip tests if conditions are not met (e.g no Container Runtime checks when no containers running). I probably missed that, will get fixed asap

@diogomonica
Copy link
Owner Author

Cool, make sure to close it on the PR.

@zuBux zuBux mentioned this issue May 10, 2016
@zuBux zuBux closed this as completed in bbc63ad May 17, 2016
zuBux added a commit that referenced this issue May 17, 2016
Fixes #9, #17, #18. Refactored `checkAuditRule` so the auditd checks are smaller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants