1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00
nixpkgs/pkgs
Graham Christensen a9c875fc2e
nixpkgs: allow packages to be marked insecure
If a package's meta has `knownVulnerabilities`, like so:

    stdenv.mkDerivation {
      name = "foobar-1.2.3";

      ...

      meta.knownVulnerabilities = [
        "CVE-0000-00000: remote code execution"
        "CVE-0000-00001: local privilege escalation"
      ];
    }

and a user attempts to install the package, they will be greeted with
a warning indicating that maybe they don't want to install it:

    error: Package ‘foobar-1.2.3’ in ‘...default.nix:20’ is marked as insecure, refusing to evaluate.

    Known issues:

     - CVE-0000-00000: remote code execution
     - CVE-0000-00001: local privilege escalation

    You can install it anyway by whitelisting this package, using the
    following methods:

    a) for `nixos-rebuild` you can add ‘foobar-1.2.3’ to
       `nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
       like so:

         {
           nixpkgs.config.permittedInsecurePackages = [
             "foobar-1.2.3"
           ];
         }

    b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
    ‘foobar-1.2.3’ to `permittedInsecurePackages` in
    ~/.config/nixpkgs/config.nix, like so:

         {
           permittedInsecurePackages = [
             "foobar-1.2.3"
           ];
         }

Adding either of these configurations will permit this specific
version to be installed. A third option also exists:

  NIXPKGS_ALLOW_INSECURE=1 nix-build ...

though I specifically avoided having a global file-based toggle to
disable this check. This way, users don't disable it once in order to
get a single package, and then don't realize future packages are
insecure.
2017-02-24 07:41:05 -05:00
..
applications spotify: 1.0.49.125.g72ee7853-83 -> 1.0.49.125.g72ee7853-111 2017-02-23 22:20:49 +01:00
build-support Grrr 2017-02-21 15:26:14 +01:00
common-updater maintainers: Add script to patch version/sha256 in .nix files 2017-02-19 16:51:17 +02:00
data stix-two: init at 2.0.0 2017-02-20 23:55:55 +01:00
desktops Merge pull request #22937 from jgeerds/gnome 2017-02-22 22:06:21 +01:00
development elmPackages: fix #22932 2017-02-23 22:58:40 +01:00
games scummvm: 1.8.0 -> 1.9.0 2017-02-17 23:46:53 +01:00
misc long-shebang: 1.1.0 -> 1.2.0 2017-02-23 18:27:12 -05:00
os-specific Revert "Revert "linux kernels: patch against DCCP double free (CVE-2017-6074)"" 2017-02-23 19:23:29 -05:00
servers Merge pull request #23109 from dtzWill/update/neo4j 2017-02-23 19:02:32 +01:00
shells oh-my-zsh: 2017-01-15 -> 2017-02-20 2017-02-21 19:07:59 -05:00
stdenv nixpkgs: allow packages to be marked insecure 2017-02-24 07:41:05 -05:00
test
tools Merge pull request #23082 from mayflower/graylog_update 2017-02-23 17:42:57 +01:00
top-level Revert "Revert "linux kernels: patch against DCCP double free (CVE-2017-6074)"" 2017-02-23 19:23:29 -05:00