Giter Site home page Giter Site logo

govready / compliancekbs Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 7.0 835 KB

Compliance Knowledge Base Service for Security Controls Compliance Server

Home Page: http://kbs.govready.com

License: GNU Affero General Public License v3.0

Python 62.19% JavaScript 5.88% HTML 24.66% Shell 1.60% Ruby 5.01% Dockerfile 0.66%

compliancekbs's Introduction

NOTE: ARE YOU LOOKING FOR GRC TOOL? SEE REPO: GOVREADY-Q

govready

An accreditation-helper toolkit to make FISMA easier.

NOTE: THIS REPO IS NOT CURRENTLY BEING ACTIVELY MAINTAINED. THAT MAY CHANGE IN THE FUTURE.

Vision

The GovReady vision is to make FISMA easier for innovators by

  • making compliance part of Agile/DevOps
  • sharing compliance progress data among Dev, Ops, Sec, and Mgt
  • making baseline development collaborative
  • providing trusted SCAP content with open source friendly licenses
  • embracing compliance as a practice distinct from security

Product

Our first product is "govready", a toolkit for running FISMA scans and managing results with a git-like feel.

Govready uses (and is a contributor to) the NIST Certified SCAP 1.2 toolkit OpenSCAP and Scap-Security-Guide.

Our design goal is to make scanning easier and more collaborative regardless of your knowledge of FISMA.

License

Copyright 2013, 2014 Greg Elin and GovReady. All Rights Reserved.

License: GPL 3.0

Project Status

Govready is under heavy development and is pre-release. The current version is 0.6.x.

We recommend only using govready currently on non-production virtual machines.

Feedback via GitHub issues is appreciated!

The govready toolkit is funded by a generous grant from the John S and James L Knight Foundation

Get Started

Below are several quickstarts. Use the quickstart for your preferred OS.

( Need a vm to test GovReady? Try: https://github.com/GovReady/testmachines )

RedHat 7 quickstart (64 bit)

# Update nss to pre-emptively avoid problems with EPEL certificates (https://github.com/GovReady/govready/issues/64)
# Alternate if epel installed: sudo yum --disablerepo="epel" update nss -y
sudo yum clean all
sudo yum update nss -y

# Install some useful tools to take full advantage of SCAP-Security-Guide project
# scap-scanner is OpenSCAP certified SCAP scanner
# scap-security-guide is the SCAP Security Guide project
# ansible is the ansible infrastructure as code project
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install epel-release-latest-7.noarch.rpm
sudo yum install ansible scap-scanner scap-security-guide -y

# Install govready using curl. govready will install OpenSCAP and SCAP-Security-Content
# curl -Lk https://raw.githubusercontent.com/GovReady/govready/master/install.sh | sudo bash
curl -Lk io.govready.org/install | sudo bash

# Switch to root so scanner can run all tests properly
# It's OK. You are using a non-production vm, right?
# (On AWS, may be necessary to run `sudo su -`)
su - 

# Change back to prefered working directory if dropped into "/"
cd /home/myuser

# Create a directory and cd into it
mkdir myfisma
cd myfisma

# Initialize the directory
govready init

# List the scan profiles
govready profiles

# Choose the DISA STIG for RHEL 7 profile
govready profile stig-rhel7-disa

# Run a scan (e.g. before)
# This command runs a multi-parameter OpenSCAP (oscap) command based
# on settings in `GovReadyfile`
govready scan

# Run fix script generated by most recent OpenSCAP (oscap) scan
# This utility generates all the parameters to produce a remediation script and command.
govready fix

# Run an post-remeditation scan (e.g. "after")
# govready utility will track your two most recent scans for easy after / before comparison
govready scan

# Compare before and after scans. Compares rules with 'pass' results in most recent scan to results in second most recent scan.
govready compare

# Compare before and after scans to see if anything fails passed in second most recent scan.
govready compare fail

# List results
ls -l scans

# Install lynx commandline browser to view results from prompt
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
yum install lynx

# View repoort from most recent scan
lynx scans/stig-rhel7-disa/[datestamp]-results.html

# Information and evaluation of individual rule (rule must be listed in results.xml file)
govready rule configure_auditd_num_logs

# See available profiles (e.g., baselines)
govready profiles

# Run a scan for a different profile (e.g., baseline)
govready scan usgcb-rhel6-server

# Run an autogenerated fix script from available remediations in the SCAP content
# Example - your file name may differ
bash scan/usgcb-rhel6-server-fix-0822-1552.sh

Centos 6 quickstart (64 bit)

Note: CentOS is NOT RHEL without subscription. There is a general assumption that SSG tests for RHEL work on CentOS, but that is not guaranteed.

# Install govready using curl. govready will install OpenSCAP and SCAP-Security-Content
curl -Lk io.govready.org/install | sudo bash

# Switch to root so scanner can run all tests properly
su - 

# Create a directory and cd into it
mkdir myfisma
cd myfisma

# Initialize the directory
govready init

# Import CentOS cpe-dictionary.xml and cpe-oval.xml SCAP data into local scap/content directory
govready import https://raw.githubusercontent.com/GovReady/govready/xplatform/templates/ssg-centos6-cpe-dictionary.xml
govready import https://raw.githubusercontent.com/GovReady/govready/xplatform/templates/ssg-centos6-cpe-oval.xml

# Update GovReadyfile using sed command (or update the CPE line manually using a text editor)
sed -i 's:^CPE.*:CPE = scap/content/ssg-centos6-cpe-dictionary.xml:' GovReadyfile

# Run a scan
govready scan

# List results
ls -l scans

# View repoort from most recent scan
lynx scans/results.html

# Run fix script generated by most recent OpenSCAP scan
govready fix

# Compare before and after scans. Compares rules with 'pass' results in most recent scan to results in second most recent scan.
govready compare

# Compare before and after scans to see if anything fails passed in second most recent scan.
govready compare fail

# Information and evaluation of individual rule (rule must be listed in results.xml file)
govready rule configure_auditd_num_logs

# See available profiles (e.g., baselines)
govready profiles

# Run a scan for a different profile (e.g., baseline)
govready scan usgcb-rhel6-server

# Run an autogenerated fix script from available remediations in the SCAP content
# Example - your file name may differ
bash scan/usgcb-rhel6-server-fix-0822-1552.sh

Ubuntu 12 and 14 quick start (64 bit)

# Install govready using curl. govready will install OpenSCAP and SCAP-Security-Content
curl -Lk io.govready.org/install | sudo bash

# Switch to root so scanner can run all tests properly
su - 

# Create a directory and cd into it
mkdir myfisma
cd myfisma

# Initialize the directory
govready init

# Run an oscap command just to see things fail because we have no SCAP content installed for Ubuntu
oscap xccdf eval --profile test --results scans/test-results-0822-1319.xml --report scans/test-results-0822-1319.html  /usr/share/xml/scap/ssg/content/ssg-rhel6-xccdf.xml

# Sorry - this is all you can do on Ubuntu at the moment. :-(
# Fork the code and help us include Ubuntu and Debi

Additional Quickstarts available in the repo. See "Quickstart-platform.md"

Remote Scanning (integration with oscap-ssh script)

The recently released oscap-ssh enables Scanning Remote Machines with OpenSCAP. As a user-friendly frontend to the OpenSCAP tools, GovReady has been enhanced to make use of this exciting new feature. There are two ways to make use of this new feature (which may be used separately or together):

1. Update four variables in the (configuration) GovReadyfile:

# All four vars must be set 'sudo OSCAP_USER@OSCAP_HOST OSCAP_PORT' for remote scanning.
# Note that openscap-scanner ('oscap') must be installed on the remote server.
OSCAP_SUDO = sudo
OSCAP_USER = oscap-user
OSCAP_HOST = example.com
OSCAP_PORT = 22

The openscap scanner is best run by root, but enabling direct root SSH access is a security risk. A non-privileged user such as oscap-user can be enabled to run only the oscap binary as root (when the sudo flag is given) by updating the remote machine's sudoers file or adding a file like /etc/sudoers.d/99-oscap-user:

# allow oscap-user to run openscap scanner
Defaults!/bin/oscap !requiretty
oscap-user ALL=(root) NOPASSWD: /bin/oscap

2. Create or override GovReadyfile values with GOVREADY_* environment variables:

This will scan the RHEL 7 machine badwolf.example.com via port 2222:

export GOVREADY_OSCAP_HOST=badwolf.example.com
export GOVREADY_OSCAP_PORT=2222
export GOVREADY_XCCDF=ssg-rhel7-ds.xml
govready scan

Notes and Caveats on remote scanning

  • All values in the GovReadyfile can be overridden with GOVREADY_* environment variables. This facilitates integration with many site management tools such as Ansible, Chef and Puppet.
  • As @mpreisler notes, currently oscap-ssh must be run as root, while remote ssh access is generally considered a security hole to be remediated. A future release will resolve this.
  • OVAL and CPE files can not be separately named on the command line. Rather, use a "datastream" object as the XCCDF file (which can contain OVAL and CPE definitions within it).

Uninstall govready

Using curl

# Uninstall
curl -Lk https://raw.githubusercontent.com/GovReady/govready/master/install.sh | sudo UNINSTALL=1 bash

Install development branches

# Install branch other than master
curl -Lk https://raw.githubusercontent.com/GovReady/govready/master/install.sh | sudo BRANCH=branch_name bash

# Use an installer from a different branch
curl -Lk https://raw.githubusercontent.com/GovReady/govready/branch_name/install.sh | sudo BRANCH=branch_name bash

Testmachines

Use https://github.com/GovReady/testmachines for virtual machines to test GovReady.

compliancekbs's People

Contributors

gregelin avatar joshdata avatar mcupp93 avatar openprivacy avatar terwilligergreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

compliancekbs's Issues

Add SP Documents - Set #2

Add the following 800 series documents
Add the following 800 series documents

  • 47
  • 44
  • 41
  • 36
  • 34
  • 33
  • 32
  • 296
  • 25
  • 27
  • 18
  • 16 draft (2014)
  • 16 (1998)
  • 14
  • 12

Adding proprietary documents via mounted drive or service

How do we make meta data files regarding proprietary documents as part of the service?

Do we set up a second server that provides information based on authentication? Do we mount secure information (then how do we only read for a particular user)? Do we require organization to set up their own version of kbs?

Add NIST 800-128

Title: Guide for Security-Focused Configuration Management of Information Systems

Especially noteworthy is Appendix I, page I-5, I-6 "Attachment 1 Security Impact Worksheet". These are questions by Security family to ask oneself about the impact of a change.

Terms: worksheet, configuration management, security impact worksheet

How do we test document data?

@JoshData @MCupp93:

Matthew has been adding more NIST SP 800 series document to KBS. It's making me wonder how we might go about doing regression tests on the documents and the document meta data YAML files.

Is there a strategy you use @JoshData with GovTrack to test document integrity over time?

Add to Knowledge Base Dept of Education Security Requirements for Contractors Doing Business with the Department of Education

Add these documents to knowledge base from this page: http://www2.ed.gov/fund/contract/about/bsp.html

  • Information Assurance Security Policy (OCIO-01) [download files] MS WORD (944K)
  • Information Technology Security Certification and Accreditation Procedures (OCIO-05) [download files] MS WORD (830K)
  • General Support System and Major Application Inventory Procedures (OCIO-09) [download files] MS WORD (856K)
  • Information Technology Security Configuration Management Planning Procedures (OCIO-11) [download files] MS WORD (896K)
  • Information Security Incident Response and Reporting Procedures (OCIO-14) [download files] MS WORD (841K)
  • Protection of Sensitive But Unclassified Information (OCIO-15) [download files] MS WORD (259K)
  • Personal Use of Government Equipment (OCIO: 1-104) [download files] MS WORD (124K)
  • Lifecycle Management (LCM) Framework (OCIO: 1-106) [download files] PDF (652K)
  • Procuring Electronic and Information Technology (EIT) in Conformance with Section 508 of the Rehabilitation Act of 1973 (OCIO: 3-105) [download files] MS WORD (983K)
  • Contractor Employee Personnel Security Screenings (OM: 5-101) [download files] MS WORD (160K)
  • Department of Education IT Security Awareness Training 2011 [download files] MS WORD (688K)
  • External Breach Notification Policy and Plan (OM:6-107) [download files] PDF (496K)

Add SP Documents - Set #3

Add the following Draft documents from NIST and IRs:
http://csrc.nist.gov/publications/PubsDrafts.html

  • draft 160
  • draft 180
  • IR 8011
  • IR 8062
  • IR 8058
  • IR 7621
  • 94 revision 2 draft
  • IR 7799
  • DRAFT whitepaper Project Description--Securing Non-Credit Card, Sensitive...
  • DRAFT whiterpaper Project Description--Multifactor Authentication for e-Commerce: Online Authentication for the Retail Sector
  • pre-draft 800-63-3

Example identifiers:

  • nist-sp-800-160-draft-v3
  • nist-ir-7799

punkt install instruction from README fails

Gregs-MacBook-Pro:compliancekbs greg$ python3 -m nltk.downloader punkt
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py:125: RuntimeWarning: 'nltk.downloader' found in sys.modules after import of package 'nltk', but prior to execution of 'nltk.downloader'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
[nltk_data] Error loading punkt: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data]     (_ssl.c:777)>

CCI data

http://iase.disa.mil/stigs/cci/Pages/index.aspx

"The Control Correlation Identifier (CCI) provides a standard identifier and description for each of the singular, actionable statements that comprise an IA control or IA best practice. CCI bridges the gap between high-level policy expressions and low-level technical implementations. CCI allows a security requirement that is expressed in a high-level policy framework to be decomposed and explicitly associated with the low-level security setting(s) that must be assessed to determine compliance with the objectives of that specific security control. This ability to trace security requirements from their origin (e.g., regulations, IA frameworks) to their low-level implementation allows organizations to readily demonstrate compliance to multiple IA compliance frameworks. CCI also provides a means to objectively rollup and compare related compliance assessment results across disparate technologies."

PDF page numbering != citable page numbers

I'm putting PDF page numbers (always starts with 1) into the YAML files, but the page number you would use in a human-readable citation (the number actually printed on a page) is typically different.

AWS documents to be added to KBS

Experimenting with additional data

Let's pick a half dozen documents and add some additional information:

  • total page numbers (look up in DocumentCloud)
  • number of appendices (look at table of content in DocumentCloud)
  • year of publication
  • authors
authors: | 
   - name: Kelley Dempsey
     organization: National Institute of Standards and Technology (NIST)
   - name: Dr. George Moore
     organization: Applied Physics Laboratory at Johns Hopkins University
   - name: Nadya Bartol
     organization: ~
  • version number (if exists, otherwise use: version: ~)

Copy and paste YAML into http://www.yamllint.com to make sure YAML format is valid.

Which documents to do? Pick about half dozen documents that either all share a single term in the title, or two groups of docs that share terms and gather the additional meta data for those docs. We will need to add some code to display the data on search result, but should be interesting.

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.