• Stars
    star
    201
  • Rank 194,491 (Top 4 %)
  • Language
    TypeScript
  • License
    Other
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Heimdall Enterprise Server 2 lets you view, store, and compare automated security control scan results.

Heimdall

Run E2E Backend + Frontend Tests Run Frontend Tests Run Backend Tests

This repository contains the source code for Heimdall's Backend, Frontend (AKA Heimdall Lite), HDF Converters, and InSpecJS.

Contents

Demos

Video

Hosted

These demos are only intended to show the functionality of Heimdall, please do not upload any sensitive data to them.

Released Previews

Heimdall Lite | Heimdall Server Β Β 

Github Logo

Current Development Master Branch Preview

Heimdall Lite Β Β 

Netlify Logo


Heimdall Server Β Β 

Heimdall (Lite) vs Heimdall with Backend (Server)

There are two ways to deploy MITRE Heimdall - Heimdall-Lite and the full Heimdall with Backend Server. Both share the same frontend but have been produced to meet different needs and use-cases.

Heimdall-Lite

As a single-page javascript app - you can run Heimdall-Lite from any web-server, a secured S3 bucket or directly via GitHub Pages (as it is here). Heimdall-Lite gives you the ability to easily review and produce reports about your InSpec run, filter the results for easy review and hot-wash, print out reports, and much more.

Heimdall with Backend (Server)

Heimdall with Backend, or Heimdall Server runs the same front end as Heimdall-Lite, but is supported with a backend database to store persistent data overtime.

Features

Features Heimdall-Lite Heimdall with Backend
Additional Installation Requirements Postgres Server
Overview Dashboard & Counts βœ… βœ…
Deep Dive View of Security Control Results and Metadata βœ… βœ…
800-53 Partition and TreeMap View βœ… βœ…
Comparison View βœ… βœ…
Advanced Data / Filters for Reports and Viewing βœ… βœ…
Multiple Report Output
(DISA Checklist XML, CAT, XCCDF-Results, and more)
βœ… βœ…
View Multiple Guidance Formats (InSpec profile, Checklist, DISA & CIS XCCDF) βœ… βœ…
Automatic Conversion of Various Security Formats βœ… βœ…
Authenticated REST API βœ…
CRUD Capabilities βœ…
Users & Roles & multi-team support βœ…
Authentication & Authorization Hosting Webserver Hosting Webserver
LDAP
OAuth Support for:
GitHub, GitLab, Google, and Okta.

Use Cases

Heimdall-Lite Heimdall with Backend
Just-in-Time Use Multiple Teams
Minimal Footprint & Deployment Time Timeline and Report History
Local or Disconnected Use Centralized Deployment Model
Minimal Authorization & Approval Time

Getting Started / Installation

Heimdall Lite

Heimdall Lite is published to npmjs.org and is available here.

Running via npm

To run Heimdall Lite locally, just use the npm built-in utility npx:

npx @mitre/heimdall-lite

If you use this tool often and want to have it installed locally, use the following command:

npm install -g @mitre/heimdall-lite

Then, any subsequent npx @mitre/heimdall-lite will use the local version and load much more quickly.

Running via Docker

It is also possible to run Heimdall-Lite using Docker, using the following command:

docker run -d -p 8080:80 mitre/heimdall-lite:release-latest

You can then access Heimdall-Lite at http://localhost:8080.

If you would prefer to run the bleeding edge version of Heimdall-Lite, replace mitre/heimdall-lite:release-latest with mitre/heimdall-lite:latest.


Heimdall Server - Docker

Given that Heimdall requires at least a database service, we use Docker and Docker Compose to provide a simple deployment experience. This process will also deploy an NGINX webserver in front of Heimdall to handle TLS.

Setup Docker Container (Clean Install)

  1. Install Docker

  2. Download and extract the most recent Heimdall release from our releases page. Alternatively, you can clone this repository and navigate to the heimdall2 folder.

  3. Navigate to the base folder where docker-compose.yml is located

  4. By default Heimdall will generate self-signed certificates that will last for 7 days. For production use, place your certificate files in ./nginx/certs/ with the names ssl_certificate.crt and ssl_certificate_key.key respectively. For development use, you can use the default generated certificates which means you do not need to put any certificate files in the ./nginx/certs/ folder.

NGINX Configuration Note: You can configure NGINX settings by changing values in the nginx/conf/default.conf file.

  1. Run the following commands in a terminal window from the Heimdall source directory. For more information on the .env file, visit Environment Variables Configuration.

    • ./setup-docker-env.sh
      # If you would like to further configure your Heimdall instance, edit the .env file generated after running the previous line
      docker-compose up
  2. Navigate to https://127.0.0.1. You should see the application's login page. (Note that if you used the option to generate your own self-signed certs, you will get warnings about them from your browser.)

Updating Docker Container

Starting with version 2.5.0, Heimdall on Docker uses SSL by default. Place your certificate files in ./nginx/certs/ with the names ssl_certificate.crt and ssl_certificate_key.key respectively.

A new version of the docker container can be retrieved by running:

docker-compose pull
docker-compose up -d

This will fetch the latest version of the container, redeploy if a newer version exists, and then apply any database migrations if applicable. No data should be lost by this operation.

Stopping the Container

From the source directory you started from run:

docker-compose down

Helm Chart

https://github.com/mitre/heimdall2-helm

Running via Cloud.gov

Cloud.gov is a FEDRAMP moderate Platform-as-a-Service (PaaS). This repository includes a sample manifest.yml.example file ready to be pushed and run the latest version of Heimdall2 as a container. Make a copy of the example file and update the key values as appropriate. $ cp manifest.yml.example manifest.yml

  1. Setup a cloud.gov account - https://cloud.gov/docs/getting-started/accounts/

  2. Install the cf-cli - https://cloud.gov/docs/getting-started/setup/

  3. Run the following commands in a terminal window from the Heimdall source directory.

$ cd ~/Documents/Github/Heimdall2
$ cf login -a api.fr.cloud.gov  --sso 
# Follow the link to copy the Temporary Authentication Code when prompted
  1. Setup a demo application space
$ cf target -o sandbox-rename create-space heimdall2-rename
  1. Create a postgresql database
# Update manifest.yml file to rename application and database key name
$ cf marketplace
$ cf create-service aws-rds medium-psql heimdall2-rename
$ cf create-service-key heimdall2-db-rename heimdall2-db-test-key
$ cf push

You should be returned the URL for your new test instance to navigate to.

Note: This is only for demonstration purposes, in order to run a production level federal/FISMA system. You will need to contact the cloud.gov program and consult your organization's security team (for risk assessment and an Authority to Operate).

External Data Sources (Interfaces)

Heimdall currently provides connectivity to the following services for importing and visualizing scans:

  • AWS S3
  • Splunk
  • Tenable.SC

AWS S3

For detail information on how to setup and connect to an AWS S3 bucket see the Heimdall Interface Connection - AWS S3 Wiki

Splunk

For detail information on how to setup and connect to an Splunk instances (logical or virtual) see the Heimdall Interface Connection - Splunk Wiki

Tenable.SC

For detail information on how to setup and connect to an Tenable.SC instance see the Heimdall Interface Connection - Tenable.SC Wiki

API Usage

API usage only works when using Heimdall Enterprise Server (AKA "Server Mode").

Heimdall API documentation is being compiled and it is located in this wiki page. In the meantime here are quick instructions for uploading evaluations to Heimdall Server.

# To use API Keys, ensure you have set the API_KEY_SECRET environment variable. To create a secret run: openssl rand -hex 33
# Create an API key using the Heimdall frontend (within the edit user profile modal) and upload an evaluation with the following command
curl -F "data=@<Path to Evaluation File>" -F "filename=<Filename To Show in Heimdall>" -F "public=true/false" -F "evaluationTags=<tag-name>,<another-tag-name>..." -H "Authorization: Api-Key apikeygoeshere" "http://localhost:3000/evaluations"
# You can upload multiple files at once (up to 100)
curl -F "data=@<Path to first evaluation File>" -F "data=@<Path to second evaluation File>" ... -F "public=true/false" -F "evaluationTags=<tag-name>,<another-tag-name>..." -H "Authorization: Api-Key apikeygoeshere" "http://localhost:3000/evaluations"

For Developers

How to Install

If you would like to change Heimdall to your needs, you can use Heimdall's 'Development Mode' to ease the development process. The benefit to using this mode is that it will automatically rebuild itself and use those changes as soon as you make them. Please note that you should not run development mode when deploying Heimdall for general usage.

  1. Install system dependencies with your system's package manager. NodeJS is required and can be installed via your system's package manager, or an alternative method if desired. Documented below is the installation via your system's package manager.

    Ubuntu:

    • # grab nodesource for recent version of nodejs
      sudo curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
      sudo bash /tmp/nodesource_setup.sh
      
      # use apt to install dependencies
      sudo apt install postgresql nodejs git
      sudo apt install nano                        # recommended installation
      sudo npm install -g yarn

    OSX:

    • brew install postgresql node@16 git      
      brew install nano                        # recommended installation
      sudo npm install -g yarn
  2. Clone this repository:

    • git clone https://github.com/mitre/heimdall2
  3. Run the Postgres server:

    Ubuntu:

    • # Switch to the OS postgres user
      sudo -u postgres -i
      
      # Start the Postgres terminal
      psql postgres
      
      # Create the database user
      CREATE USER <username> with encrypted password '<password>';
      ALTER USER <username> CREATEDB;
      \q
      
      # Switch back to your original OS user
      exit

    OSX:

    • # Start the postgres server corresponding to your installation method
      pg_ctl -D /opt/homebrew/var/postgres start
      # Alternatively, you may find postgres in another location like the following:
      pg_ctl -D /usr/local/var/postgres start
      # Brew method
      brew services start postgresql@13
      
      # Start the Postgres terminal
      psql postgres
      
      # Create the database user
      CREATE USER <username> with encrypted password '<password>';
      ALTER USER <username> CREATEDB;
      \q
      
      # Switch back to your original OS user
      exit
  4. Install project dependencies:

    • cd heimdall2
      yarn install
  5. Edit your apps/backend/.env file using the provided setup-dev-env.sh script. Make sure to set a DATABASE_USERNAME and DATABASE_PASSWORD that match what you set for the PostgresDB in step 3.

You can also open the apps/backend/.env file in a text editor and set additional optional configuration values. For more info on configuration values see Enviroment Variables Configuration.

  1. Create the database:

    • yarn backend sequelize-cli db:create
      yarn backend sequelize-cli db:migrate
      yarn backend sequelize-cli db:seed:all
  2. Start Heimdall:

    • yarn start:dev

This will start both the frontend and backend in development mode, meaning any changes you make to the source code will take effect immediately. Please note we already have a Visual Studio Code workspace file you can use to organize your workspace.

Debugging Heimdall Server

If you are using Visual Studio Code, it is very simple to debug this application locally. First open up the Visual Studio Code workspace and ensure the Node debuger Auto Attach feature in Visual Studio Code is enabled. Next, open the integrated Visual Studio Code terminal and run:

yarn backend start:debug

Visual Studio Code will then automatically attach a debugger and stop and any breakpoints you place in the application.

Developing Heimdall Lite Standalone

If you only want to make changes to the frontend (heimdall-lite) use the following command:

yarn frontend start:dev

Lint and fix files

To validate and lint your code run:

yarn run lint

Compile and minify the frontend and backend for production

yarn build

Run tests

To test your code to make sure everything still works:

# Run Frontend Vue Tests
yarn frontend test
# Run Backend Nest Tests
yarn backend test:ci-cov

Run Cypress End to End Tests

The application includes E2E frontend + Backend tests (built using the cypress.io framework). These perform automated checking that Heimdall Server is running as intended. In order to run these tests, a running instance of the application is required.

CYPRESS_TESTING=true yarn start:dev
CYPRESS_BASE_URL=http://localhost:8080 yarn test:ui:open

The first command will start an instance of Heimdall Server and exposes additional routes required to allow the tests to run. The second will open the Cypress UI which will run the tests any time code changes are made.

Creating a Release

Note: This action requires appropriate privileges on the repository to perform.

The steps to create a release are now on the wiki.

Versioning and State of Development

This project uses the Semantic Versioning Policy

Contributing, Issues and Support

Contributing

Please feel free to look through our issues, make a fork and submit PRs and improvements. We love hearing from our end-users and the community and will be happy to engage with you on suggestions, updates, fixes or new capabilities.

Issues and Support

Please feel free to contact us by opening an issue on the issue board, or, at [email protected] should you have any suggestions, questions or issues. If you have more general questions about the use of our software or other concerns, please contact us at [email protected].

More Repositories

1

caldera

Automated Adversary Emulation Platform
Python
4,455
star
2

cti

Cyber Threat Intelligence Repository expressed in STIX 2.0
1,716
star
3

HTTP-Proxy-Servlet

Smiley's HTTP Proxy implemented as a Java servlet
Java
1,456
star
4

advmlthreatmatrix

Adversarial Threat Landscape for AI Systems
1,038
star
5

multiscanner

Modular file scanning/analysis framework
Python
598
star
6

cascade-server

CASCADE Server
Python
238
star
7

brawl-public-game-001

Data from a BRAWL Automated Adversary Emulation Exercise
188
star
8

caldera-ot

MITRE Calderaβ„’ for OT Plugins & Capabilities
185
star
9

saf

The MITRE Security Automation Framework (SAF) Command Line Interface (CLI) brings together applications, techniques, libraries, and tools developed by MITRE and the security community to streamline security automation for systems and DevOps pipelines
TypeScript
118
star
10

inspec_tools

A command-line and ruby API of utilities, converters and tools for creating, converting and processing security baseline formats, results and data
Ruby
91
star
11

quaerite

Search relevance evaluation toolkit
Java
73
star
12

aws-foundations-cis-baseline

InSpec profile to validate your VPC to the standards of the CIS Amazon Web Services Foundations Benchmark v1.1.0
Ruby
72
star
13

menelaus

Online and batch-based concept and data drift detection algorithms to monitor and maintain ML performance.
Python
64
star
14

stockpile

A CALDERA plugin
PowerShell
63
star
15

hipcheck

Automatically assess and score software repositories for supply chain risk.
Rust
62
star
16

engage

MITRE Engageβ„’ is a framework for conducting Denial, Deception, and Adversary Engagements.
59
star
17

vulcan

A web application to streamline the development of STIGs from SRGs
Ruby
54
star
18

sandcat

A CALDERA plugin
Go
53
star
19

caret

CARET - A tool for viewing cyber analytic relationships
JavaScript
52
star
20

pydecipher

pydecipher: unfreeze and deobfuscate your frozen python code
Python
46
star
21

device-admin-sample

Java
44
star
22

heimdall-legacy

A Security Results Viewer for the web with storage, teams and history
Ruby
35
star
23

heimdall_tools

DEPRECATED: A set of utilities for converting and working with compliance data for viewing in the heimdall applications
Ruby
33
star
24

fhir-server

A fast, open source, HL7 FHIR server
Go
33
star
25

cpsa

Cryptographic Protocol Shapes Analyzer
Scilab
33
star
26

tmnt

Algorithms for training state-of-the-art neural topic models
Python
31
star
27

stix2patterns_translator

Translate STIX 2 Patterning Queries
Python
30
star
28

vulnerable-mobile-apps

30
star
29

fusera

A FUSE interface to the NCBI Sequence Read Archive (SRA)
Go
29
star
30

sparklyr.nested

A sparklyr extension for nested data
R
29
star
31

d3fend

Public static website for the D3FEND project. For the D3FEND ontology repo see: https://github.com/d3fend/d3fend-ontology
HTML
27
star
32

atomic

A CALDERA plugin
Python
25
star
33

mitre.github.io

Open Source software from The MITRE Corporation
CSS
25
star
34

emasser

emasser is a command-line interface (CLI) that aims to automate routine business use-cases and provide utility surrounding the Enterprise Mission Assurance Support Service (eMASS) by leveraging its representational state transfer (REST) application programming interface (API).
Ruby
24
star
35

cis-aws-foundations-hardening

(WIP) A terraform / kitchen-terraform hardening baseline for the cis-aws-foundations-baseline
HCL
24
star
36

response

A CALDERA plugin for autonomous incident response
Python
23
star
37

ansible-cis-docker-ce-hardening

(WIP) An ansible playbook to harden a docker host to the CIS CE Benchmark requirements
Python
23
star
38

heimdall-lite

Heimdall Lite 2.0 is a JavaScript based security results viewer and review tool supporting multiple security results formats, such as: InSpec, SonarQube, OWASP-Zap and Fortify which you can load locally, from S3 and other data sources.
TypeScript
21
star
39

rhapsode

Advanced desktop search/corpus exploration prototype
Java
21
star
40

nginx-stigready-baseline

STIG Ready Content: InSpec Profile for NGINX Open Source based off the Web SRG V2R3
Ruby
21
star
41

human

Caldera plugin to deploy "humans" to emulate user behavior on systems
Python
20
star
42

emb3d

HTML
20
star
43

caldera-agent

Python
19
star
44

OpenHealthDashboard

A dashboard framework for visualizing complex data sets on T1V multi-panel displays
JavaScript
19
star
45

biqt-face

A face quality plugin for the BIQT framework.
C++
19
star
46

training

A CALDERA plugin
Python
18
star
47

emu

This CALDERA Plugin converts Adversary Emulation Plans from the Center for Threat Informed Defense
Python
18
star
48

thumbtack

A web front-end providing a REST-ful API to mount and unmount forensic disk images
Python
18
star
49

CICAT

Python
17
star
50

SystemInspector

SystemInspector is a script to pull a majority of the security-relevant files and settings from a system.
Shell
17
star
51

adversary

A CALDERA plugin
Python
17
star
52

inspec_training_courses

(WIP) A set of training material and guides for using inspec
Ruby
16
star
53

Fast-RRT-Star

ROS Global Path Planner Plugin based on the F-RRT* algorithm from this paper: https://doi.org/10.1016/j.eswa.2021.115457
C++
16
star
54

ilpyt

ilpyt: imitation learning library with modular, baseline implementations in Pytorch
Python
15
star
55

callisto

Java
15
star
56

microsoft-azure-cis-foundations-baseline

(WIP) CIS Microsoft Azure Foundations Benchmark
Ruby
15
star
57

ptmatch

A patient matching test harness to support PCOR
JavaScript
15
star
58

access

A CALDERA plugin
HTML
15
star
59

microsoft-windows-server-2019-stig-baseline

Microsoft Windows Server 2019 STIG InSpec Profile
Ruby
14
star
60

microsoft-windows-10-stig-baseline

InSpec profile for Microsoft Windows 10, against DISA's Microsoft Windows 10 Security Technical Implementation Guide (STIG) Version 1, Release 19
Ruby
14
star
61

multiscanner-ansible

Ansible configurations for distributed MultiScanner installations
Shell
13
star
62

policynet

Exploration of the U.S. rulesets as a network
Python
13
star
63

aws-rds-infrastructure-cis-baseline

InSpec Profile to validate the secure configuration of aws-rds-infrastructure-cis-baseline, against CIS's Amazon Web Services Three-tier Web Architecture Benchmark V1.0.0
Ruby
13
star
64

aws-s3-baseline

A micro InSpec baseline to check for insecure or public s3 buckets in your VPC
Ruby
13
star
65

biqt-iris

An iris quality plugin for the BIQT framework.
C++
13
star
66

FiGHT

Publicly accessible version of the FiGHT website.
HTML
12
star
67

yararules-python

Easily scan with multiple yara rules from different sources.
Python
12
star
68

keyterms

KeyTerms centralized terminology management tool
JavaScript
12
star
69

pickled-canary

Assembly-based binary pattern search!
Rust
12
star
70

ps_pc_props

PowerShell Utilities for Security Situational Awareness
PowerShell
12
star
71

microsoft-windows-server-2016-stig-baseline

An InSpec Profile for evaluating a Windows 2016 server to the DISA STIGs
Ruby
12
star
72

canonical-ubuntu-16.04-lts-stig-baseline

InSpec profile to validate the secure configuration of Canonical Ubuntu 16.04 LTS against DISA's Canonical Ubuntu 16.04 LTS Security Technical Implementation Guide (STIG) Version 1 Release 1.
Ruby
12
star
73

emass_client

The eMASS client repository maintains the Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) specification and executables.
Ruby
12
star
74

heimdall-mongo

A Mongo-based version of Heimdall (Deprecated)
Ruby
11
star
75

skeleton

A CALDERA Plugin Template
Python
11
star
76

fhir-exercises

HTML
11
star
77

hse-mwi

The Mental Wellness Index is a framework and dashboard tool that provides a picture of community-level mental wellness for each zip code in the nation
HTML
11
star
78

ckl2POAM

Standalone tool for converting DISA Checklists to eMASS POA&M Excel spreadsheets.
TypeScript
11
star
79

ecqm

Server side components to support electronic clinical quality measure calculation
Go
11
star
80

demodocus

Project dedicated to extending the capabilities of automated accessibility testing tools to include testing interactive web content.
Python
10
star
81

ecqm-frontend

Web application to provide an interface for clinical quality measure calculation
JavaScript
10
star
82

mock

A CALDERA plugin
Python
10
star
83

compass

HTML
10
star
84

saf-training-lab-environment

The SAF Training Lab is a GitHub Codespaces environment that makes it quick and easy for you to use, learn and participate in the MITRE Security Automation Framework Training Classes.
Shell
10
star
85

icap

Internet Content Adaptation Protocol (ICAP) Analyzer for Bro and Zeek.
JavaScript
10
star
86

FMACM

An aircraft and control model for Flight Deck Interval Management MOPS testing by RTCA SC-186 members.
C++
10
star
87

canonical-ubuntu-18.04-lts-stig-baseline

(WIP) canonical-ubuntu-18.04-lts-stig-baseline
Ruby
9
star
88

cpsaexp

Experimental CPSA -- the Cryptographic Protocol Shapes Analyzer experimental version
Scilab
9
star
89

gocat

Simplified go-cat agent for caldera
Go
9
star
90

caltack

Plugin that serves the ATT&CK website alongside CALDERA.
Python
9
star
91

arlin

ARLIN is a research library written in Python that provides explainability outputs and vulnerability detection for DRL models, specifically designed to increase model assurance and identify vulnerabilities and potential points of failure within a trained model. https://mitre.github.io/arlin/
Python
9
star
92

mitre_fast_layered_map

A high-speed lidar based mapping package for use with large scale robotics such as autonomous vehicles.
C++
9
star
93

caldera-crater

C#
9
star
94

credentials

Insulates package authors from worrying about how to collect user credentials
R
9
star
95

biqt

The core engine of the BIQT framework.
C
8
star
96

stixmarx

Data Markings API for STIX 1.x
Python
8
star
97

cql-translation-service

CQL to ELM translator packaged as a microservice.
Java
8
star
98

serverless-inspec-deprecated

(wip) InSpec run from serverless environments (lambda)
HCL
8
star
99

scorecard_app

Scorecard for a FHIR Patient Record -- SMART on FHIR App
HTML
8
star
100

heimdall-vue

(deprecated) A refactor of the heimdall-lite project using vue, see:
Vue
8
star