Skip to content

--disable-sandbox didn't properly disable it for build tool plugin commands (just the plugins themselves) #4283

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

abertelrud
Copy link
Contributor

@abertelrud abertelrud commented Apr 4, 2022

Motivation:

At some point --disable-sandbox seems to have stopped working for the commands run on behalf of plugins. This caused one of the source compatibility suite packages (the protobuf one) to fail.

Not exactly sure when this broke, but the setting ended up not getting passed through in one of the refactorings a couple of weeks ago. There wasn't a unit test covering this so it wasn't noticed until the source compat suite broke. This commit adds a specific unit test for it.

Changes:

  • pass through options.security.disableSandbox to the corresponding buildParameters bit
  • add a unit test

rdar://90955872

After merging this we should revert swiftlang/swift-source-compat-suite#652 which XFAILed the SwiftProtobuf package test.

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

abertelrud commented Apr 4, 2022

Linux: failed: did not throw error

Oh right, need to specialize the unit test for macOS because we're not yet sandboxing on other platforms.

… tool plugin commands

Not exactly sure when this failed, but the setting ended up not getting passed through in one of the refactorings a couple of weeks ago.  There wasn't a unit test covering it, so this commit adds one.

rdar://90955872
@abertelrud abertelrud force-pushed the eng/couldnt-disable-sandbox-for-build-tool-commands branch from 2a12ea4 to 96183ed Compare April 5, 2022 04:00
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud abertelrud merged commit 03df3ac into swiftlang:main Apr 5, 2022
@abertelrud abertelrud deleted the eng/couldnt-disable-sandbox-for-build-tool-commands branch April 5, 2022 07:06
abertelrud added a commit to abertelrud/swift-package-manager that referenced this pull request Apr 19, 2022
… tool plugin commands (swiftlang#4283)

Not exactly sure when this failed, but the setting ended up not getting passed through in one of the refactorings a couple of weeks ago.  There wasn't a unit test covering it, so this commit adds one.

rdar://90955872
(cherry picked from commit 03df3ac)
abertelrud added a commit that referenced this pull request Apr 19, 2022
… tool plugin commands (#4283) (#4308)

Not exactly sure when this failed, but the setting ended up not getting passed through in one of the refactorings a couple of weeks ago.  There wasn't a unit test covering it, so this commit adds one.

rdar://90955872
(cherry picked from commit 03df3ac)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants