Skip to content

Python: Default Dapr module allowlist to semantic_kernel prefix#13596

Open
moonbox3 wants to merge 3 commits intomicrosoft:mainfrom
moonbox3:dapr-default-module-allowlist
Open

Python: Default Dapr module allowlist to semantic_kernel prefix#13596
moonbox3 wants to merge 3 commits intomicrosoft:mainfrom
moonbox3:dapr-default-module-allowlist

Conversation

@moonbox3
Copy link
Collaborator

Motivation and Context

Follow-up to #13499. The previous PR added the allowed_module_prefixes parameter but defaulted it to None, which meant the module restriction was only active if developers discovered and configured it. Secure-by-default is the right posture here — restrict first, let developers widen as needed.

  • Change allowed_module_prefixes default from None to ("semantic_kernel.",) across Dapr runtime step loading
  • Non-SK step classes now require developers to explicitly add their module prefix (e.g. ("semantic_kernel.", "myapp.steps."))
  • Developers can pass None to opt out entirely, but the secure default is now enforced
  • The Dapr runtime code is experimental, so this is a non-breaking change per our stability guarantees

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner February 25, 2026 23:48
@moonbox3 moonbox3 added the python Pull requests for the Python Semantic Kernel label Feb 25, 2026
@moonbox3 moonbox3 self-assigned this Feb 26, 2026
@moonbox3
Copy link
Collaborator Author

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
processes
   step_utils.py520100% 
processes/dapr_runtime
   dapr_kernel_process_context.py41392%42, 44, 47
   dapr_process_info.py33487%35, 40, 50, 57
   dapr_step_info.py26196%51
processes/dapr_runtime/actors
   step_actor.py2656176%106, 109, 113–114, 126–128, 172–175, 193, 197, 201, 227, 235–236, 252–254, 257–262, 265–267, 274–275, 289, 293–295, 298–299, 316, 333–334, 339, 370–372, 392, 432, 444–452, 455, 458–462
TOTAL28165482982% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3835 23 💤 0 ❌ 0 🔥 1m 47s ⏱️

@moonbox3 moonbox3 enabled auto-merge February 26, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants