feat: sandbox runtime and capability policy#1171
Conversation
Requirement PR ChecklistUse this checklist when adding or modifying requirements in Base Class
Validation Logic
Integration
|
Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
|
General question: if I wanted to test this out, how would I use it? |
planetf1
left a comment
There was a problem hiding this comment.
Really clean redesign — the tier model is a big improvement over the old boolean flags, CapabilityPolicy with its honest ENFORCED_* separation is a nice touch, and make_execution_environment is exactly the right API shape. A few things below need fixing before merge; the rest are suggestions or noticed-in-passing nits.
planetf1
left a comment
There was a problem hiding this comment.
Really clean redesign — the tier model is a big improvement over the old boolean flags, CapabilityPolicy with its honest ENFORCED_* separation is a nice touch, and make_execution_environment is exactly the right API shape. A few things below need fixing before merge; the rest are suggestions or noticed-in-passing nits.
Posted in error — duplicate of review 4381122017. Please disregard this one.
Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
|
Thanks for the feedback @planetf1 , I've addressed it all in the most recent commit as well as a small change to help with E2E. @psschwei , if you want to test this you can try using it similar to this snippet, assuming you have docker/colima/podman running and the You should see a resultant artifact from the sandbox following the policy. |
|
Checked through all the fixes from my earlier review — everything looks good. The timeout regression, leak, legacy int shim, container ID fallback, unconditional warning, and truncation edge case are all addressed correctly. I also ran some broader variations of your code snippet (capability matrix coverage, static import blocking, one-shot warning, local interpreter, artifact export) and they all behaved as expected. There was a Docker socket timeout on a couple of the sandbox tests but that was down to my local environment rather than anything in the code. Just the one test failure to sort (comment above) and this is good to go. |
Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
Pull Request
Issue
Fixes #1021
Description
Allow more granular permissions to be used during sandboxing via capability policy.
Testing
Attribution
Adding a new component, requirement, sampling strategy, or tool?
If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.
NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.