Skip to content

Commit

Permalink
rename inspec_results to mongo_inspec_results
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlongcc committed Jul 17, 2024
1 parent d9c3538 commit ce2aedf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**:

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions mongo-validate.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down Expand Up @@ -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" {
Expand Down
4 changes: 2 additions & 2 deletions variables_template.pkrvar.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit ce2aedf

Please sign in to comment.