Code Monkey home page Code Monkey logo

vulcan's Introduction

Vulcan

Run Test Suite on Draft Release Creation, Push, and Pull Request to master Push Vulcan to Docker Hub on successful test suite run

Description

Vulcan is a tool to help streamline the process of creating STIG-ready securiy guidance documentation and InSpec automated validation profiles.

Vulcan models the STIG intent form and the process of aligning security controls from high-level DISA Security Requirements Guides (SRGs) into Security Technical Implementation Guides (STIGs) tailored to a particular system component. STIG-ready content developed with Vulcan can be provided to DISA for peer review and formal publishing as a STIG. Vulcan allows the guidance author to develop both human-readable instructions and machine-readable automated validation code at the same time.

Features

  • Model the STIG creation process between the creator (vendor) and the approver (sponsor)
  • Write and test InSpec code on a local system, or across SSH, AWS, and Docker targets
  • Easily view control status and revision history
  • Enable distributed authorship with multiple authors working on sets of controls and reviewing each others' work.
  • Enable looking up related controls (controls using the same SRG ID) in published STIGs while auhtoring or reviewing a control.
  • View DISA published STIG Contents.
  • Confidential data in the database is encrypted using symmetric encryption
  • Authenticate via the local server, through GitHub, and through configuring an LDAP server.
  • Email and Slack notification enabled

Latest Release: v2.1.6

You can pull the Docker image for the latest release with the following command:

  docker pull mitre/vulcan:v2.1.6

For more details on this release and previous ones, check the Changelog.

Deploy Vulcan

Deploying Vulcan in Production   

Deployment Dependencies

For Ruby (on Ubuntu):

  • Ruby
  • build-essentials
  • Bundler
  • libq-dev
  • nodejs

Run With Ruby

Setup Ruby

  1. Install the version of Ruby specified in .ruby-version
  2. Install postgres and rbenv
  3. Run gem install foreman
  4. Run rbenv install
  5. Run bin/setup

Note: bin/setup will install the JS dependencies andprepare the database.

  1. Run rails db:seed to seed the database.

Running with Ruby

Make sure you have run the setup steps at least once before following these steps!

  1. ensure postgres is running
  2. foreman start -f Procfile.dev
  3. Navigate to http://127.0.0.1:3000

Test User

For testing purposes in the development environment, you can use the following credentials:

Email: [email protected]

Password: 1234567ab!

Stopping Vulcan

  1. Stop Vulcan by doing ctrl + c
  2. Stop the postgres server

Configuration

See docker-compose.yml for container configuration options.

Documentation on how to configure additional Vulcan settings such as SMTP, LDAP, etc, are available on the Vulcan website.

Tasks

STIG/SRG Puller Task

This application includes a rake task that pulls published Security Requirements Guides (SRGs) and Security Technical Implementation Guides (STIGs) from public.cyber.mil and saves them locally. This task can be executed manually or set up to run on a schedule in a production environment.

Manual Execution

You can manually execute the STIG/SRG puller task by running the following command in your terminal:

bundle exec rails stig_and_srg_puller:pull

Scheduling the Task in Production

If you wish to automate the execution of this task in a production environment, you can set up a task scheduler on your hosting platform. The configuration will depend on your specific hosting service.

Generally, you will need to create a job that runs the following command:

bundle exec rails stig_and_srg_puller:pull

You can set the frequency of this task according to your preference or needs. However, it's important to consider the volume of data being pulled and the impact on the application's performance when deciding on the frequency.

Please refer to your hosting platform's documentation or support services for specific instructions on how to set up scheduled tasks or cron jobs.

Releasing Vulcan

For detailed information about creating a release, please refer to the release documentation.

NOTICE

© 2022 The MITRE Corporation.

Approved for Public Release; Distribution Unlimited. Case Number 18-3678.

NOTICE

MITRE hereby grants express written permission to use, reproduce, distribute, modify, and otherwise leverage this software to the extent permitted by the licensed terms provided in the LICENSE.md file included with this project.

NOTICE

This software was produced for the U. S. Government under Contract Number HHSM-500-2012-00008I, and is subject to Federal Acquisition Regulation Clause 52.227-14, Rights in Data-General.

No other use other than that granted to the U. S. Government, or to those acting on behalf of the U. S. Government under that Clause is authorized without the express written permission of The MITRE Corporation.

For further information, please contact The MITRE Corporation, Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.

vulcan's People

Contributors

aaronlippold avatar bialogs avatar chris-at-work avatar chrishinchey avatar dependabot-preview[bot] avatar dependabot[bot] avatar freddyfeelgood avatar github-actions[bot] avatar jkufro avatar jsa5593 avatar kli579 avatar rbclark avatar rlakey avatar sgober avatar smarlaku820 avatar vanessuniq avatar wdower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vulcan's Issues

RFC: update to use the 4.x/5.x data features

  • defaults to text based impacts: none,low,medium,high,critical
  • uses desc 'sub-section, 'textfor:check,fix,justification,vulnerability discussion`, etc[]
  • puts attributes in the inspec.yml file and uses the shared attributes model
  • has the ability to remember what attributes have been created already for easy reuse
  • uses the supports: <platform> in the inspec.yml
  • adds both a single line profile title and a long desc with in the inspec.yml
  • correctly populates all the values in the inspec.yml template

Make devise do-not-reply email configurable

The devise do-not-reply email currently defaults to [email protected]. We need to make this configurable in the vulcan.yml config file.

One potential way to fix this is by making Devise use the ApplicationMailer and then fixing the ApplicationMailer to get the proper address from vulcan.yml.

SRG Import

This feature was present in the Vulcan alpha, however it has not been ported over to the new vulcan master.

This feature currently duplicates a lot of code out inspec_tools, as part of porting this feature we should de-duplicate all of this code so that we do not have to maintain two instances of this code.

We also need tests for this feature validating that importing SRG's works correctly, as well as verification that all the associated SRG checks imported correctly as well.

Part of the current code used for SRG import: https://github.com/mitre/vulcan/blob/c2d81c40e665a2f88701d373b41a19fdf48f53ca/app/services/CCIAttributes.rb

Code in inspec_tools: https://github.com/mitre/inspec_tools/blob/b5178b1379759e5fa0e6c9769e829bf3df085491/lib/happy_mapper_tools/cci_attributes.rb

Functionally they seem to be the same, in fact most of the files in app/services in the Vulcan alpha app seem to be duplicates from inspec_tools.

Data Table pagination Overflows

When a datatable pagination is longer than the component it is in, it overflows and causes the datatable to overflow the component.

Show Controls button broken

Steps to reproduce:

  • Create a new Project using the Application Server SRG
  • Mark it as non-pending
  • Click on Actions > Show Controls
  • Receive following error

Screen Shot 2020-03-20 at 4 44 18 PM

Unsure if this is related to #39 or if this is a separate error since this happens whether you are using the old or new Application SRG.

Exported V- numbers are incorrect

SRG's currently have a V- number linked to them. This number is NOT the number that is supposed to be exported when you export an InSpec profile. We still need to figure out what the format is for generating this number, however we don't know what that is yet.

Many-to-many linking required for SRGs -> STIG Items

Currently it is not possible to create a STIG Item that addresses multiple SRGs. We also need to handle the case where multiple STIG items are all addressing a single SRG. (So we need a many-to-many table).

Need to add a "Link Item" and "Decompose Item" button to the Show Controls UI.

Ability to export the Vulcan project as a STIG checklist

When the project is finished and approved, the end user should be able to click a button to export the project as a STIG checklist.

Use our inspec 2 checklist code to make this implementation faster.

Heimdal2 has code already written into rails format that might be helpful

Remove Vendor & Sponsor

Currently there is a concept of Vendor and Sponsor. In order to simplify logic, it makes sense to rename both these concepts to Organization and allow a Project to belong to a vendor or a Sponsor.

Control IDs are Incorrect throughout the Application

Control IDs that are shown throughout the application are currently not actually STIG Item IDs, they are Vulnerability SRG IDs. These numbers should not be exported when you export a InSpec profile, and they should not be shown in the Show Controls listing.

Restructure LDAP Login to be more seamless

The current login structure could use reworking, it is broken out into LDAP and User login. We should reconfigure them so users only have 1 login box.

Related to 3 on #70 (comment)

Implementation details: https://ognjen.io/devise-ldap-and-database/

TODO

  • Add a Sign In | Registration tab on top of the sign in form.
  • Finish actually reimplementing LDAP and Local login to work through this single form
  • Redesign Password Reset page as well
  • Get user dropdown in the top right actually working properly
  • Figure out actually useful text for homepage that will benefit a user who does not fully understand what Vulcan does.
  • Add ability to turn local login on or off.

Related SRG Tag is incorrect

Currently the generated SRG outputs

tag Related SRG: "SRG-APP-000001-AS-000001"

This is supposed to be

tag satisfies: ["SRG-APP-000001-AS-000001", "<SRG #2>", etc]

Show Profile text boxes are confusing

If you create a new project and go to "Show Controls" and click on a control, it is very unclear that you are not able to edit the control there since a textbox was used to display the text:

Screen Shot 2020-04-15 at 12 08 12 PM

Typing in this textbox doesn't work.

If you actually want to edit a control you have to go back to the project page and choose "Edit Controls".

Remove all shell out calls to inspec

It is generally a bad idea to shell out in order to execute things unless we really have to, and is not very reliable (this didn't work on my system at first due to path issues). We currently shell out multiple times to run inspec commands when packaging a profile. Since we already require Inspec and Inspec is ruby code, it should be possible to call these functions directly.

Examples:

cmd = "inspec json --chef-license accept-no-persist #{@name.shellescape} | jq . | tee #{@name.shellescape}-overview.json"

Open3.capture3('inspec', 'init', '--chef-license=accept-no-persist', 'profile', @name)

Add ability for users to join Organizations

Currently there is no way for users to join different organizations. One way to make this possible would be for users to choose an organization during signup and also allow users to request to join and organization as well as allow organizations to invite users.

Update Role Permissions

It is currently difficult to use the application as a newcomer due to some intricacies with the current role setup. In order to make it easier to use, the following changes should be made:

As an Admin I can:

  • See all projects and statuses
  • See everything
  • Approve anything

Docker fixes

Docker build does not allow persistence, and in general fails to build

Create a 'Blank Project'

  • This would support the idea of creating a vulcan project that doesn't have a base SRG
  • The main use case would be for the process of creating an SRG itself

Clean up element mapping to hash

Currently there are a lot of spots where we are manually assigning elements to hashes instead of just plucking them. One example of this is the below code:

  def insert_profile_data(inspec_json)
    inspec_json['name'] = name
    inspec_json['title'] = title
    inspec_json['maintainer'] = maintainer
    inspec_json['copyright'] = copyright
    inspec_json['copyright_email'] = copyright_email
    inspec_json['license'] = license
    inspec_json['summary'] = summary
    inspec_json['version'] = version
    inspec_json
  end

This could be replaced with

  def insert_profile_data(inspec_json)
    inspec_json.merge(
      as_json(only: [:name, :title, :maintainer, :copyright, :copyright_email, :license, :summary, :version])
    )
  end

There are multiple instances where we do this in app/models/project.rb. It may simplify the code significantly if we were to clean these up.

Build fails in pipeline if DB already exists

We can ignore the DB existing case for vulcan as long as we do not overwrite the db. which the rake task does check for.

$ docker-compose run web rake db:setup >/dev/null 2>/dev/null
ERROR: Job failed: exit code 1

Add support for marking projects as Sensitive

There should be a concept of "Sensitive" projects which have more limited permissions, and can only be seen by users with the "sensitive" role. There also needs to be the ability to mark projects as sensitive when creating them.

Gitlab CI logs hit max of 4MB due to seeding the db

Real issue is it is not possible to tell if the container built, and was started due to logs filling up before that point.

Fix is to redirect to /dev/null, and check the exit code for errors in the CI tools.

Move javascript assets to webpacker

Currently the app/assets/javascripts folder contains all external libraries directly dumped into the project. We need to update this to use webpacker and revisit which dependencies you actually need, since a lot of these are no longer supported. Most of the current versions we have are from 2014, jQuery is slightly more up-to-date, that version is from 2016.

https://github.com/mitre/vulcan/tree/fac35d3d3eb4d43101f489de7bd450b26f27e724/app/assets/javascripts

Once this is fixed, need to see if #81 is also resolved.

Application Operating Modes

There are different operating environments that the application needs to operate in. For example, someone running the application on their local machine or inside their application would want less restrictive operation than a centralized installation shared by multiple users. The options that should be configurable are as follows:

  • Users (will/will not) be automatically approved
  • Access (will/will not) be restricted by role.
    A default role (will/will not) not be set for new users.

Introduce a concept of Components

Components would replace the concept of Projects and a Project would have many components (Projects are moving "up a level").

An example of this is shown here where each part of the project is broken down into its own component.

Projects can include components in a read-only state.

Setup Project/Component creation

The Alpha Vulcan had a concept of projects. In new Vulcan we are aiming to have a concept of Components and Projects: #58. In order to do this we need to setup the ability to create Components in the new version, and then port the remaining code required for regular project work as well.

Comments are practically impossible to find

When a user adds a new comment on a control, that comment is not displayed in any meaningful manner to someone viewing the project. In the below photo there is 1 new comment on control V-35150. As a user I have no way of telling this.

Screen Shot 2020-04-15 at 2 03 02 PM

Even clicking on the issue doesn't make it clear which have comments and which don't (hint: Applicability has 2 comments):

Screen Shot 2020-04-15 at 12 19 21 PM

Users added to a vendor after project creation cannot see previously created projects

Currently the logic for figuring out what users are part of a vendor only looks at what users that vendor or sponsor had at creation time. This means that the only list of users that matters when a user is creating a project is the one at that moment. To make this worse there is no list shown for what users can see a project, so that user can just silently still see all progress on Projects after they have been removed from the team.

Relevant code:
This is where the users are added to the project (on creation):

project.users << project.vendor.users
project.users << project.sponsor_agency.users

This is where they get assigned a role on the project (this is only called during create):
def assign_project_to_users

Make Devise email confirmation an optional configurable setting

Currently we have a setting in vulcan.yml for turning Devise email confirmation on and off. We need to add a method to our custom registrations_controller which calls skip_confirmation! if this option is actually enabled.

Instead of modifying the registrations_controller, another potentially acceptable option is to call skip_confirmation! before_create on the user model. This also might be easier to add tests for in the User model spec.

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.