aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/sandbox.rb
AgeCommit message (Collapse)Author
2017-10-18Use “squiggly” heredocs.Markus Reiter
2017-09-24Rubocop: automatic rule fixes.Mike McQuaid
2017-08-07sandbox: stop printing message.Mike McQuaid
We’re always using the sandbox where possible now so this is just noise for the vast majority of our users.
2017-07-14sandbox: sandbox all taps by default.Mike McQuaid
We've been doing this in `brew test-bot`, for our CI and for homebrew/core long enough that this is a reasonable default that provides more protection to our users of non-homebrew/core taps.
2017-07-11sandbox: allow write access to /dev/randomilovezfs
This avoids build failure for `root6`. MacPorts currently avoids the failure with a patch, as their sandbox doesn't yet allow write access to `/dev/random` either: https://github.com/macports/macports-ports/blob/7792b2c5655f9d2adb979434a242cc3ac60fea40/science/root6/Portfile#L73-L75 https://github.com/macports/macports-ports/blob/7792b2c5655f9d2adb979434a242cc3ac60fea40/science/root6/files/patch-disable-hsimple-macro.diff The relevant code where `/dev/random` is opened with `O_WRONLY` is here: https://github.com/root-project/root/blob/15673deba5a0cb73d90ae8f36d7b010f65b5e96e/interpreter/cling/lib/Utils/PlatformPosix.cpp#L63-L82
2017-06-02Re-revert "Fix operator spacing."Markus Reiter
2017-06-01Revert "Fix operator spacing."ilovezfs
2017-05-31Fix operator spacing.Markus Reiter
2017-05-29Fixup all RuboCop warnings.Mike McQuaid
2017-05-09Allow --interactive to access HOMEMike McQuaid
This may result in a slightly varied build but it’s generally just far less annoying to be able to access all your e.g. shell configuration.
2016-11-13Use guard clauses.Markus Reiter
2016-09-23sandbox: tweak HOMEBREW_REPOSITORY handling.Mike McQuaid
If we have a HOMEBREW_REPOSITORY and HOMEBREW_PREFIX mismatch (now the default) then we can block access to the whole of HOMEBREW_REPOSITORY rather than just the HOMEBREW_LIBRARY and `.git`.
2016-09-22sandbox: loosen restriction around Xcode cachingDominyk Tiller
It doesn't really need to be as tight as it is currently, certainly outside brew you can write to here without any special privileges beside being the user, and being so can tight can cause issues on clean systems or systems where Xcode hasn't been used before as exposed by https://github.com/Homebrew/homebrew-core/issues/4892. Closes https://github.com/Homebrew/homebrew-core/issues/4892.
2016-09-21sandbox: sandbox homebrew/tex by defaultDominyk Tiller
2016-09-21sandbox: sandbox homebrew/devel-only by defaultDominyk Tiller
2016-09-21sandbox: sandbox homebrew/fuse by defaultDominyk Tiller
2016-09-21sandbox: sandbox homebrew/dupes by defaultDominyk Tiller
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-08-18disable sandbox for 10.5Xu Cheng
Although `sandbox-exec` is available in 10.5, it has very limit support on the DSL for sandbox profile file(.sb file). Therefore, sandbox for Homebrew on 10.5 is broken. Closes #735. Signed-off-by: Xu Cheng <git@xuc.me>
2016-08-18Sandbox.formula?: allow to disable sandbox by userXu Cheng
2016-08-15sandbox: add formula? method and sandbox core.Mike McQuaid
Add a new `Sandbox.formula?` method to see if a given formula should be sandboxed. Use the formula to check its tap against a list of pre-approved taps where we know every formula builds under the sandbox (currently just homebrew/core).
2016-08-15sandbox: add test? method.Mike McQuaid
Simplify checking if we’re going to sandbox a test with `Sandbox.test?`.
2016-08-14Don't report .pyc file writes in sandbox logsTim D. Smith
These are never fatal and often confusing. Fixes #683.
2016-04-18brew test, install, update-test: add --keep-tmp optionAndrew Janke
Also enables sandbox for --interactive and --debug use of install and test, using automatic retention. Closes #66. Signed-off-by: Andrew Janke <andrew@apjanke.net>
2015-09-15sandbox: allow certain processes running without sandboxXu Cheng
2015-08-29sandbox: fix log problem for brew test-botXu Cheng
2015-08-28sandbox: better log outputXu Cheng
* use syslog filter instead of grep. * output sandbox log to stdout when verbose and failed. * output nothing if sandbox log is empty. Closes Homebrew/homebrew#43325. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-27sandbox: allow writing to /dev/zeroAlex Dunn
Closes Homebrew/homebrew#43344.
2015-08-25sandbox: permit /var/tmp & DerivedDataDominyk Tiller
Long term it would be nice to sandbox everything that writes to DerivedData but it is essentially a cache directory of sorts. The downside of allowing stuff to write there particularly is that DerivedData is notoriously bad at getting cleaned up, so if you do a lot of Xcode-using installations very quickly, you can chew your disk space up. Closes Homebrew/homebrew#43276. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-08-06more core file style updated by rubocopXu Cheng
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-31print sandbox messageXu Cheng
Closes Homebrew/homebrew#42293. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-22auto disable sandbox for interactive shellXu Cheng
Closes Homebrew/homebrew#38792. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-10sandbox: fix the rulesXu Cheng
1. `script` (used to fake the tty) requires write access to /dev/ptmx and /dev/ttys* 2. sandbox profile only accepts `[0-9]` instead of `\d`.
2015-04-25Add Formula#logsJack Nagel
2015-04-23sandbox: add deny_write_homebrew_library methodXu Cheng
2015-04-17sandbox: record logXu Cheng
Closes Homebrew/homebrew#38711. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-15sandbox: redesign APIXu Cheng
2015-04-09preliminary write control only sandboxXu Cheng
Closes Homebrew/homebrew#38361. Signed-off-by: Xu Cheng <xucheng@me.com>