fix(telemetry): harden Checkmarx-flagged execution paths - #5137
Open
balajikumaran-c-s wants to merge 4 commits into
Open
fix(telemetry): harden Checkmarx-flagged execution paths#5137balajikumaran-c-s wants to merge 4 commits into
balajikumaran-c-s wants to merge 4 commits into
Conversation
Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
balajikumaran-c-s
marked this pull request as ready for review
September 3, 2026 16:12
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.
PR Description
Description of the Solution
Summary: This PR hardens telemetry validation and
omnia_autoexecution paths identified by Checkmarx. It validates untrusted host and path values before process execution, improves sensitive-file and credential handling, removes shell-based command composition where possible, and hardens OME test-automation command arguments. The PR remains a draft because realansible-vaultsmoke validation currently exposes the credential-encryption regression documented in the Testing section.Changes
Telemetry Input Validation
k8s_cluster_mountto be an absolute path without NUL, carriage-return, or newline characters.shell=False, an option terminator, and explicit timeouts.omnia_autoProcess and Credential Securitysshpasspasswords from command-line arguments to inherited file descriptors for remote playbook, clone, copy, and synchronization operations.teepipelines with argument-list execution and Python-managed output streaming.OME Validation Automation
Packaging and Regression Coverage
omnia_autowheel so its six remediated modules match the source implementation.Files Changed
src/telemetry/plugins/module_utils/input_validation/messages/en_us_validation_msg.pysrc/telemetry/plugins/module_utils/input_validation/schema/telemetry_packages.jsonsrc/telemetry/plugins/module_utils/input_validation/validators/telemetry_validation.pytest/plugins/omnia_auto/functions/process_security.pytest/plugins/omnia_auto/functions/credential_func.pytest/plugins/omnia_auto/functions/host_func.pytest/plugins/omnia_auto/functions/runner_func.pytest/plugins/omnia_auto/functions/sync_func.pytest/plugins/omnia_auto/functions/validation_runner.pytest/plugins/test_security_remediation.pyomnia_autosecurity boundaries.test/plugins/dist/omnia_auto-1.0.0-py3-none-any.whltest/telemetry/conftest.pytest/telemetry/library/functions/ome_func.pytest/telemetry/library/vars/common_vars.pytest/telemetry/library/vars/ome_vars.pytest/telemetry/ut/test_ome_func.pyTesting
pytest -p no:cacheprovider -q test/telemetry/ut: 29 passed; report output produced a non-fatal warning because/opt/omnia/reportswas read-only in the audit environment.pytest -p no:cacheprovider -q test/plugins/test_security_remediation.py: 51 passed, 1 failed. The failing case istest_credentials_have_private_mode_before_yaml_write.ansible-vaultsmoke validation with ansible-core 2.21.3 currently fails in bothvault_encrypt()andwrite_credential_fields(): the descriptor-backed output is not populated, and the unlinked temporary plaintext path cannot be reopened byansible-vault.git diff --check 8ef1af50a..d942e5ae4: passed.Backward Compatibility
/proc/self/fd,pass_fds, anddir_fd.ansible-vaultencryption regression is a merge blocker and must be corrected before this change can be considered backward compatible or production-ready.Suggested Reviewers
@reviewer1 @reviewer2