emasser 3.10.0 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env-example +18 -12
- data/.github/workflows/anchore-syft.yml +38 -0
- data/.github/workflows/codeql-analysis.yml +4 -4
- data/.github/workflows/gh-pages.yml +1 -1
- data/.github/workflows/push-to-docker-mail.yml +6 -7
- data/.github/workflows/push-to-docker.yml +6 -6
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/rubocop.yml +2 -2
- data/.github/workflows/test-cli.yml +5 -5
- data/.mergify.yml +11 -11
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +58 -2
- data/Dockerfile +6 -4
- data/Gemfile.lock +108 -64
- data/README.md +23 -22
- data/docs/features.md +682 -539
- data/emasser.gemspec +19 -13
- data/images/emasser_architecture.png +0 -0
- data/lib/emasser/configuration.rb +136 -35
- data/lib/emasser/constants.rb +4 -4
- data/lib/emasser/delete.rb +145 -15
- data/lib/emasser/errors.rb +9 -0
- data/lib/emasser/get.rb +891 -251
- data/lib/emasser/help/approvalCac_post_mapper.md +6 -5
- data/lib/emasser/help/approvalPac_post_mapper.md +1 -5
- data/lib/emasser/help/artifacts_del_mapper.md +2 -2
- data/lib/emasser/help/artifacts_post_mapper.md +23 -34
- data/lib/emasser/help/artifacts_put_mapper.md +28 -9
- data/lib/emasser/help/cloudresource_post_mapper.md +4 -3
- data/lib/emasser/help/controls_put_mapper.md +24 -16
- data/lib/emasser/help/hardware_post_mapper.md +41 -0
- data/lib/emasser/help/hardware_put_mapper.md +42 -0
- data/lib/emasser/help/milestone_del_mapper.md +1 -1
- data/lib/emasser/help/milestone_post_mapper.md +3 -1
- data/lib/emasser/help/milestone_put_mapper.md +1 -8
- data/lib/emasser/help/poam_del_mapper.md +1 -1
- data/lib/emasser/help/poam_post_mapper.md +40 -14
- data/lib/emasser/help/poam_put_mapper.md +43 -18
- data/lib/emasser/help/software_post_mapper.md +59 -0
- data/lib/emasser/help/software_put_mapper.md +60 -0
- data/lib/emasser/help/staticcode_post_mapper.md +0 -4
- data/lib/emasser/help/testresults_post_mapper.md +8 -11
- data/lib/emasser/output_converters.rb +64 -46
- data/lib/emasser/post.rb +603 -231
- data/lib/emasser/put.rb +453 -193
- data/lib/emasser/version.rb +1 -1
- metadata +51 -33
- data/images/emasser_architecture.jpg +0 -0
- data/images/emasser_diagram-Page-3.jpg +0 -0
data/README.md
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
#
|
1
|
+
# eMASSer
|
2
2
|

|
3
3
|
  
|
4
4
|
|
5
|
-

|
6
|
-

|
5
|
+
[](https://github.com/mitre/emasser/actions/workflows/test-cli.yml)
|
6
|
+
[](https://github.com/mitre/emasser/actions/workflows/codeql-analysis.yml)
|
7
7
|
[](https://github.com/mitre/emasser/actions/workflows/gh-pages.yml)
|
8
|
-

|
8
|
+
[](https://github.com/mitre/emasser/actions/workflows/rubocop.yml)
|
9
9
|
|
10
10
|
## About
|
11
11
|
|
12
|
-
`
|
12
|
+
`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)](https://mitre.github.io/emass_client/docs/eMASS_API_Documentation.pdf).
|
13
13
|
|
14
|
-
***NOTE***: The `
|
14
|
+
***NOTE***: The `eMASSer` CLI utilizes the [emass_client](https://github.com/mitre/emass_client) RubyGem executable package to access the eMASS API endpoints.
|
15
15
|
|
16
16
|
---
|
17
17
|
## Documentation
|
18
18
|
For detail content information about the `eMASS` API references the [**eMASS API Specification**](https://mitre.github.io/emass_client/docs/redoc/) page.
|
19
19
|
|
20
|
-
For detail features provided by the `
|
20
|
+
For detail features provided by the `eMASSer` CLI references the [**eMASSer CLI Features**](docs/features.md) page.
|
21
21
|
|
22
|
-
The `
|
22
|
+
The `eMASSer` CLI [**Architecture**](#emasser-cli-architecture) depicts the structure, and provides an explanation of CLI behaviors.
|
23
23
|
|
24
24
|
---
|
25
25
|
## Installation Options
|
26
26
|
|
27
|
-
`
|
27
|
+
`eMASSer` is a Ruby CLI distributed via GitHub (this repository), [RubyGems](https://rubygems.org/gems/emass_client/versions/), or [Docker](https://hub.docker.com/r/mitre/emasser/tags).
|
28
28
|
|
29
29
|
### Installation Dependencies
|
30
30
|
* git
|
31
|
-
* Ruby version
|
31
|
+
* Ruby version 3.22 or greater
|
32
32
|
|
33
|
-
### Runtime Dependencies
|
34
|
-
* Ruby version
|
33
|
+
### Runtime Major Dependencies
|
34
|
+
* Ruby version 3.22 or greater
|
35
35
|
* `rubyzip (latest version)`
|
36
36
|
* `emass_client (latest version)`
|
37
37
|
* On Windows the `cURL` binary is required (libcurl.dll). To install cURL:
|
@@ -41,6 +41,7 @@ The `emasser` CLI [**Architecture**](#emasser-cli-architecture) depicts the `ema
|
|
41
41
|
- Extract the file into the Ruby installation /bin directory
|
42
42
|
- Rename the file to `libcurl.dll` if it has the `_x64` suffix
|
43
43
|
- Install [cURL for windows](https://community.chocolatey.org/packages/curl) and add the installation directory to the PATH.
|
44
|
+
* See the `emasser.gemspec` file for all other dependencies
|
44
45
|
|
45
46
|
|
46
47
|
## Install via GitHub
|
@@ -49,7 +50,7 @@ The `emasser` CLI [**Architecture**](#emasser-cli-architecture) depicts the `ema
|
|
49
50
|
git clone <path to emasser repository> emasser
|
50
51
|
cd emasser
|
51
52
|
```
|
52
|
-
- Build the
|
53
|
+
- Build the eMASSer gem*
|
53
54
|
```bash
|
54
55
|
gem build *.gemspec
|
55
56
|
gem install *.gem
|
@@ -81,7 +82,7 @@ bundle exec exe/emasser [command]
|
|
81
82
|
***Note:** See [Setting Environment Variables Configuration](https://github.com/mitre/emasser/wiki/Editing-Environment-Variables-Configuration) for detailed information on required and optional variables.
|
82
83
|
|
83
84
|
## Using Docker
|
84
|
-
Ensure that docker engine is running and start the
|
85
|
+
Ensure that docker engine is running and start the eMASSer Docker Container.
|
85
86
|
### Install
|
86
87
|
- On Linux or Mac:
|
87
88
|
```
|
@@ -109,7 +110,7 @@ Ensure that docker engine is running and start the emasser Docker Container.
|
|
109
110
|
```
|
110
111
|
- See [Editing Environment Variables Configuration](https://github.com/mitre/emasser/wiki/Editing-Environment-Variables-Configuration)
|
111
112
|
|
112
|
-
### Run
|
113
|
+
### Run eMASSer API client commands
|
113
114
|
- To list all available GET, POST, PUT, or DELETE commands use:
|
114
115
|
```
|
115
116
|
docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest get help
|
@@ -132,7 +133,7 @@ Ensure that docker engine is running and start the emasser Docker Container.
|
|
132
133
|
---
|
133
134
|
## Roadmap
|
134
135
|
|
135
|
-
The `
|
136
|
+
The `eMASSer` implements all endpoints provided by the `eMASS` API, there is, all of the functions available from the `eMASS GUI` that are exposed by the API. If additional functions are useful (accessible via the CLI), please submit a request to [eMass Tier III Support](mailto:disa.meade.id.mbx.emass-tier-iii-support@mail.mil) for possible inclusion into the API.
|
136
137
|
|
137
138
|
The Road Map seeks to add any useful features that facilitates organization that utilizes `eMASS` instances and have a need to automate their cybersecurity management process.
|
138
139
|
|
@@ -147,21 +148,21 @@ Some proposed capabilities (looking for a sponsor) are:
|
|
147
148
|
## Design
|
148
149
|
|
149
150
|
### Interactions with eMASS API
|
150
|
-
The `
|
151
|
+
The `eMASSer` CLI leverages the [emass_client](https://github.com/mitre/emass_client), which provides a REST API client developed by MITRE based on the [OpenAPI V3](https://www.openapis.org/) standards for the official [eMASS API specification](https://mitre.github.io/emass_client/docs/redoc). This design enables REST API clients to be generated in [any supported programming language](https://openapi-generator.tech/docs/generators/). The design enables the `emass_client` to be generated independently of the eMASSer CLI. Currently, a Ruby and a Typescript eMASS client API are provided. The TypeScript client is used with the [Security Automation Framework CLI (SAF) CLI](https://github.com/mitre/saf).
|
151
152
|
|
152
153
|
### Business Logic
|
153
|
-
Because interactions with the API are handled by a dependency, the bulk of `
|
154
|
+
Because interactions with the API are handled by a dependency, the bulk of `eMASSer` business logic is for accepting user input/output, reading data from eMASS or from input, transforming data, and routing data to the appropriate eMASS API endpoint. This business logic is organized into Ruby Classes and Modules based on the command or subcommand requested by the user.
|
154
155
|
|
155
|
-
##
|
156
|
-
The `
|
156
|
+
## eMASSer CLI Architecture
|
157
|
+
The `eMASSer` CLI makes use of the `emass_client` ruby gem to communicate with an `eMASS` instance via the `eMASS API` as depicted in the diagram below:
|
157
158
|
|
158
159
|
<div align="center">
|
159
|
-
<img src="images/emasser_architecture.
|
160
|
+
<img src="images/emasser_architecture.png" alt="emasser CLI Architecture" title="emasser CLI Architecture">
|
160
161
|
</div>
|
161
162
|
|
162
163
|
### NOTICE
|
163
164
|
|
164
|
-
©
|
165
|
+
© 2025 The MITRE Corporation.
|
165
166
|
|
166
167
|
Approved for Public Release; Distribution Unlimited. Case Number 18-3678.
|
167
168
|
|