-
Notifications
You must be signed in to change notification settings - Fork 7
fix: Restore Kernel hardening #510
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
Conversation
a184280 to
d0ebe2e
Compare
| return this.queueMessage(bootstrapRoot, 'bootstrap', [roots]); | ||
| } | ||
| const bootstrapRoot = rootIds[config.bootstrap]; | ||
| if (bootstrapRoot) { |
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.
The isClusterConfig(config) above makes bootstrap required so this is not needed.
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.
Wouldn't this apply to the if (config.bootstrap && !config.vats[config.bootstrap]) check above, too?
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.
Yeap. Fixed
42247fa to
dc5bddd
Compare
rekmarks
left a comment
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.
LGTM!
This PR re-enables hardening for the Kernel class, which was previously disabled to facilitate testing. With the recent architectural improvements that split out components like KernelQueue, we can now properly test the Kernel without compromising security. The PR adopts a dependency-based mocking approach (properly mocking KernelQueue via vi.hoisted, injecting mock databases, etc.) instead of attempting to modify hardened objects directly. This ensures tests respect object capability security principles while still providing comprehensive coverage. Several new tests have been added for previously untested methods.