Skip to content

fix(docker): allow spaces in ENROLL_INSTANCE_NAME#4582

Open
sahilnyk wants to merge 1 commit into
crowdsecurity:masterfrom
sahilnyk:fix/docker-enroll-instance-name-spaces
Open

fix(docker): allow spaces in ENROLL_INSTANCE_NAME#4582
sahilnyk wants to merge 1 commit into
crowdsecurity:masterfrom
sahilnyk:fix/docker-enroll-instance-name-spaces

Conversation

@sahilnyk

Copy link
Copy Markdown

Setting ENROLL_INSTANCE_NAME to a value with spaces crashes the container on startup. The entrypoint builds the enroll flags as a string and expands them unquoted, so ENROLL_INSTANCE_NAME="foo bar" word-splits into two args and cscli fails:

Error: cscli console enroll: accepts 1 arg(s), received 2

Since the script runs under set -e, this aborts before crowdsec starts. Fixed by building the flags as an array so the name stays a single argument.

Fixes #4330

Signed-off-by: sahilnyk <contactsahilpnayak@gmail.com>
@github-actions

Copy link
Copy Markdown

@sahilnyk: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions

Copy link
Copy Markdown

@sahilnyk: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@sahilnyk

Copy link
Copy Markdown
Author

/kind bug

@sahilnyk

Copy link
Copy Markdown
Author

/area configuration

@sahilnyk

Copy link
Copy Markdown
Author

/kind fix

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.30%. Comparing base (b59de6f) to head (a438393).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4582      +/-   ##
==========================================
- Coverage   64.31%   64.30%   -0.02%     
==========================================
  Files         499      499              
  Lines       38537    38537              
==========================================
- Hits        24786    24780       -6     
- Misses      11427    11429       +2     
- Partials     2324     2328       +4     
Flag Coverage Δ
bats 41.64% <ø> (-0.04%) ⬇️
unit-linux 40.43% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container does not start with spaces in ENROLL_INSTANCE_NAME

1 participant