Skip to content

Commit

Permalink
update read me and added pkr template
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlongcc committed Jun 21, 2024
1 parent 6426adc commit bddc8d6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
reports/**
inputs.yml
inspec.lock
variables.pkrvar.hcl
*.zip
*.pem
*.csr
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ mongo_superusers:

Update the `variables.pkrvar.hcl` with your variables for `mongo-validate.pkr.hcl`

Execute the following command to create the `variables.pkrvar.hcl` file by copying `variables_template.pkrvar.hcl` and renaming it to `variables.pkrvar.hcl`.
Update this file with your values.

```sh
cp variables_template.pkrvar.hcl variables.pkrvar.hcl
```

9. **Build the Hardened Image**

Execute the following command to build and save the hardened Mongo image:
Expand Down
20 changes: 10 additions & 10 deletions mongo-validate.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ build {
script = "spec/scripts/scan.sh"
}

// ### REPORT
// provisioner "shell-local" {
// environment_vars = [
// "REPORT_DIR=${var.scan.report_dir}",
// "REPORT_TO_HEIMDALL=${var.report.report_to_heimdall}",
// "HEIMDALL_URL=${var.report.heimdall_url}",
// "HEIMDALL_API_KEY=${var.report.heimdall_api_key}"
// ]
// scripts = ["spec/scripts/report.sh"]
// }
### REPORT
provisioner "shell-local" {
environment_vars = [
"REPORT_DIR=${var.scan.report_dir}",
"REPORT_TO_HEIMDALL=${var.report.report_to_heimdall}",
"HEIMDALL_URL=${var.report.heimdall_url}",
"HEIMDALL_API_KEY=${var.report.heimdall_api_key}"
]
scripts = ["spec/scripts/report.sh"]
}

// ### VERIFY
// provisioner "shell-local" {
Expand Down
Empty file added saf-cli.log
Empty file.
2 changes: 1 addition & 1 deletion variables.pkrvar.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
report = {
"report_to_heimdall" = true
"heimdall_url" = "https://heimdall-demo.mitre.org/evaluations"
"heimdall_api_key" = "your_actual_api_key_here"
"heimdall_api_key" = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlJZCI6IjkzIiwiY3JlYXRlZEF0IjoiMjAyNC0wNi0yMVQxNzowODo0MS45MTRaIiwiaWF0IjoxNzE4OTg5NzIxfQ.YVTnQ0P2TwHJhOdkjJHyWxKhuooyCNkfb9F8-JzqorY"
}
5 changes: 5 additions & 0 deletions variables_template.pkrvar.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
report = {
"report_to_heimdall" = true
"heimdall_url" = "https://heimdall-demo.mitre.org/evaluations"
"heimdall_api_key" = "your_actual_api_key_here"
}

0 comments on commit bddc8d6

Please sign in to comment.