feat(safe-exec): harden curl validation and add security posture framework - #8
Open
pshickeydev wants to merge 1 commit into
Open
pshickeydev wants to merge 1 commit into
pshickeydev wants to merge 1 commit into
Conversation
Contributor
|
@pshickeydev I think I might approach this as a bigger config. Maybe a safe-exec.yaml.example with multiple types of "safe exec" configuration options. Maybe it won't be large at first and then we can make it additive. We could have "postures" of: high, medium, low. High = "fail closed" and Low= "fail open" and then medium is somewhere in between. Similar to k8s Pod Security Standards where there is privileged, baseline and restricted: https://kubernetes.io/docs/concepts/security/pod-security-standards/ I think you have the right idea, but I'd like to see it more broadly applied and portable. |
pshickeydev
force-pushed
the
fix/safe-exec-curl-hardening
branch
from
September 14, 2026 21:58
73c7f1e to
b382335
Compare
Harden command validation and scope credential exposure so deployments can restrict network destinations while retaining explicit policy choices.
pshickeydev
force-pushed
the
fix/safe-exec-curl-hardening
branch
from
September 15, 2026 00:24
b382335 to
dd556b6
Compare
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
restricted,baseline, andprivilegedpostures, withhigh,medium, andlowaliases.Behavior
Curl validation walks options rather than matching a fixed flag set. Unvetted options are denied, URL operands are limited to HTTP(S), and execution disables automatic curl configuration loading. Execution also separates leading environment assignments from argv and preserves caller-supplied hosts when recovering validated segments.
Postures can be configured file-wide through
defaults.postureor per profile:restrictedkeep_env_headsbaselineprivilegedcurl_allowed_hostsand call-timeallowed_hostsare combined.keep_env_headscontrols which pipeline segments receive preserved or explicitly supplied environment values.These are command-validation controls, not a network sandbox: hostname policy does not establish DNS ownership or constrain sockets opened by arbitrary child tools.
Compatibility and rollout
Verification
Previously recorded engine verification: 216 tests passed in
tests/test_safe_exec.py, Ruff clean, and release gates clean. Consolidating this PR into one signed commit did not change its tree. The consumer's subsequent regression runs used this engine checkout.Description prepared with AI assistance.