Skip to content

Commit

Permalink
Merge pull request #1369 from dsalaza4/main
Browse files Browse the repository at this point in the history
refac(back): #1354 deprecate sandbox
  • Loading branch information
dsalaza4 authored Aug 13, 2024
2 parents 8aef622 + ed0d94a commit 001b9d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
8 changes: 0 additions & 8 deletions docs/src/security/design-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@

## Fail-Safe Defaults

- By default, builds are run in a sandbox
that uses kernel namespaces
to prevent the build from accessing the network
and the external file system.

The user is given the option to opt-out from this behavior,
but this is enabled by default.

- Generated files are created inside user-owned folders by default,
which inherit the security
that the user has previously defined for the directory.
Expand Down
8 changes: 1 addition & 7 deletions src/cli/main/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,10 @@
CON.out()

GIT_DEPTH: int = int(environ.get("MAKES_GIT_DEPTH", "3"))
if GIT_DEPTH != 1:
if GIT_DEPTH != 3:
CON.out(f"Using feature flag: MAKES_GIT_DEPTH={GIT_DEPTH}")


K8S_COMPAT: bool = bool(environ.get("MAKES_K8S_COMPAT"))
if K8S_COMPAT:
CON.out("Using feature flag: MAKES_K8S_COMPAT")


def _if(condition: Any, *value: Any) -> List[Any]:
return list(value) if condition else []

Expand Down Expand Up @@ -288,7 +283,6 @@ def _nix_build(
*["--option", "max-jobs", "auto"],
*["--option", "substituters", substituters],
*["--option", "trusted-public-keys", trusted_pub_keys],
*["--option", "sandbox", "false" if K8S_COMPAT else "true"],
*_if(out, "--out-link", out),
*_if(not out, "--no-out-link"),
*["--show-trace"],
Expand Down

0 comments on commit 001b9d0

Please sign in to comment.