emasser 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.dockerignore +11 -0
- data/.env-example +10 -0
- data/.github/release-drafter.yml +16 -0
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/draft-release.yml +16 -0
- data/.github/workflows/generate_docs.yml +33 -0
- data/.github/workflows/gh-pages.yml +33 -0
- data/.github/workflows/release.yml +38 -0
- data/.github/workflows/rubocop.yml +23 -0
- data/.github/workflows/test-cli.yml +73 -0
- data/.gitignore +17 -0
- data/.mergify.yml +25 -0
- data/.rubocop.yml +80 -0
- data/.rubocop_todo.yml +27 -0
- data/CHANGELOG.md +16 -0
- data/Dockerfile +10 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +110 -0
- data/LICENSE.md +15 -0
- data/README.md +108 -0
- data/Rakefile +18 -0
- data/TAGS +2393 -0
- data/_config.yml +2 -0
- data/docs/developers.md +115 -0
- data/docs/features.md +1193 -0
- data/docs/redoc/index.html +1231 -0
- data/docs/swagger/dist/favicon-16x16.png +0 -0
- data/docs/swagger/dist/favicon-32x32.png +0 -0
- data/docs/swagger/dist/oauth2-redirect.html +75 -0
- data/docs/swagger/dist/swagger-ui-bundle.js +3 -0
- data/docs/swagger/dist/swagger-ui-bundle.js.map +1 -0
- data/docs/swagger/dist/swagger-ui-es-bundle-core.js +3 -0
- data/docs/swagger/dist/swagger-ui-es-bundle-core.js.map +1 -0
- data/docs/swagger/dist/swagger-ui-es-bundle.js +3 -0
- data/docs/swagger/dist/swagger-ui-es-bundle.js.map +1 -0
- data/docs/swagger/dist/swagger-ui-standalone-preset.js +3 -0
- data/docs/swagger/dist/swagger-ui-standalone-preset.js.map +1 -0
- data/docs/swagger/dist/swagger-ui.css +4 -0
- data/docs/swagger/dist/swagger-ui.css.map +1 -0
- data/docs/swagger/dist/swagger-ui.js +3 -0
- data/docs/swagger/dist/swagger-ui.js.map +1 -0
- data/docs/swagger/index.html +60 -0
- data/emass_client/eMASSRestOpenApi.yaml +5698 -0
- data/emass_client/ruby_client/.gitignore +39 -0
- data/emass_client/ruby_client/.rspec +2 -0
- data/emass_client/ruby_client/.rubocop.yml +154 -0
- data/emass_client/ruby_client/.swagger-codegen/VERSION +1 -0
- data/emass_client/ruby_client/.swagger-codegen-ignore +23 -0
- data/emass_client/ruby_client/Gemfile +9 -0
- data/emass_client/ruby_client/README.md +1284 -0
- data/emass_client/ruby_client/Rakefile +8 -0
- data/emass_client/ruby_client/docs/ArtifactsApi.md +284 -0
- data/emass_client/ruby_client/docs/ArtifactsDelete.md +6 -0
- data/emass_client/ruby_client/docs/ArtifactsDeleteInner.md +7 -0
- data/emass_client/ruby_client/docs/ArtifactsExportApi.md +76 -0
- data/emass_client/ruby_client/docs/ArtifactsGet.md +20 -0
- data/emass_client/ruby_client/docs/ArtifactsRequestPutBody.md +16 -0
- data/emass_client/ruby_client/docs/ArtifactsResponseDel.md +8 -0
- data/emass_client/ruby_client/docs/ArtifactsResponseDelData.md +9 -0
- data/emass_client/ruby_client/docs/ArtifactsResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/ArtifactsResponsePutPost.md +8 -0
- data/emass_client/ruby_client/docs/CACApi.md +140 -0
- data/emass_client/ruby_client/docs/CMMCAssessmentsApi.md +71 -0
- data/emass_client/ruby_client/docs/CacGet.md +13 -0
- data/emass_client/ruby_client/docs/CacRequestPostBody.md +8 -0
- data/emass_client/ruby_client/docs/CacResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/CacResponsePost.md +8 -0
- data/emass_client/ruby_client/docs/CacResponsePostData.md +9 -0
- data/emass_client/ruby_client/docs/CmmcGet.md +19 -0
- data/emass_client/ruby_client/docs/CmmcResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/ConnectivityCcsd.md +8 -0
- data/emass_client/ruby_client/docs/ControlsApi.md +140 -0
- data/emass_client/ruby_client/docs/ControlsGet.md +36 -0
- data/emass_client/ruby_client/docs/ControlsPut.md +9 -0
- data/emass_client/ruby_client/docs/ControlsRequestPutBody.md +29 -0
- data/emass_client/ruby_client/docs/ControlsResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/ControlsResponsePut.md +8 -0
- data/emass_client/ruby_client/docs/DefinitionTransitions.md +9 -0
- data/emass_client/ruby_client/docs/DeleteMilestone.md +7 -0
- data/emass_client/ruby_client/docs/DeletePoam.md +7 -0
- data/emass_client/ruby_client/docs/Empty200Response.md +6 -0
- data/emass_client/ruby_client/docs/Error.md +8 -0
- data/emass_client/ruby_client/docs/InstancesTransitions.md +12 -0
- data/emass_client/ruby_client/docs/MilestoneResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/MilestoneResponsePost.md +8 -0
- data/emass_client/ruby_client/docs/MilestoneResponsePut.md +8 -0
- data/emass_client/ruby_client/docs/MilestonesApi.md +350 -0
- data/emass_client/ruby_client/docs/MilestonesDelete.md +6 -0
- data/emass_client/ruby_client/docs/MilestonesGet.md +12 -0
- data/emass_client/ruby_client/docs/MilestonesPost.md +6 -0
- data/emass_client/ruby_client/docs/MilestonesPut.md +6 -0
- data/emass_client/ruby_client/docs/MilestonesPutPostDelete.md +11 -0
- data/emass_client/ruby_client/docs/MilestonesRequestPostBody.md +9 -0
- data/emass_client/ruby_client/docs/MilestonesRequestPutBody.md +9 -0
- data/emass_client/ruby_client/docs/MilestonesRequiredPost.md +8 -0
- data/emass_client/ruby_client/docs/MilestonesRequiredPut.md +9 -0
- data/emass_client/ruby_client/docs/Model200.md +7 -0
- data/emass_client/ruby_client/docs/Model201.md +7 -0
- data/emass_client/ruby_client/docs/Model201Meta.md +8 -0
- data/emass_client/ruby_client/docs/Model400.md +7 -0
- data/emass_client/ruby_client/docs/Model400Meta.md +8 -0
- data/emass_client/ruby_client/docs/Model400Response.md +7 -0
- data/emass_client/ruby_client/docs/Model401.md +7 -0
- data/emass_client/ruby_client/docs/Model401Meta.md +8 -0
- data/emass_client/ruby_client/docs/Model403.md +7 -0
- data/emass_client/ruby_client/docs/Model403Meta.md +8 -0
- data/emass_client/ruby_client/docs/Model404.md +8 -0
- data/emass_client/ruby_client/docs/Model404Response.md +7 -0
- data/emass_client/ruby_client/docs/Model405.md +7 -0
- data/emass_client/ruby_client/docs/Model405Meta.md +8 -0
- data/emass_client/ruby_client/docs/Model411.md +7 -0
- data/emass_client/ruby_client/docs/Model411Meta.md +8 -0
- data/emass_client/ruby_client/docs/Model490.md +7 -0
- data/emass_client/ruby_client/docs/Model490Meta.md +8 -0
- data/emass_client/ruby_client/docs/Model500.md +7 -0
- data/emass_client/ruby_client/docs/Model500Meta.md +8 -0
- data/emass_client/ruby_client/docs/PACApi.md +137 -0
- data/emass_client/ruby_client/docs/POAMApi.md +346 -0
- data/emass_client/ruby_client/docs/PacGet.md +14 -0
- data/emass_client/ruby_client/docs/PacPost.md +9 -0
- data/emass_client/ruby_client/docs/PacRequestPostBody.md +9 -0
- data/emass_client/ruby_client/docs/PacResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/PacResponsePost.md +8 -0
- data/emass_client/ruby_client/docs/PoamDelete.md +6 -0
- data/emass_client/ruby_client/docs/PoamGet.md +39 -0
- data/emass_client/ruby_client/docs/PoamPost.md +6 -0
- data/emass_client/ruby_client/docs/PoamPostPutDel.md +10 -0
- data/emass_client/ruby_client/docs/PoamPut.md +6 -0
- data/emass_client/ruby_client/docs/PoamRequestPostBody.md +6 -0
- data/emass_client/ruby_client/docs/PoamRequestPutBody.md +6 -0
- data/emass_client/ruby_client/docs/PoamRequiredPost.md +32 -0
- data/emass_client/ruby_client/docs/PoamRequiredPut.md +35 -0
- data/emass_client/ruby_client/docs/PoamResponseDelete.md +8 -0
- data/emass_client/ruby_client/docs/PoamResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/PoamResponsePost.md +8 -0
- data/emass_client/ruby_client/docs/PoamResponsePut.md +8 -0
- data/emass_client/ruby_client/docs/Register.md +8 -0
- data/emass_client/ruby_client/docs/RegisterData.md +7 -0
- data/emass_client/ruby_client/docs/RegisterUserRequestPostBody.md +7 -0
- data/emass_client/ruby_client/docs/RegistrationApi.md +71 -0
- data/emass_client/ruby_client/docs/RoleCategory.md +10 -0
- data/emass_client/ruby_client/docs/Roles.md +9 -0
- data/emass_client/ruby_client/docs/Ssps.md +9 -0
- data/emass_client/ruby_client/docs/Stage.md +8 -0
- data/emass_client/ruby_client/docs/StaticCodeApplication.md +12 -0
- data/emass_client/ruby_client/docs/StaticCodeRequestPostBody.md +6 -0
- data/emass_client/ruby_client/docs/StaticCodeRequiredPost.md +8 -0
- data/emass_client/ruby_client/docs/StaticCodeRequiredPostApplication.md +8 -0
- data/emass_client/ruby_client/docs/StaticCodeScansApi.md +73 -0
- data/emass_client/ruby_client/docs/Success200Response.md +8 -0
- data/emass_client/ruby_client/docs/SystemIdArtifactsBody.md +10 -0
- data/emass_client/ruby_client/docs/SystemResponse.md +8 -0
- data/emass_client/ruby_client/docs/SystemRolesApi.md +137 -0
- data/emass_client/ruby_client/docs/SystemRolesCategoryResponse.md +8 -0
- data/emass_client/ruby_client/docs/SystemRolesResponse.md +8 -0
- data/emass_client/ruby_client/docs/SystemRolesResponseData.md +8 -0
- data/emass_client/ruby_client/docs/Systems.md +70 -0
- data/emass_client/ruby_client/docs/SystemsApi.md +155 -0
- data/emass_client/ruby_client/docs/Test.md +8 -0
- data/emass_client/ruby_client/docs/TestApi.md +66 -0
- data/emass_client/ruby_client/docs/TestData.md +7 -0
- data/emass_client/ruby_client/docs/TestResultsApi.md +144 -0
- data/emass_client/ruby_client/docs/TestResultsGet.md +15 -0
- data/emass_client/ruby_client/docs/TestResultsPost.md +9 -0
- data/emass_client/ruby_client/docs/TestResultsRequestPostBody.md +11 -0
- data/emass_client/ruby_client/docs/TestResultsResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/TestResultsResponsePost.md +8 -0
- data/emass_client/ruby_client/docs/Users.md +9 -0
- data/emass_client/ruby_client/docs/WorkflowDefinitionGet.md +11 -0
- data/emass_client/ruby_client/docs/WorkflowDefinitionResponseGet.md +8 -0
- data/emass_client/ruby_client/docs/WorkflowDefinitionsApi.md +74 -0
- data/emass_client/ruby_client/docs/WorkflowInstancesApi.md +146 -0
- data/emass_client/ruby_client/docs/WorkflowInstancesGet.md +16 -0
- data/emass_client/ruby_client/docs/WorkflowInstancesResponseGet.md +8 -0
- data/emass_client/ruby_client/git_push.sh +55 -0
- data/emass_client/ruby_client/lib/swagger_client/api/artifacts_api.rb +310 -0
- data/emass_client/ruby_client/lib/swagger_client/api/artifacts_export_api.rb +86 -0
- data/emass_client/ruby_client/lib/swagger_client/api/cac_api.rb +143 -0
- data/emass_client/ruby_client/lib/swagger_client/api/cmmc_assessments_api.rb +77 -0
- data/emass_client/ruby_client/lib/swagger_client/api/controls_api.rb +143 -0
- data/emass_client/ruby_client/lib/swagger_client/api/milestones_api.rb +366 -0
- data/emass_client/ruby_client/lib/swagger_client/api/pac_api.rb +140 -0
- data/emass_client/ruby_client/lib/swagger_client/api/poam_api.rb +345 -0
- data/emass_client/ruby_client/lib/swagger_client/api/registration_api.rb +78 -0
- data/emass_client/ruby_client/lib/swagger_client/api/static_code_scans_api.rb +84 -0
- data/emass_client/ruby_client/lib/swagger_client/api/system_roles_api.rb +150 -0
- data/emass_client/ruby_client/lib/swagger_client/api/systems_api.rb +162 -0
- data/emass_client/ruby_client/lib/swagger_client/api/test_api.rb +70 -0
- data/emass_client/ruby_client/lib/swagger_client/api/test_results_api.rb +149 -0
- data/emass_client/ruby_client/lib/swagger_client/api/workflow_definitions_api.rb +76 -0
- data/emass_client/ruby_client/lib/swagger_client/api/workflow_instances_api.rb +153 -0
- data/emass_client/ruby_client/lib/swagger_client/api_client.rb +389 -0
- data/emass_client/ruby_client/lib/swagger_client/api_error.rb +57 -0
- data/emass_client/ruby_client/lib/swagger_client/configuration.rb +224 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_delete.rb +201 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_delete_inner.rb +207 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_get.rb +383 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_request_put_body.rb +363 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_del.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_del_data.rb +225 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_put_post.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/cac_get.rb +301 -0
- data/emass_client/ruby_client/lib/swagger_client/models/cac_request_post_body.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_post.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_post_data.rb +225 -0
- data/emass_client/ruby_client/lib/swagger_client/models/cmmc_get.rb +398 -0
- data/emass_client/ruby_client/lib/swagger_client/models/cmmc_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/connectivity_ccsd.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/controls_get.rb +663 -0
- data/emass_client/ruby_client/lib/swagger_client/models/controls_put.rb +227 -0
- data/emass_client/ruby_client/lib/swagger_client/models/controls_request_put_body.rb +606 -0
- data/emass_client/ruby_client/lib/swagger_client/models/controls_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/controls_response_put.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/definition_transitions.rb +274 -0
- data/emass_client/ruby_client/lib/swagger_client/models/delete_milestone.rb +212 -0
- data/emass_client/ruby_client/lib/swagger_client/models/delete_poam.rb +212 -0
- data/emass_client/ruby_client/lib/swagger_client/models/empty200_response.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/error.rb +225 -0
- data/emass_client/ruby_client/lib/swagger_client/models/instances_transitions.rb +327 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_post.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_put.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_delete.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_get.rb +291 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_post.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_put.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_put_post_delete.rb +247 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_request_post_body.rb +242 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_request_put_body.rb +242 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_required_post.rb +227 -0
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_required_put.rb +242 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_200.rb +208 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_201.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_201_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_400.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_400_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_400_response.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_401.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_401_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_403.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_403_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_404.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_404_response.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_405.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_405_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_411.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_411_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_490.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_490_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_500.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/model_500_meta.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/pac_get.rb +311 -0
- data/emass_client/ruby_client/lib/swagger_client/models/pac_post.rb +259 -0
- data/emass_client/ruby_client/lib/swagger_client/models/pac_request_post_body.rb +261 -0
- data/emass_client/ruby_client/lib/swagger_client/models/pac_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/pac_response_post.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_delete.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_get.rb +646 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_post.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_post_put_del.rb +237 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_put.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_request_post_body.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_request_put_body.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_required_post.rb +564 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_required_put.rb +594 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_delete.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_post.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_put.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/register.rb +215 -0
- data/emass_client/ruby_client/lib/swagger_client/models/register_data.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/register_user_request_post_body.rb +211 -0
- data/emass_client/ruby_client/lib/swagger_client/models/role_category.rb +272 -0
- data/emass_client/ruby_client/lib/swagger_client/models/roles.rb +274 -0
- data/emass_client/ruby_client/lib/swagger_client/models/ssps.rb +227 -0
- data/emass_client/ruby_client/lib/swagger_client/models/stage.rb +252 -0
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_application.rb +303 -0
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_request_post_body.rb +197 -0
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_required_post.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_required_post_application.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/success200_response.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/system_id_artifacts_body.rb +284 -0
- data/emass_client/ruby_client/lib/swagger_client/models/system_response.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_category_response.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_response.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_response_data.rb +219 -0
- data/emass_client/ruby_client/lib/swagger_client/models/systems.rb +1137 -0
- data/emass_client/ruby_client/lib/swagger_client/models/test.rb +215 -0
- data/emass_client/ruby_client/lib/swagger_client/models/test_data.rb +206 -0
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_get.rb +333 -0
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_post.rb +227 -0
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_request_post_body.rb +306 -0
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_response_post.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/users.rb +224 -0
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_definition_get.rb +282 -0
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_definition_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_instances_get.rb +368 -0
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_instances_response_get.rb +217 -0
- data/emass_client/ruby_client/lib/swagger_client/version.rb +14 -0
- data/emass_client/ruby_client/lib/swagger_client.rb +161 -0
- data/emass_client/ruby_client/spec/api/artifacts_api_spec.rb +92 -0
- data/emass_client/ruby_client/spec/api/artifacts_export_api_spec.rb +48 -0
- data/emass_client/ruby_client/spec/api/cac_api_spec.rb +60 -0
- data/emass_client/ruby_client/spec/api/cmmc_assessments_api_spec.rb +46 -0
- data/emass_client/ruby_client/spec/api/controls_api_spec.rb +60 -0
- data/emass_client/ruby_client/spec/api/milestones_api_spec.rb +105 -0
- data/emass_client/ruby_client/spec/api/pac_api_spec.rb +59 -0
- data/emass_client/ruby_client/spec/api/poam_api_spec.rb +103 -0
- data/emass_client/ruby_client/spec/api/registration_api_spec.rb +46 -0
- data/emass_client/ruby_client/spec/api/static_code_scans_api_spec.rb +47 -0
- data/emass_client/ruby_client/spec/api/system_roles_api_spec.rb +60 -0
- data/emass_client/ruby_client/spec/api/systems_api_spec.rb +67 -0
- data/emass_client/ruby_client/spec/api/test_api_spec.rb +45 -0
- data/emass_client/ruby_client/spec/api/test_results_api_spec.rb +62 -0
- data/emass_client/ruby_client/spec/api/workflow_definitions_api_spec.rb +47 -0
- data/emass_client/ruby_client/spec/api/workflow_instances_api_spec.rb +63 -0
- data/emass_client/ruby_client/spec/api_client_spec.rb +225 -0
- data/emass_client/ruby_client/spec/base_object_spec.rb +109 -0
- data/emass_client/ruby_client/spec/configuration_spec.rb +41 -0
- data/emass_client/ruby_client/spec/models/artifacts_delete_inner_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/artifacts_delete_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/artifacts_get_spec.rb +126 -0
- data/emass_client/ruby_client/spec/models/artifacts_request_put_body_spec.rb +102 -0
- data/emass_client/ruby_client/spec/models/artifacts_response_del_data_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/artifacts_response_del_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/artifacts_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/artifacts_response_put_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/cac_get_spec.rb +80 -0
- data/emass_client/ruby_client/spec/models/cac_request_post_body_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/cac_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/cac_response_post_data_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/cac_response_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/cmmc_get_spec.rb +128 -0
- data/emass_client/ruby_client/spec/models/cmmc_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/connectivity_ccsd_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/controls_get_spec.rb +262 -0
- data/emass_client/ruby_client/spec/models/controls_put_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/controls_request_put_body_spec.rb +216 -0
- data/emass_client/ruby_client/spec/models/controls_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/controls_response_put_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/definition_transitions_spec.rb +64 -0
- data/emass_client/ruby_client/spec/models/delete_milestone_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/delete_poam_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/empty200_response_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/error_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/instances_transitions_spec.rb +86 -0
- data/emass_client/ruby_client/spec/models/milestone_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/milestone_response_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/milestone_response_put_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/milestones_delete_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/milestones_get_spec.rb +74 -0
- data/emass_client/ruby_client/spec/models/milestones_post_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/milestones_put_post_delete_spec.rb +64 -0
- data/emass_client/ruby_client/spec/models/milestones_put_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/milestones_request_post_body_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/milestones_request_put_body_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/milestones_required_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/milestones_required_put_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/model_200_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_201_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_201_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_400_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_400_response_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_400_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_401_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_401_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_403_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_403_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_404_response_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_404_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_405_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_405_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_411_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_411_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_490_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_490_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/model_500_meta_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/model_500_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/pac_get_spec.rb +86 -0
- data/emass_client/ruby_client/spec/models/pac_post_spec.rb +56 -0
- data/emass_client/ruby_client/spec/models/pac_request_post_body_spec.rb +56 -0
- data/emass_client/ruby_client/spec/models/pac_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/pac_response_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/poam_delete_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/poam_get_spec.rb +264 -0
- data/emass_client/ruby_client/spec/models/poam_post_put_del_spec.rb +58 -0
- data/emass_client/ruby_client/spec/models/poam_post_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/poam_put_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/poam_request_post_body_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/poam_request_put_body_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/poam_required_post_spec.rb +218 -0
- data/emass_client/ruby_client/spec/models/poam_required_put_spec.rb +236 -0
- data/emass_client/ruby_client/spec/models/poam_response_delete_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/poam_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/poam_response_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/poam_response_put_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/register_data_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/register_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/register_user_request_post_body_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/role_category_spec.rb +62 -0
- data/emass_client/ruby_client/spec/models/roles_spec.rb +60 -0
- data/emass_client/ruby_client/spec/models/ssps_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/stage_spec.rb +50 -0
- data/emass_client/ruby_client/spec/models/static_code_application_spec.rb +78 -0
- data/emass_client/ruby_client/spec/models/static_code_request_post_body_spec.rb +34 -0
- data/emass_client/ruby_client/spec/models/static_code_required_post_application_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/static_code_required_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/success200_response_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/system_id_artifacts_body_spec.rb +66 -0
- data/emass_client/ruby_client/spec/models/system_response_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/system_roles_category_response_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/system_roles_response_data_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/system_roles_response_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/systems_spec.rb +510 -0
- data/emass_client/ruby_client/spec/models/test_data_spec.rb +40 -0
- data/emass_client/ruby_client/spec/models/test_results_get_spec.rb +96 -0
- data/emass_client/ruby_client/spec/models/test_results_post_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/test_results_request_post_body_spec.rb +68 -0
- data/emass_client/ruby_client/spec/models/test_results_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/test_results_response_post_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/test_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/users_spec.rb +52 -0
- data/emass_client/ruby_client/spec/models/workflow_definition_get_spec.rb +68 -0
- data/emass_client/ruby_client/spec/models/workflow_definition_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/models/workflow_instances_get_spec.rb +110 -0
- data/emass_client/ruby_client/spec/models/workflow_instances_response_get_spec.rb +46 -0
- data/emass_client/ruby_client/spec/spec_helper.rb +110 -0
- data/emass_client/ruby_client/swagger_client.gemspec +38 -0
- data/emass_client/swagger-codegen/ruby_template/api_client.mustache +384 -0
- data/emass_client/swagger-codegen/ruby_template/api_info.mustache +12 -0
- data/emass_client/swagger-codegen/ruby_template/configuration.mustache +234 -0
- data/emass_client/swagger-codegen/ruby_template/gemspec.mustache +37 -0
- data/emasser.gemspec +40 -0
- data/exe/emasser +5 -0
- data/lib/emasser/cli.rb +25 -0
- data/lib/emasser/configuration.rb +34 -0
- data/lib/emasser/constants.rb +18 -0
- data/lib/emasser/delete.rb +146 -0
- data/lib/emasser/errors.rb +14 -0
- data/lib/emasser/get.rb +675 -0
- data/lib/emasser/help/approvalCac_post_mapper.md +20 -0
- data/lib/emasser/help/approvalPac_post_mapper.md +20 -0
- data/lib/emasser/help/artifacts_del_mapper.md +9 -0
- data/lib/emasser/help/artifacts_post_mapper.md +59 -0
- data/lib/emasser/help/artifacts_put_mapper.md +34 -0
- data/lib/emasser/help/cmmc_get_mapper.md +4 -0
- data/lib/emasser/help/controls_put_mapper.md +74 -0
- data/lib/emasser/help/milestone_del_mapper.md +11 -0
- data/lib/emasser/help/milestone_post_mapper.md +14 -0
- data/lib/emasser/help/milestone_put_mapper.md +23 -0
- data/lib/emasser/help/poam_del_mapper.md +5 -0
- data/lib/emasser/help/poam_post_mapper.md +93 -0
- data/lib/emasser/help/poam_put_mapper.md +107 -0
- data/lib/emasser/help/staticcode_clear_mapper.md +16 -0
- data/lib/emasser/help/staticcode_post_mapper.md +21 -0
- data/lib/emasser/help/testresults_post_mapper.md +21 -0
- data/lib/emasser/help.rb +11 -0
- data/lib/emasser/input_converters.rb +21 -0
- data/lib/emasser/options_parser.rb +20 -0
- data/lib/emasser/output_converters.rb +14 -0
- data/lib/emasser/post.rb +609 -0
- data/lib/emasser/put.rb +581 -0
- data/lib/emasser/version.rb +5 -0
- data/lib/emasser.rb +19 -0
- metadata +725 -0
data/lib/emasser/put.rb
ADDED
@@ -0,0 +1,581 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Hack class that properly formats the CLI help
|
4
|
+
class SubCommandBase < Thor
|
5
|
+
include OutputConverters
|
6
|
+
|
7
|
+
# We do not control the method declaration for the banner
|
8
|
+
|
9
|
+
# rubocop:disable Style/OptionalBooleanParameter
|
10
|
+
def self.banner(command, _namespace = nil, subcommand = false)
|
11
|
+
# Use the $thor_runner (declared by the Thor CLI framework)
|
12
|
+
# to properly format the help text of sub-sub-commands.
|
13
|
+
|
14
|
+
# rubocop:disable Style/GlobalVars
|
15
|
+
if ancestors[0].to_s.include? '::Put'
|
16
|
+
"#{basename} #{command.formatted_usage(self, $thor_runner, subcommand)}"
|
17
|
+
else
|
18
|
+
"#{basename} put #{command.formatted_usage(self, $thor_runner, subcommand)}"
|
19
|
+
end
|
20
|
+
# rubocop:enable Style/GlobalVars
|
21
|
+
end
|
22
|
+
# rubocop:enable Style/OptionalBooleanParameter
|
23
|
+
end
|
24
|
+
|
25
|
+
# Override thor's long_desc identation behavior
|
26
|
+
class Thor
|
27
|
+
module Shell
|
28
|
+
class Basic
|
29
|
+
def print_wrapped(message, _options = {})
|
30
|
+
message = "\n#{message}\n" unless message[0] == "\n"
|
31
|
+
stdout.puts message
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
module Emasser
|
38
|
+
CONTROLS_PUT_HELP_MESSAGE = "\nInvoke \"bundle exec exe/emasser put controls help update\" for additional help"
|
39
|
+
POAMS_PUT_HELP_MESSAGE = "\nInvoke \"bundle exec exe/emasser put poams help add\" for additional help"
|
40
|
+
# Update Security Control information of a system for both the Implementation Plan and Risk Assessment.
|
41
|
+
#
|
42
|
+
# Endpoint:
|
43
|
+
# /api/systems/{systemId}/controls - Update control information in a system for one or many controls
|
44
|
+
# rubocop:disable Style/WordArray
|
45
|
+
class Controls < SubCommandBase
|
46
|
+
def self.exit_on_failure?
|
47
|
+
true
|
48
|
+
end
|
49
|
+
|
50
|
+
desc 'update', 'Get control information in a system for one or many controls (acronym)'
|
51
|
+
long_desc Help.text(:controls_put_mapper)
|
52
|
+
|
53
|
+
# Required parameters/fields
|
54
|
+
option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification'
|
55
|
+
option :acronym, type: :string, required: true, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
|
56
|
+
option :responsibleEntities, type: :string, required: true,
|
57
|
+
desc: 'Description of the responsible entities for the Security Control'
|
58
|
+
option :controlDesignation, type: :string, required: true,
|
59
|
+
enum: ['Common', 'System-Specific', 'Hybrid'],
|
60
|
+
desc: 'The Security Control Designation'
|
61
|
+
option :estimatedCompletionDate, type: :numeric, required: true, desc: 'Estimated completion date, Unix time format'
|
62
|
+
option :implementationNarrative, type: :string, required: true, desc: 'Security control comments'
|
63
|
+
|
64
|
+
# Conditional parameters/fields
|
65
|
+
option :commonControlProvider,
|
66
|
+
type: :string,
|
67
|
+
required: false,
|
68
|
+
enum: ['DoD', 'Component', 'Enclave'],
|
69
|
+
desc: 'Indicate the type of Common Control Provider for an "Inherited" Security Control'
|
70
|
+
option :naJustification,
|
71
|
+
type: :string, required: false,
|
72
|
+
desc: 'Provide justification for Security Controls deemed Not Applicable to the system'
|
73
|
+
option :slcmCriticality,
|
74
|
+
type: :string, required: false,
|
75
|
+
desc: 'Criticality of Security Control regarding SLCM'
|
76
|
+
option :slcmFrequency,
|
77
|
+
type: :string, required: false,
|
78
|
+
enum: ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually',
|
79
|
+
'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined'],
|
80
|
+
desc: 'The System-Level Continuous Monitoring frequency'
|
81
|
+
option :slcmMethod,
|
82
|
+
type: :string, required: false,
|
83
|
+
enum: ['Automated', 'Semi-Automated', 'Manual', 'Undetermined'],
|
84
|
+
desc: 'The System-Level Continuous Monitoring method'
|
85
|
+
option :slcmReporting,
|
86
|
+
type: :string, required: false,
|
87
|
+
desc: 'The System-Level Continuous Monitoring reporting'
|
88
|
+
option :slcmTracking,
|
89
|
+
type: :string, required: false,
|
90
|
+
desc: 'The System-Level Continuous Monitoring tracking'
|
91
|
+
option :slcmComments,
|
92
|
+
type: :string, required: false,
|
93
|
+
desc: 'Additional comments for Security Control regarding SLCM'
|
94
|
+
|
95
|
+
# Optional parameters/fields
|
96
|
+
option :implementationStatus,
|
97
|
+
type: :string, required: false,
|
98
|
+
enum: ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited'],
|
99
|
+
desc: 'Implementation status of the security control for the information system'
|
100
|
+
option :severity,
|
101
|
+
type: :string, required: false,
|
102
|
+
enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High'],
|
103
|
+
desc: 'The security control severity, required for approved items'
|
104
|
+
option :vulnerabiltySummary, type: :string, required: false, desc: 'The security control vulnerability summary'
|
105
|
+
option :recommendations, type: :string, required: false, desc: 'The security control vulnerability recommendation'
|
106
|
+
option :relevanceOfThreat,
|
107
|
+
type: :string, required: false,
|
108
|
+
enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High'],
|
109
|
+
desc: 'The security control vulnerability of threat'
|
110
|
+
option :likelihood,
|
111
|
+
type: :string, required: false,
|
112
|
+
enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High'],
|
113
|
+
desc: 'The security control likelihood of vulnerability to threats'
|
114
|
+
option :impact,
|
115
|
+
type: :string, required: false,
|
116
|
+
enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High'],
|
117
|
+
desc: 'The security control vulnerability impact'
|
118
|
+
option :impactDescription, type: :string, required: false, desc: 'Description of the security control impact'
|
119
|
+
option :residualRiskLevel,
|
120
|
+
type: :string, required: false,
|
121
|
+
enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High'],
|
122
|
+
desc: 'The security control risk level'
|
123
|
+
option :testMethod,
|
124
|
+
type: :string, required: false,
|
125
|
+
enum: ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine',
|
126
|
+
'Interview, Examine', 'Test, Interview, Examine'],
|
127
|
+
desc: 'Assessment method/combination that determines if the security requirements are implemented correctly'
|
128
|
+
|
129
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
130
|
+
def update
|
131
|
+
# Required fields
|
132
|
+
body = SwaggerClient::ControlsRequestPutBody.new
|
133
|
+
body.acronym = options[:acronym]
|
134
|
+
body.responsible_entities = options[:responsibleEntities]
|
135
|
+
body.control_designation = options[:controlDesignation]
|
136
|
+
body.estimated_completion_date = options[:estimatedCompletionDate]
|
137
|
+
body.implementation_narrative = options[:implementationNarrative]
|
138
|
+
|
139
|
+
process_business_logic(body)
|
140
|
+
|
141
|
+
# Add optional fields
|
142
|
+
body.severity = options[:severity] if options[:severity]
|
143
|
+
body.vulnerabilty_summary = options[:vulnerabiltySummary] if options[:vulnerabiltySummary]
|
144
|
+
body.recommendations = options[:recommendations] if options[:recommendations]
|
145
|
+
body.relevance_of_threat = options[:relevanceOfThreat] if options[:relevanceOfThreat]
|
146
|
+
body.likelihood = options[:likelihood] if options[:likelihood]
|
147
|
+
body.impact = options[:impact] if options[:impact]
|
148
|
+
body.impact_description = options[:impactDescription] if options[:impactDescription]
|
149
|
+
body.residual_risk_level = options[:residualRiskLevel] if options[:residualRiskLevel]
|
150
|
+
|
151
|
+
body_array = Array.new(1, body)
|
152
|
+
|
153
|
+
begin
|
154
|
+
result = SwaggerClient::ControlsApi.new.update_control_by_system_id(body_array, options[:systemId])
|
155
|
+
puts to_output_hash(result).green
|
156
|
+
rescue SwaggerClient::ApiError => e
|
157
|
+
puts 'Exception when calling ControlsApi->update_control_by_system_id'.red
|
158
|
+
puts to_output_hash(e)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
162
|
+
|
163
|
+
# rubocop:disable Style/CaseLikeIf, Style/StringLiterals, Metrics/BlockLength, Metrics/CyclomaticComplexity
|
164
|
+
no_commands do
|
165
|
+
# rubocop:disable Metrics/PerceivedComplexity, Style/GuardClause
|
166
|
+
def process_business_logic(body)
|
167
|
+
# Conditional fields based on implementationStatus content
|
168
|
+
# unless executes code if conditional is false
|
169
|
+
unless options[:implementationStatus].nil?
|
170
|
+
body.implementation_status = options[:implementationStatus]
|
171
|
+
|
172
|
+
if options[:implementationStatus] == "Planned" || options[:implementationStatus] == "Implemented"
|
173
|
+
if options[:responsibleEntities].nil? || options[:slcmCriticality].nil? ||
|
174
|
+
options[:slcmFrequency].nil? || options[:slcmMethod].nil? ||
|
175
|
+
options[:slcmReporting].nil? || options[:slcmTracking].nil? || options[:slcmComments].nil?
|
176
|
+
puts 'Missing one of these parameters/fields:'.red
|
177
|
+
puts ' responsibleEntities, slcmCriticality, slcmFrequency,'.red
|
178
|
+
puts ' slcmMethod,slcmReporting, slcmTracking, slcmComments'.red
|
179
|
+
puts CONTROLS_PUT_HELP_MESSAGE.yellow
|
180
|
+
exit
|
181
|
+
else
|
182
|
+
body.responsible_entities = options[:responsibleEntities]
|
183
|
+
body.slcm_criticality = options[:slcmCriticality]
|
184
|
+
body.slcm_frequency = options[:slcmFrequency]
|
185
|
+
body.slcm_method = options[:slcmMethod]
|
186
|
+
body.slcm_reporting = options[:slcmReporting]
|
187
|
+
body.slcm_tracking = options[:slcmTracking]
|
188
|
+
body.slcm_comments = options[:slcmComments]
|
189
|
+
end
|
190
|
+
elsif options[:implementationStatus] == 'Not Applicable'
|
191
|
+
if options[:naJustification].nil? || options[:responsibleEntities].nil?
|
192
|
+
puts 'Missing one of these parameters/fields:'.red
|
193
|
+
puts ' naJustification, responsibleEntities'.red
|
194
|
+
puts CONTROLS_PUT_HELP_MESSAGE.yellow
|
195
|
+
exit
|
196
|
+
else
|
197
|
+
body.slcm_reporting = options[:naJustification]
|
198
|
+
body.responsible_entities = options[:responsibleEntities]
|
199
|
+
end
|
200
|
+
elsif options[:implementationStatus] == 'Manually Inherited'
|
201
|
+
if options[:commonControlProvider].nil? || options[:responsibleEntities].nil? ||
|
202
|
+
options[:slcmCriticality].nil? || options[:slcmFrequency].nil? || options[:slcmMethod].nil? ||
|
203
|
+
options[:slcmReporting].nil? || options[:slcmTracking].nil? || options[:slcmComments].nil?
|
204
|
+
puts 'Missing one of these parameters/fields:'.red
|
205
|
+
puts ' commonControlProvider, responsibleEntities, slcmCriticality,'.red
|
206
|
+
puts ' slcmFrequency, slcmMethod, slcmReporting, slcmTracking, slcmComments'.red
|
207
|
+
puts CONTROLS_PUT_HELP_MESSAGE.yellow
|
208
|
+
exit
|
209
|
+
else
|
210
|
+
body.common_control_provider = options[:commonControlProvider]
|
211
|
+
body.responsible_entities = options[:responsibleEntities]
|
212
|
+
body.slcm_criticality = options[:slcmCriticality]
|
213
|
+
body.slcm_frequency = options[:slcmFrequency]
|
214
|
+
body.slcm_method = options[:slcmMethod]
|
215
|
+
body.slcm_reporting = options[:slcmReporting]
|
216
|
+
body.slcm_tracking = options[:slcmTracking]
|
217
|
+
body.slcm_comments = options[:slcmComments]
|
218
|
+
end
|
219
|
+
elsif options[:implementationStatus] == 'Inherited'
|
220
|
+
if options[:commonControlProvider].nil?
|
221
|
+
puts 'When implementationStatus value is "Inherited" only the following fields are updated:'.red
|
222
|
+
puts ' controlDesignation and commonControlProvider'.red
|
223
|
+
puts 'Missing the commonControlProvider field'.red
|
224
|
+
puts CONTROLS_PUT_HELP_MESSAGE.yellow
|
225
|
+
exit
|
226
|
+
else
|
227
|
+
body.common_control_provider = options[:commonControlProvider]
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
232
|
+
# rubocop:enable Metrics/PerceivedComplexity, Style/GuardClause
|
233
|
+
end
|
234
|
+
# rubocop:enable Style/CaseLikeIf, Style/StringLiterals, Metrics/BlockLength, Metrics/CyclomaticComplexity
|
235
|
+
end
|
236
|
+
# rubocop:enable Style/WordArray
|
237
|
+
|
238
|
+
# Update Plan of Action (POA&M) items to a system.
|
239
|
+
#
|
240
|
+
# Endpoint:
|
241
|
+
# /api/systems/{systemId}/poams - Update one or many poa&m items in a system
|
242
|
+
class Poams < SubCommandBase
|
243
|
+
def self.exit_on_failure?
|
244
|
+
true
|
245
|
+
end
|
246
|
+
|
247
|
+
# Update a POAM -----------------------------------------------------------
|
248
|
+
#
|
249
|
+
# The following fields are required based on the contents of the status field
|
250
|
+
# status Required Fields
|
251
|
+
# -------------------------------------------------------------------------
|
252
|
+
# Risk Accepted comments, resources
|
253
|
+
# Ongoing scheduledCompletionDate, resources, milestones (at least 1)
|
254
|
+
# Completed scheduledCompletionDate, comments, resources,
|
255
|
+
# completionDate, milestones (at least 1)
|
256
|
+
# Not Applicable POAM can not be created
|
257
|
+
#--------------------------------------------------------------------------
|
258
|
+
#
|
259
|
+
# If a POC email is supplied, the application will attempt to locate a user
|
260
|
+
# already registered within the application and pre-populate any information
|
261
|
+
# not explicitly supplied in the request. If no such user is found, these
|
262
|
+
# fields are required within the request.
|
263
|
+
# pocOrganization, pocFirstName, pocLastName, pocEmail, pocPhoneNumber
|
264
|
+
|
265
|
+
desc 'update', 'Update one or many POA&M items in a system'
|
266
|
+
long_desc Help.text(:poam_put_mapper)
|
267
|
+
|
268
|
+
# Required parameters/fields
|
269
|
+
option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification'
|
270
|
+
option :poamId, type: :numeric, required: true, desc: 'A numeric value representing the poam identification'
|
271
|
+
option :displayPoamId,
|
272
|
+
type: :numeric, required: true,
|
273
|
+
desc: 'Globally unique identifier for individual POA&M Items, seen on the front-end as "ID"'
|
274
|
+
option :status, type: :string, required: true, enum: ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']
|
275
|
+
option :vulnerabilityDescription, type: :string, required: true, desc: 'POA&M vulnerability description'
|
276
|
+
option :sourceIdentVuln,
|
277
|
+
type: :string, required: true, desc: 'Source that identifies the vulnerability'
|
278
|
+
option :pocOrganization, type: :string, required: true, desc: 'Organization/Office represented'
|
279
|
+
option :resources, type: :string, required: true, desc: 'List of resources used'
|
280
|
+
|
281
|
+
# Conditional parameters/fields
|
282
|
+
option :milestone,
|
283
|
+
type: :hash, required: false, desc: 'key:values are: milestoneId, description and scheduledCompletionDate'
|
284
|
+
option :pocFirstName, type: :string, required: false, desc: 'First name of POC'
|
285
|
+
option :pocLastName, type: :string, required: false, desc: 'Last name of POC.'
|
286
|
+
option :pocEmail, type: :string, required: false, desc: 'Email address of POC'
|
287
|
+
option :pocPhoneNumber, type: :string, required: false, desc: 'Phone number of POC (area code) ***-**** format'
|
288
|
+
option :severity, type: :string, required: false, enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High']
|
289
|
+
option :scheduledCompletionDate,
|
290
|
+
type: :numeric, required: false, desc: 'The scheduled completion date - Unix time format'
|
291
|
+
option :completionDate,
|
292
|
+
type: :numeric, required: false, desc: 'The schedule completion date - Unix time format'
|
293
|
+
option :comments, type: :string, required: false, desc: 'Comments for completed and risk accepted POA&M items'
|
294
|
+
option :isActive, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
295
|
+
|
296
|
+
# Optional parameters/fields
|
297
|
+
option :externalUid, type: :string, required: false, desc: 'External ID associated with the POA&M'
|
298
|
+
option :controlAcronym, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"'
|
299
|
+
option :cci, type: :string, required: false, desc: 'The system CCIS string numerical value'
|
300
|
+
option :securityChecks, type: :string, required: false, desc: 'Security Checks that are associated with the POA&M'
|
301
|
+
option :rawSeverity, type: :string, required: false, enum: %w[I II III]
|
302
|
+
option :relevanceOfThreat,
|
303
|
+
type: :string, required: false, enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High']
|
304
|
+
option :likelihood, type: :string, required: false, enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High']
|
305
|
+
option :impact, type: :string, required: false, desc: 'Description of Security Control’s impact'
|
306
|
+
option :impactDescription, type: :string, required: false, desc: 'Description of the security control impact'
|
307
|
+
option :residualRiskLevel,
|
308
|
+
type: :string, required: false, enum: ['Very Low', 'Low', 'Moderate', 'High', 'Very High']
|
309
|
+
option :recommendations, type: :string, required: false, desc: 'Recomendations'
|
310
|
+
option :mitigation, type: :string, required: false, desc: 'Mitigation explanation'
|
311
|
+
|
312
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
313
|
+
def update
|
314
|
+
# Required fields
|
315
|
+
body = SwaggerClient::PoamRequiredPut.new
|
316
|
+
body.poam_id = options[:poamId]
|
317
|
+
body.status = options[:status]
|
318
|
+
body.vulnerability_description = options[:vulnerabilityDescription]
|
319
|
+
body.source_ident_vuln = options[:sourceIdentVuln]
|
320
|
+
body.poc_organization = options[:pocOrganization]
|
321
|
+
|
322
|
+
process_business_logic(body)
|
323
|
+
|
324
|
+
# Add conditional fields
|
325
|
+
body.poc_first_name = options[:pocFirstName] if options[:pocFirstName]
|
326
|
+
body.poc_last_name = options[:pocLastName] if options[:pocLastName]
|
327
|
+
body.poc_email = options[:pocEmail] if options[:pocEmail]
|
328
|
+
body.poc_phone_number = options[:pocPhoneNumber] if options[:pocPhoneNumber]
|
329
|
+
body.severity = options[:severity] if options[:severity]
|
330
|
+
|
331
|
+
# Add optional fields
|
332
|
+
body.external_uid = options[:externalUid] if options[:externalUid]
|
333
|
+
body.control_acronym = options[:controlAcronym] if options[:controlAcronym]
|
334
|
+
body.cci = options[:cci] if options[:cci]
|
335
|
+
body.security_checks = options[:securityChecks] if options[:securityChecks]
|
336
|
+
body.raw_severity = options[:rawSeverity] if options[:rawSeverity]
|
337
|
+
body.relevance_of_threat = options[:relevanceOfThreat] if options[:relevanceOfThreat]
|
338
|
+
body.likelihood = options[:likelihood] if options[:likelihood]
|
339
|
+
body.impact = options[:impact] if options[:impact]
|
340
|
+
body.impact_description = options[:impactDescription] if options[:impactDescription]
|
341
|
+
body.residual_risk_level = options[:residualRiskLevel] if options[:residualRiskLevel]
|
342
|
+
body.recommendations = options[:recommendations] if options[:recommendations]
|
343
|
+
body.mitigation = options[:mitigation] if options[:mitigation]
|
344
|
+
|
345
|
+
body_array = Array.new(1, body)
|
346
|
+
|
347
|
+
begin
|
348
|
+
result = SwaggerClient::POAMApi.new.update_poam_by_system_id(body_array, options[:systemId])
|
349
|
+
puts to_output_hash(result).green
|
350
|
+
rescue SwaggerClient::ApiError => e
|
351
|
+
puts 'Exception when calling POAMApi->update_poam_by_system_id'.red
|
352
|
+
puts to_output_hash(e)
|
353
|
+
end
|
354
|
+
end
|
355
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
356
|
+
|
357
|
+
# rubocop:disable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
358
|
+
no_commands do
|
359
|
+
def process_business_logic(body)
|
360
|
+
#-----------------------------------------------------------------------------
|
361
|
+
# Conditional fields based on the status field values
|
362
|
+
# "Risk Accepted" comments, resources
|
363
|
+
# "Ongoing" scheduledCompletionDate, resources, milestones (at least 1)
|
364
|
+
# "Completed" scheduledCompletionDate, comments, resources,
|
365
|
+
# completionDate, milestones (at least 1)
|
366
|
+
# "Not Applicable" POAM can not be created
|
367
|
+
#-----------------------------------------------------------------------------
|
368
|
+
# rubocop:disable Style/CaseLikeIf, Style/StringLiterals
|
369
|
+
if options[:status] == "Risk Accepted"
|
370
|
+
if options[:comments].nil?
|
371
|
+
puts 'When status = "Risk Accepted" the following parameters/fields are required:'.red
|
372
|
+
puts ' comments'.red
|
373
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
374
|
+
exit
|
375
|
+
else
|
376
|
+
body.comments = options[:comments]
|
377
|
+
end
|
378
|
+
elsif options[:status] == "Ongoing"
|
379
|
+
if options[:scheduledCompletionDate].nil? || options[:milestone].nil?
|
380
|
+
puts 'When status = "Ongoing" the following parameters/fields are required:'.red
|
381
|
+
puts ' scheduledCompletionDate, or milestone'.red
|
382
|
+
print_milestone_help
|
383
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
384
|
+
exit
|
385
|
+
elsif options[:milestone]["description"].nil? || options[:milestone]["scheduledCompletionDate"].nil?
|
386
|
+
puts 'Missing milstone parameters/fields'.red
|
387
|
+
print_milestone_help
|
388
|
+
exit
|
389
|
+
else
|
390
|
+
body.scheduled_completion_date = options[:scheduledCompletionDate]
|
391
|
+
|
392
|
+
milestone = SwaggerClient::MilestonesRequiredPut.new
|
393
|
+
milestone.milestone_id = options[:milestone]["milestoneId"] if options[:milestone]["milestoneId"]
|
394
|
+
milestone.description = options[:milestone]["description"]
|
395
|
+
milestone.scheduled_completion_date = options[:milestone]["scheduledCompletionDate"]
|
396
|
+
milestone_array = Array.new(1, milestone)
|
397
|
+
body.milestones = milestone_array
|
398
|
+
end
|
399
|
+
elsif options[:status] == "Completed"
|
400
|
+
if options[:scheduledCompletionDate].nil? || options[:comments].nil? ||
|
401
|
+
options[:completionDate].nil? || options[:milestone].nil?
|
402
|
+
puts 'Missing one of these parameters/fields:'.red
|
403
|
+
puts ' scheduledCompletionDate, comments, completionDate, or milestone'.red
|
404
|
+
print_milestone_help
|
405
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
406
|
+
exit
|
407
|
+
else
|
408
|
+
body.scheduled_completion_date = options[:scheduledCompletionDate]
|
409
|
+
body.comments = options[:comments]
|
410
|
+
body.completion_date = options[:completionDate]
|
411
|
+
|
412
|
+
milestone = SwaggerClient::MilestonesRequiredPut.new
|
413
|
+
milestone.milestone_id = options[:milestone]["milestoneId"] if options[:milestone]["milestoneId"]
|
414
|
+
milestone.description = options[:milestone]["description"]
|
415
|
+
milestone.scheduled_completion_date = options[:milestone]["scheduledCompletionDate"]
|
416
|
+
milestone_array = Array.new(1, milestone)
|
417
|
+
body.milestones = milestone_array
|
418
|
+
end
|
419
|
+
end
|
420
|
+
|
421
|
+
# POC checks: If any poc information is provided all POC fields are required
|
422
|
+
if options[:pocFirstName]
|
423
|
+
if options[:pocLastName].nil? || options[:pocEmail].nil? || options[:pocPhoneNumber].nil?
|
424
|
+
puts 'If a POC first name is given, then all POC information must be entered:'.red
|
425
|
+
puts ' pocLastName, pocEmail, pocPhoneNumber'.red
|
426
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
427
|
+
exit
|
428
|
+
end
|
429
|
+
elsif options[:pocLastName]
|
430
|
+
if options[:pocFirstName].nil? || options[:pocEmail].nil? || options[:pocPhoneNumber].nil?
|
431
|
+
puts 'If a POC last name is given, then all POC information must be entered:'.red
|
432
|
+
puts ' pocFirstName, pocEmail, pocPhoneNumber'.red
|
433
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
434
|
+
exit
|
435
|
+
end
|
436
|
+
elsif options[:pocEmail]
|
437
|
+
if options[:pocFirstName].nil? || options[:pocLastName].nil? || options[:pocPhoneNumber].nil?
|
438
|
+
puts 'If a POC email is given, then all POC information must be entered:'.red
|
439
|
+
puts ' pocFirstName, pocLastName, pocPhoneNumber'.red
|
440
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
441
|
+
exit
|
442
|
+
end
|
443
|
+
elsif options[:pocPhoneNumber]
|
444
|
+
if options[:pocFirstName].nil? || options[:pocLastName].nil? || options[:pocEmail].nil?
|
445
|
+
puts 'If a POC phone number is given, then all POC information must be entered:'.red
|
446
|
+
puts ' pocFirstName, pocLastName, pocEmail'.red
|
447
|
+
puts POAMS_PUT_HELP_MESSAGE.yellow
|
448
|
+
exit
|
449
|
+
end
|
450
|
+
end
|
451
|
+
# rubocop:enable Style/CaseLikeIf, Style/StringLiterals
|
452
|
+
end
|
453
|
+
|
454
|
+
def print_milestone_help
|
455
|
+
puts 'Milestone format is:'.yellow
|
456
|
+
puts ' --milestone milestoneId:[value] description:"[value]" scheduledCompletionDate:"[value]"'.yellow
|
457
|
+
puts 'The milestoneId:[value] is optional, if not provided a new milestone is created'.yellow
|
458
|
+
end
|
459
|
+
end
|
460
|
+
# rubocop:enable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
461
|
+
end
|
462
|
+
|
463
|
+
# Update Milestones items to a system.
|
464
|
+
#
|
465
|
+
# Endpoint:
|
466
|
+
# /api/systems/{systemId}/poams/{poamId}/milestones - Update milestones in one or many poa&m items in a system
|
467
|
+
class Milestones < SubCommandBase
|
468
|
+
def self.exit_on_failure?
|
469
|
+
true
|
470
|
+
end
|
471
|
+
|
472
|
+
desc 'update', 'Update milestone(s) for given specified system and poam'
|
473
|
+
long_desc Help.text(:milestone_put_mapper)
|
474
|
+
|
475
|
+
# Required parameters/fields
|
476
|
+
option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification'
|
477
|
+
option :poamId, type: :numeric, required: true, desc: 'A numeric value representing the poam identification'
|
478
|
+
option :milestoneId,
|
479
|
+
type: :numeric, required: true, desc: 'A numeric value representing the milestone identification'
|
480
|
+
option :description, type: :string, required: true, desc: 'The milestone description'
|
481
|
+
option :scheduledCompletionDate,
|
482
|
+
type: :numeric, required: false, desc: 'The scheduled completion date - Unix time format'
|
483
|
+
|
484
|
+
def update
|
485
|
+
body = SwaggerClient::MilestonesRequestPutBody.new
|
486
|
+
body.milestone_id = options[:milestoneId]
|
487
|
+
body.description = options[:description]
|
488
|
+
body.scheduled_completion_date = options[:scheduledCompletionDate]
|
489
|
+
body_array = Array.new(1, body)
|
490
|
+
|
491
|
+
begin
|
492
|
+
# Get milestones in one or many poa&m items in a system
|
493
|
+
result = SwaggerClient::POAMApi
|
494
|
+
.new
|
495
|
+
.update_milestone_by_system_id_and_poam_id(body_array, options[:systemId], options[:poamId])
|
496
|
+
puts to_output_hash(result).green
|
497
|
+
rescue SwaggerClient::ApiError => e
|
498
|
+
puts 'Exception when calling POAMApi->update_milestone_by_system_id_and_poam_id'.red
|
499
|
+
puts to_output_hash(e)
|
500
|
+
end
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
# Update one or many artifacts for a system (this implementation only updates one artifact per each execution)
|
505
|
+
#
|
506
|
+
# Endpoint:
|
507
|
+
# /api/systems/{systemId}/artifacts - Put (update) one or many artifacts for a system
|
508
|
+
class Artifacts < SubCommandBase
|
509
|
+
def self.exit_on_failure?
|
510
|
+
true
|
511
|
+
end
|
512
|
+
|
513
|
+
desc 'update', 'Updates artifacts for a system with provided entries'
|
514
|
+
long_desc Help.text(:artifacts_put_mapper)
|
515
|
+
|
516
|
+
# Required parameters/fields
|
517
|
+
option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification'
|
518
|
+
option :filename, type: :string, required: true, desc: 'Artifact file name to be updated'
|
519
|
+
option :type,
|
520
|
+
type: :string, required: true,
|
521
|
+
enum: ['Procedure', 'Diagram', 'Policy', 'Labor', 'Document',
|
522
|
+
'Image', 'Other', 'Scan Result', 'Auditor Report']
|
523
|
+
option :category, type: :string, required: true, enum: ['Implementation Guidance', 'Evidence']
|
524
|
+
option :isTemplate, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.'
|
525
|
+
# NOTE: compress is a required parameter, however Thor does not allow a boolean type to be required because it
|
526
|
+
# automatically creates a --no-isTemplate option for isTemplate=false
|
527
|
+
|
528
|
+
# Optional fields
|
529
|
+
option :description, type: :string, required: false, desc: 'Artifact description'
|
530
|
+
option :refPageNumber, type: :string, required: false, desc: 'Artifact reference page number'
|
531
|
+
option :ccis, type: :string, required: false, desc: 'The system CCIs string numerical value'
|
532
|
+
option :controls,
|
533
|
+
type: :string, required: false,
|
534
|
+
desc: 'Control acronym associated with the artifact. NIST SP 800-53 Revision 4 defined'
|
535
|
+
option :artifactExpirationDate,
|
536
|
+
type: :numeric, required: false, desc: 'Date Artifact expires and requires review - Unix time format'
|
537
|
+
option :lastReviewedDate,
|
538
|
+
type: :numeric, required: false, desc: 'Date Artifact was last reviewed - Unix time format'
|
539
|
+
|
540
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
541
|
+
def update
|
542
|
+
body = SwaggerClient::ArtifactsRequestPutBody.new
|
543
|
+
body.filename = options[:filename]
|
544
|
+
body.type = options[:type]
|
545
|
+
body.category = options[:category]
|
546
|
+
body.is_template = options[:isTemplate]
|
547
|
+
# Optional fields
|
548
|
+
body.description = options[:description] if options[:description]
|
549
|
+
body.ref_page_number = options[:refPageNumber] if options[:refPageNumber]
|
550
|
+
body.ccis = options[:ccis] if options[:ccis]
|
551
|
+
body.controls = options[:controls] if options[:controls]
|
552
|
+
body.artifact_expiration_date = options[:artifactExpirationDate] if options[:artifactExpirationDate]
|
553
|
+
body.last_reviewed_date = options[:lastReviewedDate] if options[:lastReviewedDate]
|
554
|
+
|
555
|
+
body_array = Array.new(1, body)
|
556
|
+
|
557
|
+
begin
|
558
|
+
result = SwaggerClient::ArtifactsApi.new.update_artifact_by_system_id(body_array, options[:systemId])
|
559
|
+
puts to_output_hash(result).green
|
560
|
+
rescue SwaggerClient::ApiError => e
|
561
|
+
puts 'Exception when calling ArtifactsApi->update_artifact_by_system_id'.red
|
562
|
+
puts to_output_hash(e)
|
563
|
+
end
|
564
|
+
end
|
565
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
566
|
+
end
|
567
|
+
|
568
|
+
class Put < SubCommandBase
|
569
|
+
desc 'controls', 'Update system Controls'
|
570
|
+
subcommand 'controls', Controls
|
571
|
+
|
572
|
+
desc 'poams', 'Update Plan of Action (POA&M) items for a system'
|
573
|
+
subcommand 'poams', Poams
|
574
|
+
|
575
|
+
desc 'milestones', 'Update Milestones items for a system'
|
576
|
+
subcommand 'milestones', Milestones
|
577
|
+
|
578
|
+
desc 'artifacts', 'Put system Artifacts'
|
579
|
+
subcommand 'artifacts', Artifacts
|
580
|
+
end
|
581
|
+
end
|
data/lib/emasser.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require 'zip'
|
5
|
+
require 'colorize'
|
6
|
+
require 'swagger_client'
|
7
|
+
require 'emasser/constants'
|
8
|
+
require 'emasser/configuration'
|
9
|
+
require 'emasser/version'
|
10
|
+
require 'emasser/errors'
|
11
|
+
require 'emasser/options_parser'
|
12
|
+
require 'emasser/output_converters'
|
13
|
+
require 'emasser/input_converters'
|
14
|
+
require 'emasser/help'
|
15
|
+
require 'emasser/cli'
|
16
|
+
|
17
|
+
module Emasser
|
18
|
+
Emasser::CLI.start(ARGV)
|
19
|
+
end
|