Skip to content

feat(workflows): enhance custom Python execution controls for HTTP requests#2412

Closed
dkosowski87 wants to merge 2 commits into
mainfrom
fix-critical-exposed-worker-run
Closed

feat(workflows): enhance custom Python execution controls for HTTP requests#2412
dkosowski87 wants to merge 2 commits into
mainfrom
fix-critical-exposed-worker-run

Conversation

@dkosowski87
Copy link
Copy Markdown
Contributor

What does this PR do?

  • Updated documentation to clarify that local custom Python execution is disabled by default and can be enabled via environment variables.
  • Modified environment variable defaults in env.py to disable custom Python execution in workflows.
  • Implemented ensure_http_dynamic_python_blocks_allowed function to enforce restrictions on dynamic Python blocks in HTTP requests, raising HTTP 403 errors when disabled.
  • Added unit tests to validate the behavior of the new HTTP dynamic block guard functionality.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Testing

  • I have added/updated tests for this change

…quests

- Updated documentation to clarify that local custom Python execution is disabled by default and can be enabled via environment variables.
- Modified environment variable defaults in `env.py` to disable custom Python execution in workflows.
- Implemented `ensure_http_dynamic_python_blocks_allowed` function to enforce restrictions on dynamic Python blocks in HTTP requests, raising HTTP 403 errors when disabled.
- Added unit tests to validate the behavior of the new HTTP dynamic block guard functionality.
- Consolidated imports from `inference.core.env` to improve readability.
- Removed redundant import of `ALLOW_HTTP_CUSTOM_PYTHON_EXECUTION_IN_WORKFLOWS` and restructured the import statements for better organization.
@dkosowski87 dkosowski87 closed this Jun 4, 2026
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