Giter Club home page Giter Club logo

inspec_profiles's People

Contributors

aaronlippold avatar jburns12 avatar trevor-vaughan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rupsray

inspec_profiles's Issues

aide.conf Resource

An aide.conf resource will assist in the development of the following controls:
V-72063.rb
V-72069.rb
V-72071.rb
V-72073.rb

Currently it is difficult to parse the aide.conf file to develop the above controls. This resource will "aid" in streamlining the creation of these controls.

Bottleneck Issues

Need to figure out why the execution of tests on the hardened RHEL7 machine is slow.

Command to pipe runtimes to jq:
inspec exec $CONTROLS/. -i $SSH_KEY -t ssh://[email protected]:2222 --sudo --sudo-options='-u postgres' --format=json-min | jq .

Shooting from the Hip, general thoughts and questions

I was wondering, once we process all the lines and or rules we would have a data structure like:

rules => { [rule => settings], ... } 
or
rules => { {rule => settings }, ... }

Is the more natural check:

  describe aide_conf.rules do
    its('something') { should contain 'sha512' }
  end

Other thoughts, and I am just shooting off the hip here:

describe aide_conf.macro('ALL') do
    it { should include 'sha512' }
  end
describe aide_conf.macros do
    it { should include 'sha512' }
  end
describe aide_conf.groups do
    it { should include 'NORMAL' }
    it { should include 'DIR' }
    it { should include 'LSPP' }
  end
describe aide_conf.group('NORMAL') do
    its('something') { should match [R,rmd160,sha256]  }
  end
NORMAL = R+rmd160+sha256

# For directories, don't bother doing hashes
DIR = p+i+n+u+g+acl+selinux+xattrs

# Access control only
PERMS = p+i+u+g+acl+selinux

# Logfile are special, in that they often change
LOG = >

# Just do md5 and sha256 hashes
LSPP = R+sha256```

Also, is it natural to assume we should have something like: `macro_lines' and `selection_lines` and `groups` ? 

I would also guess having the ability to return an array or hash of the parts or elements of a MACRO would be useful:

i.e. NORMAL => [R+rmd160+sha256] or NORMAL=>[R,rmd160,sha256]

Also, I may want to say:

All selection_lines that have a macro or that are part of a group. etc. For example, can I get this list of directories as part of the group/macro 'NORMAL'? Don't know if that makes sense but just some thoughts.

/boot   NORMAL
/bin    NORMAL
/sbin   NORMAL
/lib    NORMAL
/lib64  NORMAL
/opt    NORMAL
/usr    NORMAL
/root   NORMAL
# These are too volatile
!/usr/src
!/usr/tmp

# Check only permissions, inode, user and group for /etc, but
# cover some important files closely.
/etc    PERMS
!/etc/mtab
# Ignore backup files
!/etc/.*~
/etc/exports  NORMAL
/etc/fstab    NORMAL
/etc/passwd   NORMAL
/etc/group    NORMAL
/etc/gshadow  NORMAL
/etc/shadow   NORMAL
/etc/security/opasswd   NORMAL

/etc/hosts.allow   NORMAL
/etc/hosts.deny    NORMAL

/etc/sudoers NORMAL
/etc/skel NORMAL

/etc/logrotate.d NORMAL

/etc/resolv.conf DATAONLY

/etc/nscd.conf NORMAL
/etc/securetty NORMAL

describe aide_conf("#{aide_conf_file}").all_have_rule('acl') do

gnome-banner - use `gsettings` to discover where the banners are set on the system

gnome has done a lot of changing to how they do things. One thing that was suggested is that for most of the GUI parts we try to use the gnome tools to both evaluate and discover where things are configured as it is very easy to do it many many ways and still have things setup correctly.

https://developer.gnome.org/GSettings/

You can display extra text on the login screen, such as who to contact for support, by setting the org.gnome.login-screen.banner-message-enable and org.gnome.login-screen.banner-message-text GSettings keys.

It looks like a lot of these settings are just xml files so - ug - the right way may be to parse the xml. Not sure. But the gsettings command may be the right way to 'interface' with it.

Also ensure that the ubuntu part of this is covered as well or at least on its way..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.