Skip to content

Conversation

@RinZ27
Copy link
Contributor

@RinZ27 RinZ27 commented Jan 2, 2026

Eliminates potential command injection risks and system dependency issues in the Evergreen spec resync script.

Modifications:

  1. Refactored apply_patches: Switched from shell=True to list-based subprocess.run. Implemented Python's glob for file expansion instead of relying on the shell's wildcard expansion.
  2. Ported write_summary logic: Replaced the fragile git diff | awk | sort | uniq shell pipeline with native Python string manipulation and sets. This removes the implicit dependency on awk and improves cross-platform reliability.

The script now executes git commands directly without spawning intermediate shells.

This commit replaces dangerous shell=True calls in resync-all-specs.py with safer list-based subprocess executions. It also replaces complex shell pipes with native Python logic to improve security and cross-platform reliability.
@RinZ27 RinZ27 requested a review from a team as a code owner January 2, 2026 07:19
@RinZ27 RinZ27 requested a review from sleepyStick January 2, 2026 07:19
@codeowners-service-app
Copy link

Assigned caseyclements for team dbx-python because sleepyStick is out of office.

RinZ27 added 2 commits January 2, 2026 14:36
Applied black formatting and fixed ruff issues (noqa placements, type hints, and pathlib migration) to pass CI/CD.
Adjusted noqa placements to satisfy Ruff 0.1.3 and applied consistent formatting.
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.

1 participant