Skip to content

Harden filter evaluation and command execution#14591

Open
shawndwells wants to merge 1 commit intoComplianceAsCode:masterfrom
shawndwells:securitay-fixes
Open

Harden filter evaluation and command execution#14591
shawndwells wants to merge 1 commit intoComplianceAsCode:masterfrom
shawndwells:securitay-fixes

Conversation

@shawndwells
Copy link
Member

Description:

  • safe_evaluate_boolean_filter --> stop allowing the build system to process arbitrary commands. Will take boolean operators, comparisons, and simple value strings/tuples/lists/sets, but remove various code execution risks from those filter expressions. We (Mission IT) use various build and CI/CD systems and want to remove risks of hosting ComplianceAsCode builders.

  • _validate_github_identifier --> checks repo names only have safe characters

  • the old eval() paths could execute unintended python if a filter string was malicious

  • os.system() path risks command injection

Rationale:

Various fixes to help minimize the risks of hosting ComplianceAsCode build systems.

@Mab879 Mab879 self-assigned this Mar 20, 2026
@Mab879 Mab879 added this to the 0.1.81 milestone Mar 20, 2026
@Mab879 Mab879 added the Infrastructure Our content build system label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Our content build system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants