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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.env-example +18 -12
  3. data/.github/workflows/anchore-syft.yml +38 -0
  4. data/.github/workflows/codeql-analysis.yml +4 -4
  5. data/.github/workflows/gh-pages.yml +1 -1
  6. data/.github/workflows/push-to-docker-mail.yml +6 -7
  7. data/.github/workflows/push-to-docker.yml +6 -6
  8. data/.github/workflows/release.yml +1 -1
  9. data/.github/workflows/rubocop.yml +2 -2
  10. data/.github/workflows/test-cli.yml +5 -5
  11. data/.mergify.yml +11 -11
  12. data/.rubocop.yml +1 -1
  13. data/CHANGELOG.md +58 -2
  14. data/Dockerfile +6 -4
  15. data/Gemfile.lock +108 -64
  16. data/README.md +23 -22
  17. data/docs/features.md +682 -539
  18. data/emasser.gemspec +19 -13
  19. data/images/emasser_architecture.png +0 -0
  20. data/lib/emasser/configuration.rb +136 -35
  21. data/lib/emasser/constants.rb +4 -4
  22. data/lib/emasser/delete.rb +145 -15
  23. data/lib/emasser/errors.rb +9 -0
  24. data/lib/emasser/get.rb +891 -251
  25. data/lib/emasser/help/approvalCac_post_mapper.md +6 -5
  26. data/lib/emasser/help/approvalPac_post_mapper.md +1 -5
  27. data/lib/emasser/help/artifacts_del_mapper.md +2 -2
  28. data/lib/emasser/help/artifacts_post_mapper.md +23 -34
  29. data/lib/emasser/help/artifacts_put_mapper.md +28 -9
  30. data/lib/emasser/help/cloudresource_post_mapper.md +4 -3
  31. data/lib/emasser/help/controls_put_mapper.md +24 -16
  32. data/lib/emasser/help/hardware_post_mapper.md +41 -0
  33. data/lib/emasser/help/hardware_put_mapper.md +42 -0
  34. data/lib/emasser/help/milestone_del_mapper.md +1 -1
  35. data/lib/emasser/help/milestone_post_mapper.md +3 -1
  36. data/lib/emasser/help/milestone_put_mapper.md +1 -8
  37. data/lib/emasser/help/poam_del_mapper.md +1 -1
  38. data/lib/emasser/help/poam_post_mapper.md +40 -14
  39. data/lib/emasser/help/poam_put_mapper.md +43 -18
  40. data/lib/emasser/help/software_post_mapper.md +59 -0
  41. data/lib/emasser/help/software_put_mapper.md +60 -0
  42. data/lib/emasser/help/staticcode_post_mapper.md +0 -4
  43. data/lib/emasser/help/testresults_post_mapper.md +8 -11
  44. data/lib/emasser/output_converters.rb +64 -46
  45. data/lib/emasser/post.rb +603 -231
  46. data/lib/emasser/put.rb +453 -193
  47. data/lib/emasser/version.rb +1 -1
  48. metadata +51 -33
  49. data/images/emasser_architecture.jpg +0 -0
  50. data/images/emasser_diagram-Page-3.jpg +0 -0
data/README.md CHANGED
@@ -1,37 +1,37 @@
1
- # emasser
1
+ # eMASSer
2
2
  ![GitHub Release Date](https://img.shields.io/github/release-date/mitre/emasser?label=Release%20Date&logo=github&color=blue)
3
3
  ![GitHub release (latest by date)](https://img.shields.io/github/v/release/mitre/emasser?label=Release%20Version&logo=github) ![Gem](https://img.shields.io/gem/v/emasser?label=gem%20version&logo=ruby&logoColor=red) ![Docker Version](https://img.shields.io/docker/v/mitre/emasser?label=docker%20version&logo=docker&sort=semver)
4
4
 
5
- ![emasser Testing](https://github.com/mitre/emasser/actions/workflows/test-cli.yml/badge.svg)
6
- ![CodeQL Vulnerabilities and Errors](https://github.com/mitre/emasser/actions/workflows/codeql-analysis.yml/badge.svg)
5
+ [![emasser Testing](https://github.com/mitre/emasser/actions/workflows/test-cli.yml/badge.svg)](https://github.com/mitre/emasser/actions/workflows/test-cli.yml)
6
+ [![CodeQL Vulnerabilities and Errors](https://github.com/mitre/emasser/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/mitre/emasser/actions/workflows/codeql-analysis.yml)
7
7
  [![GitHub Pages](https://github.com/mitre/emasser/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/mitre/emasser/actions/workflows/gh-pages.yml)
8
- ![Code Linter](https://github.com/mitre/emasser/actions/workflows/rubocop.yml/badge.svg)
8
+ [![Code Linter](https://github.com/mitre/emasser/actions/workflows/rubocop.yml/badge.svg)](https://github.com/mitre/emasser/actions/workflows/rubocop.yml)
9
9
 
10
10
  ## About
11
11
 
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).
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 `emasser` CLI utilizes the [emass_client](https://github.com/mitre/emass_client) RubyGem executable package to access the eMASS API endpoints.
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 `emasser` CLI references the [**emasser CLI Features**](docs/features.md) page.
20
+ For detail features provided by the `eMASSer` CLI references the [**eMASSer CLI Features**](docs/features.md) page.
21
21
 
22
- The `emasser` CLI [**Architecture**](#emasser-cli-architecture) depicts the `emasser` structure, and provides an explanation of how it behaves.
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
- `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).
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 2.7 or greater
31
+ * Ruby version 3.22 or greater
32
32
 
33
- ### Runtime Dependencies
34
- * Ruby version 2.7 or greater.
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 emasser gem*
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 emasser Docker Container.
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 emasser API client commands
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 `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
+ 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 `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
+ 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 `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
+ 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
- ## Emasser CLI Architecture
156
- 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:
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.jpg" alt="emasser CLI Architecture" title="emasser CLI 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
- © 2020 The MITRE Corporation.
165
+ © 2025 The MITRE Corporation.
165
166
 
166
167
  Approved for Public Release; Distribution Unlimited. Case Number 18-3678.
167
168