Repository navigation
š”ļø Sentinel: [MEDIUM] Block function reflection attributes in ASTScanner #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weāll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,12 @@ | |
| "__globals__", | ||
| "__subclasses__", | ||
| "__code__", | ||
| "__closure__", | ||
| "__defaults__", | ||
| "__kwdefaults__", | ||
| "__func__", | ||
| "__self__", | ||
| "__module__", | ||
|
Comment on lines
+31
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. š High Ā· Ephemeral plugins run after failed scans When an EPHEMERAL-mode plugin uses a newly forbidden attribute, Make Prompt for AI agentsIn `xcore/kernel/security/section.py` at lines 31-36:
**Ephemeral plugins run after failed scans**
When an EPHEMERAL-mode plugin uses a newly forbidden attribute, `EphemeralActivator.activate` logs the scan errors and continues to `EphemeralHandler.start`, whose warm pool loads the plugin through the in-process `LifecycleManager`. The forbidden reflection access therefore runs in the kernel process.
Make `EphemeralActivator.activate` stop activation when the scan fails.
Comment on lines
+31
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. āŖ Low Ā· Security guide omits blocked attributes The sandboxed-plugin guide lists Update the sandboxed-plugin guideās blocked-attribute list to include the six new entries. Prompt for AI agentsIn `xcore/kernel/security/section.py` at lines 31-36:
**Security guide omits blocked attributes**
The sandboxed-plugin guide lists `__subclasses__`, `__mro__`, `__globals__`, and `__builtins__` as blocked attributes but omits the six added here, so plugin authors relying on the guide do not learn that these accesses are rejected during scanning.
Update the sandboxed-plugin guideās blocked-attribute list to include the six new entries. |
||
| "__mro__", | ||
| "__builtins__", | ||
| "__dict__", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
š High Ā· String helpers bypass attribute blocking
When a plugin passes a newly forbidden reflection name to an
attrgetterhelper,ASTScannerchecks onlyast.Attributenames, so it misses names passed as strings tooperator.attrgetterorfunctools.attrgetter. The scan passes and the plugin can still inspect function internals.Have
ASTScannerreject newly forbidden names passed toattrgetterhelpers.Prompt for AI agents