Repository navigation
Prevent shell injection in ConfigMap-derived environment settings - #1790
Merged
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Remove the outdated Windows Telegraf update comment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
zanejohnson-azure
approved these changes
Sep 29, 2026
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. |
Mike Thompson (mthompson83)
pushed a commit
that referenced
this pull request
Oct 1, 2026
) * fix: quote ConfigMap-derived environment assignments * Upgrade Linux Telegraf to 1.40.1 Remove the outdated Windows Telegraf update comment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert misplaced Telegraf update The Telegraf 1.40.1 bump and Windows note removal belong to PR #1764, not this ConfigMap shell-quoting PR. Reverts commit 44237c6. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Grace Wehner (gracewehner)
pushed a commit
that referenced
this pull request
Oct 6, 2026
Follows #1790, which quoted the values written by tomlparser.rb. The same unquoted interpolation remains in two other parsers and in setGlobalEnvVar, so a value is subject to shell processing when the generated file is sourced rather than arriving as configured: quotes truncate it, a bare $ is substituted away, and surrounding whitespace is dropped. Reuses the get_command_linux helper introduced by #1790, defined locally in each parser to match how get_command_windows is already handled across the tree: - tomlparser-common-agent-config.rb and tomlparser-metric-collection-config.rb - setGlobalEnvVar, which re-emitted values into /opt/env_vars using double quotes, leaving them open to the same processing when that file is sourced Behaviour is unchanged for well-formed configuration. Across every affected setting and value shape, the variable bash ends up with after sourcing is identical to before, for both the shipped defaults and a fully populated config. The Windows KEY=VALUE writes are untouched, since those are split on '=' and must not carry quotes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.bashrc; add injection and compatibility regressions.Validation
--disable-error_highlightrequired for a pre-existing baseline test issue).ci_prod; the original injection paths fail the new regressions.