From ce2aedfc0c96f56e3dcb37b476fb42127b3ba114 Mon Sep 17 00:00:00 2001 From: seanlongcc Date: Wed, 17 Jul 2024 13:43:44 -0400 Subject: [PATCH] rename inspec_results to mongo_inspec_results --- .github/workflows/main.yml | 4 ++-- README.md | 8 ++++---- mongo-validate.pkr.hcl | 22 +++++++++++----------- variables_template.pkrvar.hcl | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7cb51ba..2a0bfb1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,9 +16,9 @@ jobs: HEIMDALL_API_KEY: ${{ secrets.SAF_HEIMDALL_UPLOAD_KEY }} REPORT_DIR: reports - INSPEC_REPORT_FILENAME: inspec_results.json + INSPEC_REPORT_FILENAME: mongo_inspec_results.json ATTESTATION_FILE: ${{ vars.ATTESTATION_FILE}} - ATTESTED_INSPEC_FILE_NAME: inspec_results.json + ATTESTED_INSPEC_FILE_NAME: mongo_inspec_results.json CA_FILE_BASE64_AA: ${{ secrets.CA_FILE_BASE64_AA }} CA_FILE_BASE64_AB: ${{ secrets.CA_FILE_BASE64_AB }} diff --git a/README.md b/README.md index 81b25fe..17469d2 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,11 @@ mongo_superusers: ## Inspec Report -After running the hardening and validation packer files, a report will be generated in `reports/inspec_results.json`. +After running the hardening and validation packer files, a report will be generated in `reports/mongo_inspec_results.json`. 1. **Upload the Results**: - Upload the `inspec_results.json` file to [Heimdall](https://heimdall-lite.mitre.org/). There should be 19 _Not Reviewed_ controls. These controls need to be attested to. + Upload the `mongo_inspec_results.json` file to [Heimdall](https://heimdall-lite.mitre.org/). There should be 19 _Not Reviewed_ controls. These controls need to be attested to. 2. **Edit the Attestation Template**: @@ -178,7 +178,7 @@ After running the hardening and validation packer files, a report will be genera 6. **Re-upload to Heimdall**: - Upload the new `inspec_results.json` file back into [Heimdall](https://heimdall-lite.mitre.org/) see your compliance level. + Upload the new `mongo_inspec_results.json` file back into [Heimdall](https://heimdall-lite.mitre.org/) see your compliance level. ## Notes @@ -197,7 +197,7 @@ Full repository [here](https://github.com/mitre/mongodb-enterprise-advanced-4-st - Remove the `--controls` flag to run all inspec checks at once. ```sh - inspec exec spec/mongo-inspec-profile/ -t docker://mongo-hardened --controls=SV-252134 --input-file=spec/mongo-inspec-profile/inputs.yml --reporter cli json:reports/inspec_results.json --no-create-lockfile --enhanced-outcomes + inspec exec spec/mongo-inspec-profile/ -t docker://mongo-hardened --controls=SV-252134 --input-file=spec/mongo-inspec-profile/inputs.yml --reporter cli json:reports/mongo_inspec_results.json --no-create-lockfile --enhanced-outcomes ``` - Deeper Testing with InSpec Shell diff --git a/mongo-validate.pkr.hcl b/mongo-validate.pkr.hcl index 74fd1f6..3d0b0d8 100644 --- a/mongo-validate.pkr.hcl +++ b/mongo-validate.pkr.hcl @@ -25,7 +25,7 @@ variable "scan" { default = { "inspec_profile" = "https://github.com/mitre/mongodb-enterprise-advanced-4-stig-baseline.git", "report_dir" = "reports", - "inspec_report_filename" = "inspec_results.json", + "inspec_report_filename" = "mongo_inspec_results.json", "inspec_input_file" = "spec/mongo-inspec-profile/inputs.yml" } } @@ -78,16 +78,16 @@ build { script = "spec/scripts/scan.sh" } - ### ATTEST - provisioner "shell-local" { - environment_vars = [ - "INSPEC_FILE=${var.attestation.inspec_report_filename}", - "REPORT_DIR=${var.attestation.report_dir}", - "ATTESTATION_FILE=${var.attestation.attestation_filename}", - "ATTESTED_FILE=${var.attestation.attested_inspec_filename}" - ] - script = "spec/scripts/attestation.sh" - } + // ### ATTEST + // provisioner "shell-local" { + // environment_vars = [ + // "INSPEC_FILE=${var.attestation.inspec_report_filename}", + // "REPORT_DIR=${var.attestation.report_dir}", + // "ATTESTATION_FILE=${var.attestation.attestation_filename}", + // "ATTESTED_FILE=${var.attestation.attested_inspec_filename}" + // ] + // script = "spec/scripts/attestation.sh" + // } ### REPORT provisioner "shell-local" { diff --git a/variables_template.pkrvar.hcl b/variables_template.pkrvar.hcl index e7ed4a9..9f8128c 100644 --- a/variables_template.pkrvar.hcl +++ b/variables_template.pkrvar.hcl @@ -6,7 +6,7 @@ report = { attestation = { "report_dir" = "reports", - "inspec_report_filename" = "inspec_results.json", + "inspec_report_filename" = "mongo_inspec_results.json", "attestation_filename" = "attestation_template.json" - "attested_inspec_filename" = "inspec_results_attested.json" + "attested_inspec_filename" = "mongo_inspec_results_attested.json" } \ No newline at end of file