New charm: rkhunter

Bug #1375796 reported by Chris Stratford
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
In Progress
Undecided
Unassigned

Bug Description

This charm installs and configures the rkhunter rootkit scanner.

Revision history for this message
Review Queue (review-queue) wrote : Review Queue Automated Test Results

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-1148-results

Revision history for this message
Chris Stratford (chris-gondolin) wrote :

I've now fixed charm paths in the tests to use appropriate trusty versions

Revision history for this message
Cory Johns (johnsca) wrote :

Chris,

Thank you for your charm submission. The charm looks great, and the tests pass. The only small issues I see is that configureNrpe() function has the default value for script_dir hard-coded, instead of using the config option. Other than that, I give it my +1 to be promoted.

Regarding the test failure, you shouldn't have needed to manually specify the charm paths. Specifically, it should have used the charm-under-test when running the tests, so the fact that it didn't is a bug in the test runner. It's being looked in to, and hopefully you will be able to revert that commit once it's resolved, but it's fine for now to work around the issue.

Thanks again for your work!

Revision history for this message
Chris Stratford (chris-gondolin) wrote :

Thanks for spotting the configureNrpe() hard-coded path. That should be fixed now.

Revision history for this message
Review Queue (review-queue) wrote :

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-1255-results

Revision history for this message
Review Queue (review-queue) wrote : Automated Test Results: New charm: rkhunter

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-1293-results

Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

+1 LGTM, I would just suggest some minor updates:

> bzr diff
=== modified file 'metadata.yaml'
--- metadata.yaml 2014-09-09 16:03:14 +0000
+++ metadata.yaml 2014-10-29 14:38:51 +0000
@@ -5,8 +5,8 @@
   This charm installs and configures rkhunter, a rootkit scanner.
   It is a subordinate charm that can be installed alongside your
   primary charm to help protect the unit from attackers.
-categories:
- - miscellaneous
+tags:
+ - security
 subordinate: true
 requires:
   juju-info:

=== modified file 'tests/10-basic-tests'
--- tests/10-basic-tests 2014-10-03 12:02:22 +0000
+++ tests/10-basic-tests 2014-10-29 14:45:42 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3

 import amulet
 import time
@@ -6,8 +6,8 @@
 d = amulet.Deployment(series="trusty")

 # Add units
-d.add('apache2', 'cs:trusty/apache2-4')
-d.add('rkhunter', 'cs:~chris-gondolin/trusty/rkhunter')
+d.add('apache2')
+d.add('rkhunter')
 d.add('nrpe-external-master', 'cs:~webteam-backend/trusty/nrpe-external-master-0')

 # Add relations
@@ -29,7 +29,7 @@
 except:
     raise

-unit = d.sentry.unit['apache2/0']
+unit = d.sentry['apache2/0']

 # Check rkhunter config file has been created
 if "rkhunter.conf.local" not in unit.directory_contents("/etc")["files"]:

Revision history for this message
Chris Stratford (chris-gondolin) wrote :

Updated as per above recommendations

Whit Morriss (whitmo)
Changed in charms:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.