-
Notifications
You must be signed in to change notification settings - Fork 47
[Security] Implement assembly validation and signing for plugin loading #349
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestsecuritySecurity-related issueSecurity-related issuesquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membersquad:riverAssigned to River (Backend Dev)Assigned to River (Backend Dev)
Description
Summary
Plugin DLLs are loaded from the plugins directory with zero integrity verification. Any .dll file matching the manifest key gets loaded into a CollectibleAssemblyLoadContext with full access to app services, database, filesystem, and network.
Affected Files
| File | Detail |
|---|---|
src/SharpSite.Web/PluginManager.cs:99-109 |
Plugin DLL loading with no validation |
src/SharpSite.Plugins/PluginAssemblyLoadContext.cs |
No restrictions on loaded assemblies |
Risk
A malicious plugin gets full application-level trust. No code signing, hash verification, or publisher validation exists.
Recommended Fix (Phased)
Phase 1 Assembly Name Validation (Quick win): Validate assembly name matches manifest ID + SHA-256 hash verification.
Phase 2 Plugin Sandboxing: Permission manifest restricting plugin capabilities.
Phase 3 Code Signing (Long-term): Publisher certificate chain verification.
Estimated Effort
Phase 1: 4-6 hours | Phase 2: 2-3 days | Phase 3: 1 week
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsecuritySecurity-related issueSecurity-related issuesquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membersquad:riverAssigned to River (Backend Dev)Assigned to River (Backend Dev)