mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
* Added a test that make sure 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.
This commit is contained in:
parent
4bdb51e621
commit
d2bfe1b071
3 changed files with 62 additions and 1 deletions
23
tests/secure-drv-outputs.nix
Normal file
23
tests/secure-drv-outputs.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
with import ./config.nix;
|
||||
|
||||
{
|
||||
|
||||
good = mkDerivation {
|
||||
name = "good";
|
||||
builder = builtins.toFile "builder"
|
||||
''
|
||||
mkdir $out
|
||||
touch $out/good
|
||||
'';
|
||||
};
|
||||
|
||||
bad = mkDerivation {
|
||||
name = "good";
|
||||
builder = builtins.toFile "builder"
|
||||
''
|
||||
mkdir $out
|
||||
touch $out/bad
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue