emasser 3.4.1 → 3.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +8 -8
- data/.env-example +12 -12
- data/.github/release-drafter.yml +15 -15
- data/.github/workflows/codeql-analysis.yml +70 -70
- data/.github/workflows/draft-release.yml +15 -15
- data/.github/workflows/gh-pages.yml +32 -32
- data/.github/workflows/push-to-docker-mail.yml +28 -28
- data/.github/workflows/push-to-docker.yml +35 -35
- data/.github/workflows/release.yml +42 -42
- data/.github/workflows/rubocop.yml +23 -23
- data/.github/workflows/test-cli.yml +39 -72
- data/.gitignore +19 -19
- data/.mergify.yml +25 -25
- data/.rubocop.yml +83 -80
- data/.rubocop_todo.yml +27 -27
- data/CHANGELOG.md +66 -16
- data/Dockerfile +44 -44
- data/Gemfile +8 -8
- data/Gemfile.lock +108 -104
- data/LICENSE.md +15 -15
- data/README.md +179 -178
- data/Rakefile +18 -18
- data/_config.yml +1 -1
- data/docs/features.md +1677 -1437
- data/docs/redoc/index.html +1230 -1230
- data/emasser.gemspec +44 -44
- data/exe/emasser +5 -5
- data/lib/emasser/cli.rb +37 -37
- data/lib/emasser/configuration.rb +49 -49
- data/lib/emasser/constants.rb +22 -26
- data/lib/emasser/delete.rb +210 -148
- data/lib/emasser/errors.rb +14 -14
- data/lib/emasser/get.rb +1401 -949
- data/lib/emasser/help/approvalCac_post_mapper.md +20 -20
- data/lib/emasser/help/approvalPac_post_mapper.md +20 -20
- data/lib/emasser/help/artifacts_del_mapper.md +9 -9
- data/lib/emasser/help/artifacts_post_mapper.md +59 -59
- data/lib/emasser/help/artifacts_put_mapper.md +34 -34
- data/lib/emasser/help/cloudresource_post_mapper.md +62 -62
- data/lib/emasser/help/cmmc_get_mapper.md +4 -4
- data/lib/emasser/help/container_post_mapper.md +44 -44
- data/lib/emasser/help/controls_put_mapper.md +74 -74
- data/lib/emasser/help/milestone_del_mapper.md +11 -11
- data/lib/emasser/help/milestone_post_mapper.md +14 -14
- data/lib/emasser/help/milestone_put_mapper.md +23 -23
- data/lib/emasser/help/poam_del_mapper.md +5 -5
- data/lib/emasser/help/poam_post_mapper.md +93 -93
- data/lib/emasser/help/poam_put_mapper.md +107 -107
- data/lib/emasser/help/staticcode_clear_mapper.md +16 -16
- data/lib/emasser/help/staticcode_post_mapper.md +21 -21
- data/lib/emasser/help/testresults_post_mapper.md +21 -21
- data/lib/emasser/help.rb +11 -11
- data/lib/emasser/input_converters.rb +21 -21
- data/lib/emasser/options_parser.rb +20 -20
- data/lib/emasser/output_converters.rb +125 -111
- data/lib/emasser/post.rb +830 -830
- data/lib/emasser/put.rb +588 -588
- data/lib/emasser/version.rb +5 -5
- data/lib/emasser.rb +19 -19
- metadata +16 -10
data/Gemfile.lock
CHANGED
@@ -1,104 +1,108 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
emasser (3.
|
5
|
-
activesupport (
|
6
|
-
colorize (~> 0.8.1)
|
7
|
-
dotenv (~> 2.7.6)
|
8
|
-
emass_client (~> 3.
|
9
|
-
rubyzip (~> 2.3.2)
|
10
|
-
thor (~> 1.1.0)
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: https://rubygems.org/
|
14
|
-
specs:
|
15
|
-
activesupport (
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
-
i18n (>= 1.6, < 2)
|
18
|
-
minitest (>= 5.1)
|
19
|
-
tzinfo (~> 2.0)
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
ffi (1.
|
35
|
-
i18n (1.
|
36
|
-
concurrent-ruby (~> 1.0)
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
rspec-
|
51
|
-
|
52
|
-
|
53
|
-
rspec-support (~> 3.10.0)
|
54
|
-
rspec-
|
55
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
-
rspec-support (~> 3.10.0)
|
57
|
-
rspec-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
rubocop-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
emasser (3.12.0)
|
5
|
+
activesupport (>= 6.1.4, < 7.1.0)
|
6
|
+
colorize (~> 0.8.1)
|
7
|
+
dotenv (~> 2.7.6)
|
8
|
+
emass_client (~> 3.12)
|
9
|
+
rubyzip (~> 2.3.2)
|
10
|
+
thor (~> 1.1.0)
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
activesupport (7.0.8)
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
tzinfo (~> 2.0)
|
20
|
+
ast (2.4.2)
|
21
|
+
bundler-audit (0.9.1)
|
22
|
+
bundler (>= 1.2.0, < 3)
|
23
|
+
thor (~> 1.0)
|
24
|
+
byebug (11.1.3)
|
25
|
+
colorize (0.8.1)
|
26
|
+
concurrent-ruby (1.2.2)
|
27
|
+
diff-lcs (1.5.0)
|
28
|
+
dotenv (2.7.6)
|
29
|
+
emass_client (3.12.0)
|
30
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
31
|
+
ethon (0.16.0)
|
32
|
+
ffi (>= 1.15.0)
|
33
|
+
ffi (1.16.3)
|
34
|
+
ffi (1.16.3-x64-mingw32)
|
35
|
+
i18n (1.14.1)
|
36
|
+
concurrent-ruby (~> 1.0)
|
37
|
+
json (2.6.3)
|
38
|
+
minitest (5.20.0)
|
39
|
+
parallel (1.23.0)
|
40
|
+
parser (3.2.2.3)
|
41
|
+
ast (~> 2.4.1)
|
42
|
+
racc
|
43
|
+
racc (1.7.1)
|
44
|
+
rainbow (3.1.1)
|
45
|
+
rake (13.0.6)
|
46
|
+
regexp_parser (2.8.1)
|
47
|
+
rexml (3.2.5)
|
48
|
+
rspec (3.10.0)
|
49
|
+
rspec-core (~> 3.10.0)
|
50
|
+
rspec-expectations (~> 3.10.0)
|
51
|
+
rspec-mocks (~> 3.10.0)
|
52
|
+
rspec-core (3.10.2)
|
53
|
+
rspec-support (~> 3.10.0)
|
54
|
+
rspec-expectations (3.10.2)
|
55
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
+
rspec-support (~> 3.10.0)
|
57
|
+
rspec-mocks (3.10.3)
|
58
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
+
rspec-support (~> 3.10.0)
|
60
|
+
rspec-support (3.10.3)
|
61
|
+
rubocop (1.52.1)
|
62
|
+
json (~> 2.3)
|
63
|
+
parallel (~> 1.10)
|
64
|
+
parser (>= 3.2.2.3)
|
65
|
+
rainbow (>= 2.2.2, < 4.0)
|
66
|
+
regexp_parser (>= 1.8, < 3.0)
|
67
|
+
rexml (>= 3.2.5, < 4.0)
|
68
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
69
|
+
ruby-progressbar (~> 1.7)
|
70
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
71
|
+
rubocop-ast (1.29.0)
|
72
|
+
parser (>= 3.2.1.0)
|
73
|
+
rubocop-minitest (0.31.0)
|
74
|
+
rubocop (>= 1.39, < 2.0)
|
75
|
+
rubocop-performance (1.18.0)
|
76
|
+
rubocop (>= 1.7.0, < 2.0)
|
77
|
+
rubocop-ast (>= 0.4.0)
|
78
|
+
rubocop-rake (0.6.0)
|
79
|
+
rubocop (~> 1.0)
|
80
|
+
ruby-progressbar (1.13.0)
|
81
|
+
rubyzip (2.3.2)
|
82
|
+
thor (1.1.0)
|
83
|
+
typhoeus (1.4.0)
|
84
|
+
ethon (>= 0.9.0)
|
85
|
+
tzinfo (2.0.6)
|
86
|
+
concurrent-ruby (~> 1.0)
|
87
|
+
unicode-display_width (2.4.2)
|
88
|
+
yaml (0.2.1)
|
89
|
+
|
90
|
+
PLATFORMS
|
91
|
+
x64-mingw32
|
92
|
+
x86_64-linux
|
93
|
+
|
94
|
+
DEPENDENCIES
|
95
|
+
bundler (~> 2.3)
|
96
|
+
bundler-audit (~> 0.7)
|
97
|
+
byebug (~> 11.1.3)
|
98
|
+
emasser!
|
99
|
+
rake (~> 13.0)
|
100
|
+
rspec (~> 3.10.0)
|
101
|
+
rubocop (~> 1.7)
|
102
|
+
rubocop-minitest (~> 0.10)
|
103
|
+
rubocop-performance (~> 1.11)
|
104
|
+
rubocop-rake (~> 0.5)
|
105
|
+
yaml (~> 0.2.0)
|
106
|
+
|
107
|
+
BUNDLED WITH
|
108
|
+
2.3.22
|
data/LICENSE.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
Licensed under the apache-2.0 license, except as noted below.
|
2
|
-
|
3
|
-
Redistribution and use in source and binary forms, with or without modification,
|
4
|
-
are permitted provided that the following conditions are met:
|
5
|
-
|
6
|
-
* Redistributions of source code must retain the above copyright/ digital rights
|
7
|
-
legend, this list of conditions and the following Notice.
|
8
|
-
|
9
|
-
* Redistributions in binary form must reproduce the above copyright copyright/digital
|
10
|
-
rights legend, this list of conditions and the following Notice in the documentation
|
11
|
-
and/or other materials provided with the distribution.
|
12
|
-
|
13
|
-
* Neither the name of The MITRE Corporation nor the names of its contributors may be
|
14
|
-
used to endorse or promote products derived from this software without specific prior
|
15
|
-
written permission.
|
1
|
+
Licensed under the apache-2.0 license, except as noted below.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without modification,
|
4
|
+
are permitted provided that the following conditions are met:
|
5
|
+
|
6
|
+
* Redistributions of source code must retain the above copyright/ digital rights
|
7
|
+
legend, this list of conditions and the following Notice.
|
8
|
+
|
9
|
+
* Redistributions in binary form must reproduce the above copyright copyright/digital
|
10
|
+
rights legend, this list of conditions and the following Notice in the documentation
|
11
|
+
and/or other materials provided with the distribution.
|
12
|
+
|
13
|
+
* Neither the name of The MITRE Corporation nor the names of its contributors may be
|
14
|
+
used to endorse or promote products derived from this software without specific prior
|
15
|
+
written permission.
|
data/README.md
CHANGED
@@ -1,178 +1,179 @@
|
|
1
|
-
#
|
2
|
-
![GitHub Release Date](https://img.shields.io/github/release-date/mitre/emasser?label=Release%20Date&logo=github&color=blue)
|
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
|
-
|
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)
|
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)
|
9
|
-
|
10
|
-
## About
|
11
|
-
|
12
|
-
`
|
13
|
-
|
14
|
-
***NOTE***: The `
|
15
|
-
|
16
|
-
---
|
17
|
-
## Documentation
|
18
|
-
For detail content information about the `eMASS` API references the [**eMASS API Specification**](https://mitre.github.io/emass_client/docs/redoc/) page.
|
19
|
-
|
20
|
-
For detail features provided by the `
|
21
|
-
|
22
|
-
The `
|
23
|
-
|
24
|
-
---
|
25
|
-
## Installation Options
|
26
|
-
|
27
|
-
`
|
28
|
-
|
29
|
-
### Installation Dependencies
|
30
|
-
* git
|
31
|
-
* Ruby version 2.7 or greater
|
32
|
-
|
33
|
-
### Runtime Dependencies
|
34
|
-
* Ruby version 2.7 or greater
|
35
|
-
* `rubyzip (latest version)`
|
36
|
-
* `emass_client (latest version)`
|
37
|
-
* On Windows the `cURL` binary is required (libcurl.dll). To install cURL:
|
38
|
-
- Download cURL for windows from [curl x.x.x for Windows](https://curl.se/windows/)
|
39
|
-
- Go into the archive and browse to the /bin directory
|
40
|
-
- Locate libcurl_x64.dll (it may be named just libcurl.dll)
|
41
|
-
- Extract the file into the Ruby installation /bin directory
|
42
|
-
- Rename the file to `libcurl.dll` if it has the `_x64` suffix
|
43
|
-
- Install [cURL for windows](https://community.chocolatey.org/packages/curl) and add the installation directory to the PATH.
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
gem
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
|
105
|
-
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
```
|
118
|
-
|
119
|
-
|
120
|
-
```
|
121
|
-
|
122
|
-
|
123
|
-
```
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
*
|
144
|
-
*
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
1
|
+
# eMASSer
|
2
|
+
![GitHub Release Date](https://img.shields.io/github/release-date/mitre/emasser?label=Release%20Date&logo=github&color=blue)
|
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
|
+
|
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)
|
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)
|
9
|
+
|
10
|
+
## About
|
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)](https://mitre.github.io/emass_client/docs/eMASS_API_Documentation.pdf).
|
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.
|
15
|
+
|
16
|
+
---
|
17
|
+
## Documentation
|
18
|
+
For detail content information about the `eMASS` API references the [**eMASS API Specification**](https://mitre.github.io/emass_client/docs/redoc/) page.
|
19
|
+
|
20
|
+
For detail features provided by the `eMASSer` CLI references the [**eMASSer CLI Features**](docs/features.md) page.
|
21
|
+
|
22
|
+
The `eMASSer` CLI [**Architecture**](#emasser-cli-architecture) depicts the structure, and provides an explanation of CLI behaviors.
|
23
|
+
|
24
|
+
---
|
25
|
+
## Installation Options
|
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).
|
28
|
+
|
29
|
+
### Installation Dependencies
|
30
|
+
* git
|
31
|
+
* Ruby version 2.7 or greater
|
32
|
+
|
33
|
+
### Runtime Major Dependencies
|
34
|
+
* Ruby version 2.7 or greater
|
35
|
+
* `rubyzip (latest version)`
|
36
|
+
* `emass_client (latest version)`
|
37
|
+
* On Windows the `cURL` binary is required (libcurl.dll). To install cURL:
|
38
|
+
- Download cURL for windows from [curl x.x.x for Windows](https://curl.se/windows/)
|
39
|
+
- Go into the archive and browse to the /bin directory
|
40
|
+
- Locate libcurl_x64.dll (it may be named just libcurl.dll)
|
41
|
+
- Extract the file into the Ruby installation /bin directory
|
42
|
+
- Rename the file to `libcurl.dll` if it has the `_x64` suffix
|
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
|
45
|
+
|
46
|
+
|
47
|
+
## Install via GitHub
|
48
|
+
- [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the repository
|
49
|
+
```bash
|
50
|
+
git clone <path to emasser repository> emasser
|
51
|
+
cd emasser
|
52
|
+
```
|
53
|
+
- Build the eMASSer gem*
|
54
|
+
```bash
|
55
|
+
gem build *.gemspec
|
56
|
+
gem install *.gem
|
57
|
+
```
|
58
|
+
|
59
|
+
***Note:** To run in development mode there isn't a need to build the gem, simply clone from the emasser repository and use:
|
60
|
+
|
61
|
+
```
|
62
|
+
bundle install
|
63
|
+
|
64
|
+
bundle exec exe/emasser [command]
|
65
|
+
```
|
66
|
+
|
67
|
+
## Install via published RubyGems
|
68
|
+
- Install the `emasser` gem from the [RubyGems](https://rubygems.org/gems/emass_client/versions/) registry
|
69
|
+
```bash
|
70
|
+
gem install emasser
|
71
|
+
```
|
72
|
+
- Update the `emasser` gem to the latest version
|
73
|
+
```bash
|
74
|
+
gem update emasser
|
75
|
+
```
|
76
|
+
|
77
|
+
- To run (execute a command) create a `.env*` file in the directory where you want to invoke the `emmaser` and use:
|
78
|
+
|
79
|
+
```
|
80
|
+
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.
|
83
|
+
|
84
|
+
## Using Docker
|
85
|
+
Ensure that docker engine is running and start the eMASSer Docker Container.
|
86
|
+
### Install
|
87
|
+
- On Linux or Mac:
|
88
|
+
```
|
89
|
+
docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest
|
90
|
+
```
|
91
|
+
- On Windows:
|
92
|
+
```
|
93
|
+
docker run --rm -v %cd%/path-to-secrets:/data mitre/emasser:latest
|
94
|
+
```
|
95
|
+
- Update via Docker
|
96
|
+
```bash
|
97
|
+
docker pull mitre/emasser:latest
|
98
|
+
```
|
99
|
+
|
100
|
+
**Docker Notes:**
|
101
|
+
- Docker Options
|
102
|
+
- `--rm` Automatically remove the container when it exits
|
103
|
+
- `-v` Bind mount a volume
|
104
|
+
- path-to-secrets
|
105
|
+
- Is the path to the `.env` file and the appropriate eMASS certificates (key.pem and client.pem).
|
106
|
+
- For example, if the `.env` is located in the same directory where the `docker run` is executed, running the command in a Windows platform would look like this:
|
107
|
+
|
108
|
+
```
|
109
|
+
docker run --rm -v %cd%/.:/data mitre/emasser:latest
|
110
|
+
```
|
111
|
+
- See [Editing Environment Variables Configuration](https://github.com/mitre/emasser/wiki/Editing-Environment-Variables-Configuration)
|
112
|
+
|
113
|
+
### Run eMASSer API client commands
|
114
|
+
- To list all available GET, POST, PUT, or DELETE commands use:
|
115
|
+
```
|
116
|
+
docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest get help
|
117
|
+
```
|
118
|
+
```
|
119
|
+
docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest post help
|
120
|
+
```
|
121
|
+
```
|
122
|
+
docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest put help
|
123
|
+
```
|
124
|
+
```
|
125
|
+
docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest delete help
|
126
|
+
```
|
127
|
+
Example commands are for Linux or Mac, replace the `$PWD` with `%cd%` for Windows
|
128
|
+
|
129
|
+
### Delete (remove) the Docker Container
|
130
|
+
```
|
131
|
+
docker rmi -f mitre/emasser
|
132
|
+
```
|
133
|
+
---
|
134
|
+
## Roadmap
|
135
|
+
|
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.
|
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.
|
139
|
+
|
140
|
+
For additional capability create an [issue](https://github.com/mitre/emasser/issues), and email it to the [SAF Team](mailto:saf@groups.mitre.org) citing the issue link so we can help.
|
141
|
+
|
142
|
+
Some proposed capabilities (looking for a sponsor) are:
|
143
|
+
* Update a system's record with met/not met NIST 800-53 Security and Privacy controls and/or common control indicators (CCI) based on scan results expressed in [Heimdall Data Format (HDF)](https://saf.mitre.org/#/normalize).
|
144
|
+
* Resolve a particular plan of action and milestone (POA&M) based on scan results or git-ops workflow.
|
145
|
+
* PKCS11 support to run in an attended mode.
|
146
|
+
|
147
|
+
|
148
|
+
## Design
|
149
|
+
|
150
|
+
### Interactions with eMASS API
|
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).
|
152
|
+
|
153
|
+
### Business Logic
|
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.
|
155
|
+
|
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:
|
158
|
+
|
159
|
+
<div align="center">
|
160
|
+
<img src="images/emasser_architecture.jpg" alt="emasser CLI Architecture" title="emasser CLI Architecture">
|
161
|
+
</div>
|
162
|
+
|
163
|
+
### NOTICE
|
164
|
+
|
165
|
+
© 2020 The MITRE Corporation.
|
166
|
+
|
167
|
+
Approved for Public Release; Distribution Unlimited. Case Number 18-3678.
|
168
|
+
|
169
|
+
### NOTICE
|
170
|
+
|
171
|
+
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.
|
172
|
+
|
173
|
+
### NOTICE
|
174
|
+
|
175
|
+
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.
|
176
|
+
|
177
|
+
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.
|
178
|
+
|
179
|
+
For further information, please contact The MITRE Corporation, Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.
|