Skip to content

fix: correct variable syntax and add missing set -e in setup_misp.sh#40

Open
piyush140104 wants to merge 3 commits intoOWASP:masterfrom
piyush140104:fix/setup-misp-variable-syntax
Open

fix: correct variable syntax and add missing set -e in setup_misp.sh#40
piyush140104 wants to merge 3 commits intoOWASP:masterfrom
piyush140104:fix/setup-misp-variable-syntax

Conversation

@piyush140104
Copy link
Copy Markdown

Description

Closes #39

Two fixes in honeytraps/misp/setup_misp.sh:

  1. {$DOCKER_ROOT}${DOCKER_ROOT} , broken brace syntax made the
    DOCKER_ROOT guard never trigger
  2. set -uset -eu, added e flag so failed docker commands
    stop the script instead of silently continuing

Before this fix, the DOCKER_ROOT guard never triggered due to wrong brace syntax {$DOCKER_ROOT}, causing the script to silently run chown and mkdir with broken paths. Additionally, missing set -e meant a failed docker pull would not stop the script it would continue and crash later with a confusing unrelated error. After this fix, any misconfiguration is caught immediately at startup with a clear error message.

@piyush140104
Copy link
Copy Markdown
Author

Hey @adrianwinckles, when you have a moment can you please review this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Broken variable syntax and missing error handling in setup_misp.sh

1 participant