From d127f9bd0e7b9b2e0df2de8a2227f77c0907468d Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 18 May 2022 17:39:39 +0200 Subject: chore(3p/nix): unvendor tvix 0.1 Nothing is using this now, and we'll likely never pick this up again, but we learned a lot in the process. Every now and then this breaks in some bizarre way on channel bumps and it's just a waste of time to maintain that. Change-Id: Idcf2f5acd4ca7070ce18d7149cbfc0d967dc0a44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5632 Tested-by: BuildkiteCI Reviewed-by: sterni Reviewed-by: lukegb Autosubmit: tazjin --- third_party/nix/tests/secure-drv-outputs.sh | 36 ----------------------------- 1 file changed, 36 deletions(-) delete mode 100644 third_party/nix/tests/secure-drv-outputs.sh (limited to 'third_party/nix/tests/secure-drv-outputs.sh') diff --git a/third_party/nix/tests/secure-drv-outputs.sh b/third_party/nix/tests/secure-drv-outputs.sh deleted file mode 100644 index 50a9c4428d30..000000000000 --- a/third_party/nix/tests/secure-drv-outputs.sh +++ /dev/null @@ -1,36 +0,0 @@ -# Test that users cannot register specially-crafted derivations that -# produce output paths belonging to other derivations. This could be -# used to inject malware into the store. - -source common.sh - -clearStore - -startDaemon - -# Determine the output path of the "good" derivation. -goodOut=$(nix-store -q $(nix-instantiate ./secure-drv-outputs.nix -A good)) - -# Instantiate the "bad" derivation. -badDrv=$(nix-instantiate ./secure-drv-outputs.nix -A bad) -badOut=$(nix-store -q $badDrv) - -# Rewrite the bad derivation to produce the output path of the good -# derivation. -rm -f $TEST_ROOT/bad.drv -sed -e "s|$badOut|$goodOut|g" < $badDrv > $TEST_ROOT/bad.drv - -# Add the manipulated derivation to the store and build it. This -# should fail. -if badDrv2=$(nix-store --add $TEST_ROOT/bad.drv); then - nix-store -r "$badDrv2" -fi - -# Now build the good derivation. -goodOut2=$(nix-build ./secure-drv-outputs.nix -A good --no-out-link) -test "$goodOut" = "$goodOut2" - -if ! test -e "$goodOut"/good; then - echo "Bad derivation stole the output path of the good derivation!" - exit 1 -fi -- cgit 1.4.1