about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/security')
-rw-r--r--nixpkgs/pkgs/tools/security/aws-okta/default.nix11
-rw-r--r--nixpkgs/pkgs/tools/security/aws-okta/deps.nix29
-rw-r--r--nixpkgs/pkgs/tools/security/bitwarden_rs/default.nix27
-rw-r--r--nixpkgs/pkgs/tools/security/bitwarden_rs/vault.nix25
-rw-r--r--nixpkgs/pkgs/tools/security/chipsec/default.nix40
-rw-r--r--nixpkgs/pkgs/tools/security/neopg/default.nix14
-rw-r--r--nixpkgs/pkgs/tools/security/nmap/qt.nix29
-rw-r--r--nixpkgs/pkgs/tools/security/pcsclite/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/security/pinentry/default.nix6
-rw-r--r--nixpkgs/pkgs/tools/security/prey/default.nix2
-rw-r--r--nixpkgs/pkgs/tools/security/rng-tools/default.nix43
-rw-r--r--nixpkgs/pkgs/tools/security/sops/default.nix8
12 files changed, 189 insertions, 49 deletions
diff --git a/nixpkgs/pkgs/tools/security/aws-okta/default.nix b/nixpkgs/pkgs/tools/security/aws-okta/default.nix
index cdb35453d3d2..36b6a5767a1e 100644
--- a/nixpkgs/pkgs/tools/security/aws-okta/default.nix
+++ b/nixpkgs/pkgs/tools/security/aws-okta/default.nix
@@ -1,8 +1,8 @@
-{ buildGoPackage, fetchFromGitHub, stdenv }:
+{ buildGoPackage, fetchFromGitHub, libusb1, pkgconfig, stdenv }:
 
 buildGoPackage rec {
   name = "aws-okta-${version}";
-  version = "0.19.0";
+  version = "0.20.1";
 
   goPackagePath = "github.com/segmentio/aws-okta";
 
@@ -10,11 +10,16 @@ buildGoPackage rec {
     owner = "segmentio";
     repo = "aws-okta";
     rev = "v${version}";
-    sha256 = "1c9mn492yva7cdsx2b0n8g2fdl9660v3xma0v82jzb0c9y9rq0ms";
+    sha256 = "084lb9rp04vbpzmvsb2l92a4gp7c8g28x4xsagzwkqqpwi3fd15d";
   };
 
+  goDeps = ./deps.nix;
+
   buildFlags = "--tags release";
 
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libusb1 ];
+
   meta = with stdenv.lib; {
     inherit version;
     description = "aws-vault like tool for Okta authentication";
diff --git a/nixpkgs/pkgs/tools/security/aws-okta/deps.nix b/nixpkgs/pkgs/tools/security/aws-okta/deps.nix
new file mode 100644
index 000000000000..180aa69d56c5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/aws-okta/deps.nix
@@ -0,0 +1,29 @@
+[
+  {
+    goPackagePath = "github.com/sirupsen/logrus";
+    fetch = {
+      type = "git";
+      url = "https://github.com/sirupsen/logrus.git";
+      rev = "a437dfd2463eaedbec3dfe443e477d3b0a810b3f";
+      sha256 = "1904s2bbc7p88anzjp6fyj3jrbm5p6wbb8j4490674dq10kkcfbj";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys/unix";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/sys.git";
+      rev = "b699b7032584f0953262cb2788a0ca19bb494703";
+      sha256 = "172sw1bm581qwal9pbf9qj1sgivr74nabbj8qq4q4fhgpzams9ix";
+    };
+  }
+  {
+    goPackagePath = "github.com/marshallbrekka/go-u2fhost";
+    fetch = {
+      type = "git";
+      url = "https://github.com/marshallbrekka/go-u2fhost";
+      rev = "72b0e7a3f583583996b3b382d2dfaa81fdc4b82c";
+      sha256 = "0apzmf0bjpr58ynw55agyjsl74zyg5qjk19nyyy4zhip3s9b1d0h";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/tools/security/bitwarden_rs/default.nix b/nixpkgs/pkgs/tools/security/bitwarden_rs/default.nix
new file mode 100644
index 000000000000..788c561da3c5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/bitwarden_rs/default.nix
@@ -0,0 +1,27 @@
+{ lib, rustPlatform, fetchFromGitHub, pkgconfig, openssl }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "bitwarden_rs";
+  version = "1.8.0";
+
+  src = fetchFromGitHub {
+    owner = "dani-garcia";
+    repo = pname;
+    rev = version;
+    sha256 = "0jz9r6ck6sfz4ig95x0ja6g5ikyq6z0xw1zn9zf4kxha4klqqbkx";
+  };
+
+  buildInputs = [ pkgconfig openssl ];
+
+  RUSTC_BOOTSTRAP = 1;
+
+  cargoSha256 = "0bzid5wrpcrghazv5652ghyv4amp298p5kfridswv175kmr9gg0x";
+
+  meta = with lib; {
+    description = "An unofficial lightweight implementation of the Bitwarden server API using Rust and SQLite";
+    homepage = https://github.com/dani-garcia/bitwarden_rs;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ msteen ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/security/bitwarden_rs/vault.nix b/nixpkgs/pkgs/tools/security/bitwarden_rs/vault.nix
new file mode 100644
index 000000000000..1f7f23049d06
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/bitwarden_rs/vault.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "bitwarden_rs-vault";
+  version = "2.9.0";
+
+  src = fetchurl {
+    url = "https://github.com/dani-garcia/bw_web_builds/releases/download/v${version}/bw_web_v${version}.tar.gz";
+    sha256 = "0kh7nqd688ilw73n4pw3s6fahghwbhiql548js6cdwsp4car3vbb";
+  };
+
+  buildCommand = ''
+    mkdir -p $out/share/bitwarden_rs/vault
+    cd $out/share/bitwarden_rs/vault
+    tar xf $src
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Integrates the web vault into bitwarden_rs";
+    homepage = https://github.com/dani-garcia/bw_web_builds;
+    platforms = platforms.all;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ msteen ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/security/chipsec/default.nix b/nixpkgs/pkgs/tools/security/chipsec/default.nix
new file mode 100644
index 000000000000..a32752f8b231
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/chipsec/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, lib, fetchFromGitHub, python27Packages, nasm, libelf
+, kernel ? null, withDriver ? false }:
+python27Packages.buildPythonApplication rec {
+  name = "chipsec-${version}";
+  version = "1.3.7";
+
+  src = fetchFromGitHub {
+    owner = "chipsec";
+    repo = "chipsec";
+    rev = version;
+    sha256 = "00hwhi5f24y429zazhm77l1pp31q7fmx7ks3sfm6d16v89zbcp9a";
+  };
+
+  nativeBuildInputs = [
+    nasm libelf
+  ];
+
+  setupPyBuildFlags = lib.optional (!withDriver) "--skip-driver";
+
+  checkPhase = "python setup.py build "
+             + lib.optionalString (!withDriver) "--skip-driver "
+             + "test";
+
+  KERNEL_SRC_DIR = lib.optionalString withDriver "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
+
+  meta = with stdenv.lib; {
+    description = "Platform Security Assessment Framework";
+    longDescription = ''
+      CHIPSEC is a framework for analyzing the security of PC platforms
+      including hardware, system firmware (BIOS/UEFI), and platform components.
+      It includes a security test suite, tools for accessing various low level
+      interfaces, and forensic capabilities. It can be run on Windows, Linux,
+      Mac OS X and UEFI shell.
+    '';
+    license = licenses.gpl2;
+    homepage = https://github.com/chipsec/chipsec;
+    maintainers = with maintainers; [ johnazoidberg ];
+    platforms = if withDriver then [ "x86_64-linux" ] else platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/security/neopg/default.nix b/nixpkgs/pkgs/tools/security/neopg/default.nix
index cf5f760cda47..88494e8dbdf7 100644
--- a/nixpkgs/pkgs/tools/security/neopg/default.nix
+++ b/nixpkgs/pkgs/tools/security/neopg/default.nix
@@ -3,7 +3,7 @@
 , cmake
 , sqlite
 , botan2
-, boost164
+, boost
 , curl
 , gettext
 , pkgconfig
@@ -12,26 +12,26 @@
 
 stdenv.mkDerivation rec {
   name = "neopg-${version}";
-  version = "0.0.4";
+  version = "0.0.6";
 
   src = fetchFromGitHub {
     owner = "das-labor";
     repo = "neopg";
     rev = "v${version}";
-    sha256 = "0hhkl326ff6f76k8pwggpzmivbm13fz497nlyy6ybn5bmi9xfblm";
+    sha256 = "15xp5w046ix59cfrhh8ka4camr0d8qqw643g184sqrcqwpk7nbrx";
     fetchSubmodules = true;
   };
 
   nativeBuildInputs = [ pkgconfig ];
 
-  buildInputs = [ cmake sqlite botan2 boost164 curl gettext libusb gnutls ];
+  buildInputs = [ cmake sqlite botan2 boost curl gettext libusb gnutls ];
 
   doCheck = true;
   checkTarget = "test";
+  dontUseCmakeBuildDir = true;
 
-  postInstall = ''
-    mkdir -p $out/bin
-    cp src/neopg $out/bin/neopg
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/3rdparty/googletest/googletest:$(pwd)/neopg
   '';
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/tools/security/nmap/qt.nix b/nixpkgs/pkgs/tools/security/nmap/qt.nix
index c15d9bf25283..c0b7a72d18e0 100644
--- a/nixpkgs/pkgs/tools/security/nmap/qt.nix
+++ b/nixpkgs/pkgs/tools/security/nmap/qt.nix
@@ -1,33 +1,35 @@
-{ stdenv, fetchurl, cmake, pkgconfig, makeWrapper
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, makeWrapper
 , dnsutils, nmap
-, qtbase, qtscript, qtwebkit }:
+, qtbase, qtscript, qtwebengine }:
 
 stdenv.mkDerivation rec {
   name = "nmapsi4-${version}";
-  version = "0.5-alpha1";
+  version = "0.4.80-20180430";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/nmapsi/${name}.tar.xz";
-    sha256 = "18v9a3l2nmij3gb4flscigxr5c44nphkjfmk07qpyy73fy61mzrs";
+  src = fetchFromGitHub {
+    owner = "nmapsi4";
+    repo = "nmapsi4";
+    rev = "d7f18e4c1e38dcf9c29cb4496fe14f9ff172861a";
+    sha256 = "10wqyrjzmad1g7lqa65rymbkna028xbp4xcpj442skw8gyrs3994";
   };
 
   nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
 
-  buildInputs = [ qtbase qtscript qtwebkit ];
+  buildInputs = [ qtbase qtscript qtwebengine ];
 
   enableParallelBuilding = true;
 
   postPatch = ''
+    substituteInPlace src/platform/digmanager.cpp \
+      --replace '"dig"' '"${dnsutils}/bin/dig"'
+    substituteInPlace src/platform/discover.cpp \
+        --replace '"nping"' '"${nmap}/bin/nping"'
     for f in \
-      src/platform/digmanager.cpp \
-      src/platform/discover.cpp \
       src/platform/monitor/monitor.cpp \
       src/platform/nsemanager.cpp ; do
 
       substituteInPlace $f \
-        --replace '"dig"'   '"${dnsutils}/bin/dig"'\
-        --replace '"nmap"'  '"${nmap}/bin/nmap"' \
-        --replace '"nping"' '"${nmap}/bin/nping"'
+        --replace '"nmap"'  '"${nmap}/bin/nmap"'
     done
   '';
 
@@ -45,9 +47,8 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "Qt frontend for nmap";
-    homepage    = https://www.nmapsi4.org/;
     license     = licenses.gpl2;
-    platforms   = platforms.all;
     maintainers = with maintainers; [ peterhoeg ];
+    inherit (src.meta) homepage;
   };
 }
diff --git a/nixpkgs/pkgs/tools/security/pcsclite/default.nix b/nixpkgs/pkgs/tools/security/pcsclite/default.nix
index 66a5615ee135..5c40ccdef584 100644
--- a/nixpkgs/pkgs/tools/security/pcsclite/default.nix
+++ b/nixpkgs/pkgs/tools/security/pcsclite/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   name = "pcsclite-${version}";
-  version = "1.8.24";
+  version = "1.8.25";
 
   outputs = [ "bin" "out" "dev" "doc" "man" ];
 
   src = fetchurl {
     url = "https://pcsclite.apdu.fr/files/pcsc-lite-${version}.tar.bz2";
-    sha256 = "0s3mv6csbi9303vvis0hilm71xsmi6cqkbh2kiipdisydbx6865q";
+    sha256 = "14l7irs1nsh8b036ag4cfy8wryyysch78scz5dw6xxqwqgnpjvfp";
   };
 
   patches = [ ./no-dropdir-literals.patch ];
diff --git a/nixpkgs/pkgs/tools/security/pinentry/default.nix b/nixpkgs/pkgs/tools/security/pinentry/default.nix
index 705338634f11..87df0ffd834d 100644
--- a/nixpkgs/pkgs/tools/security/pinentry/default.nix
+++ b/nixpkgs/pkgs/tools/security/pinentry/default.nix
@@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8";
   };
 
+  nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ libgpgerror libassuan libcap libsecret gtk2 gcr ncurses qt ];
 
   prePatch = ''
@@ -33,9 +34,10 @@ stdenv.mkDerivation rec {
     (stdenv.lib.enableFeature (gtk2 != null)      "pinentry-gtk2")
     (stdenv.lib.enableFeature (gcr != null)       "pinentry-gnome3")
     (stdenv.lib.enableFeature (qt != null)        "pinentry-qt")
-  ];
 
-  nativeBuildInputs = [ pkgconfig ];
+    "--with-libassuan-prefix=${libassuan.dev}"
+    "--with-libgpg-error-prefix=${libgpgerror.dev}"
+  ];
 
   meta = with stdenv.lib; {
     homepage = http://gnupg.org/aegypten2/;
diff --git a/nixpkgs/pkgs/tools/security/prey/default.nix b/nixpkgs/pkgs/tools/security/prey/default.nix
index ab041c8b05d6..b24af50ee7c2 100644
--- a/nixpkgs/pkgs/tools/security/prey/default.nix
+++ b/nixpkgs/pkgs/tools/security/prey/default.nix
@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    homepage = http://preyproject.com;
+    homepage = https://preyproject.com;
     description = "Proven tracking software that helps you find, lock and recover your devices when stolen or missing";
     maintainers = with maintainers; [ domenkozar ];
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/tools/security/rng-tools/default.nix b/nixpkgs/pkgs/tools/security/rng-tools/default.nix
index 86a5a1b7c396..3e460c5f8448 100644
--- a/nixpkgs/pkgs/tools/security/rng-tools/default.nix
+++ b/nixpkgs/pkgs/tools/security/rng-tools/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, libtool, autoconf, automake, pkgconfig
+{ stdenv, fetchFromGitHub, libtool, autoreconfHook, pkgconfig
 , sysfsutils
   # WARNING: DO NOT USE BEACON GENERATED VALUES AS SECRET CRYPTOGRAPHIC KEYS
   # https://www.nist.gov/programs-projects/nist-randomness-beacon
@@ -8,32 +8,43 @@
   # Not sure if jitterentropy is safe to use for cryptography
   # and thus a default entropy source
 , jitterentropy ? null, withJitterEntropy ? false
+, libp11 ? null, withPkcs11 ? true
 }:
+
 with stdenv.lib;
+
 stdenv.mkDerivation rec {
-  name = "rng-tools-${version}";
-  version = "6.6";
+  pname = "rng-tools";
+  version = "6.7";
 
   src = fetchFromGitHub {
     owner = "nhorman";
     repo = "rng-tools";
     rev = "v${version}";
-    sha256 = "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7";
+    sha256 = "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5";
   };
 
-  nativeBuildInputs = [ libtool autoconf automake pkgconfig ];
+  postPatch = ''
+    cp README.md README
+  '';
 
-  preConfigure = "./autogen.sh";
+  nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
 
-  configureFlags =
-       optional (!withJitterEntropy) "--disable-jitterentropy"
-    ++ optional (!withNistBeacon) "--without-nistbeacon"
-    ++ optional (!withGcrypt) "--without-libgcrypt";
+  configureFlags = [
+    (withFeature   withGcrypt        "libgcrypt")
+    (enableFeature withJitterEntropy "jitterentropy")
+    (withFeature   withNistBeacon    "nistbeacon")
+    (withFeature   withPkcs11        "pkcs11")
+  ];
 
   buildInputs = [ sysfsutils ]
-    ++ optional withJitterEntropy [ jitterentropy ]
-    ++ optional withGcrypt [ libgcrypt.dev ]
-    ++ optional withNistBeacon [ openssl.dev curl.dev libxml2.dev ];
+    ++ optionals withGcrypt        [ libgcrypt ]
+    ++ optionals withJitterEntropy [ jitterentropy ]
+    ++ optionals withNistBeacon    [ openssl curl libxml2 ]
+    ++ optionals withPkcs11        [ libp11 openssl ];
+
+  # This shouldn't be necessary but is as of 6.7
+  NIX_LDFLAGS = optionalString withPkcs11 "-lcrypto";
 
   enableParallelBuilding = true;
 
@@ -43,8 +54,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A random number generator daemon";
     homepage = https://github.com/nhorman/rng-tools;
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ johnazoidberg ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ johnazoidberg ];
   };
 }
diff --git a/nixpkgs/pkgs/tools/security/sops/default.nix b/nixpkgs/pkgs/tools/security/sops/default.nix
index 2db2fddd9a20..4940ce8372d7 100644
--- a/nixpkgs/pkgs/tools/security/sops/default.nix
+++ b/nixpkgs/pkgs/tools/security/sops/default.nix
@@ -1,16 +1,16 @@
 { stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
-  name = "sops-${version}";
-  version = "3.2.0";
+  pname = "sops";
+  version = "3.3.0";
 
   goPackagePath = "go.mozilla.org/sops";
 
   src = fetchFromGitHub {
     rev = version;
     owner = "mozilla";
-    repo = "sops";
-    sha256 = "0lzwql3f4n70gmw1d0vnsg7hd0ma6ys0a4x54g3jk10nrn2f7wxl";
+    repo = pname;
+    sha256 = "0h02iy1dfn4874gyj3k07gbw8byb7rngvsi9kjglnad2pkf0pq2d";
   };
 
   meta = with stdenv.lib; {