Merge pull request #240970 from fabaff/deepsecrets

deepsecrets: init at 1.0.6

authored by

Fabian Affolter and committed by
GitHub
d61a701d 762d253a

+539
+47
pkgs/development/python-modules/dotwiz/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , pyheck 5 + , pytestCheckHook 6 + , pythonOlder 7 + }: 8 + 9 + buildPythonPackage rec { 10 + pname = "dotwiz"; 11 + version = "0.4.0"; 12 + format = "setuptools"; 13 + 14 + disabled = pythonOlder "3.7"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "rnag"; 18 + repo = "dotwiz"; 19 + rev = "refs/tags/v${version}"; 20 + hash = "sha256-ABmkwpJ40JceNJieW5bhg0gqWNrR6Wxj84nLCjKU11A="; 21 + }; 22 + 23 + propagatedBuildInputs = [ 24 + pyheck 25 + ]; 26 + 27 + nativeCheckInputs = [ 28 + pytestCheckHook 29 + ]; 30 + 31 + pythonImportsCheck = [ 32 + "dotwiz" 33 + ]; 34 + 35 + pytestFlagsArray = [ 36 + "--ignore=benchmarks" 37 + "--ignore-glob=*integration*" 38 + ]; 39 + 40 + meta = with lib; { 41 + description = "Dict subclass that supports dot access notation"; 42 + homepage = "https://github.com/rnag/dotwiz"; 43 + changelog = "https://github.com/rnag/dotwiz/blob/v${version}/HISTORY.rst"; 44 + license = licenses.mit; 45 + maintainers = with maintainers; [ fab ]; 46 + }; 47 + }
+377
pkgs/development/python-modules/pyheck/Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 3 4 + 5 + [[package]] 6 + name = "autocfg" 7 + version = "1.1.0" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 10 + 11 + [[package]] 12 + name = "bitflags" 13 + version = "1.3.2" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 16 + 17 + [[package]] 18 + name = "cfg-if" 19 + version = "1.0.0" 20 + source = "registry+https://github.com/rust-lang/crates.io-index" 21 + checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 22 + 23 + [[package]] 24 + name = "crossbeam-channel" 25 + version = "0.5.8" 26 + source = "registry+https://github.com/rust-lang/crates.io-index" 27 + checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" 28 + dependencies = [ 29 + "cfg-if", 30 + "crossbeam-utils", 31 + ] 32 + 33 + [[package]] 34 + name = "crossbeam-deque" 35 + version = "0.8.3" 36 + source = "registry+https://github.com/rust-lang/crates.io-index" 37 + checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" 38 + dependencies = [ 39 + "cfg-if", 40 + "crossbeam-epoch", 41 + "crossbeam-utils", 42 + ] 43 + 44 + [[package]] 45 + name = "crossbeam-epoch" 46 + version = "0.9.15" 47 + source = "registry+https://github.com/rust-lang/crates.io-index" 48 + checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" 49 + dependencies = [ 50 + "autocfg", 51 + "cfg-if", 52 + "crossbeam-utils", 53 + "memoffset", 54 + "scopeguard", 55 + ] 56 + 57 + [[package]] 58 + name = "crossbeam-utils" 59 + version = "0.8.16" 60 + source = "registry+https://github.com/rust-lang/crates.io-index" 61 + checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 62 + dependencies = [ 63 + "cfg-if", 64 + ] 65 + 66 + [[package]] 67 + name = "either" 68 + version = "1.8.1" 69 + source = "registry+https://github.com/rust-lang/crates.io-index" 70 + checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 71 + 72 + [[package]] 73 + name = "heck" 74 + version = "0.4.1" 75 + source = "registry+https://github.com/rust-lang/crates.io-index" 76 + checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 77 + dependencies = [ 78 + "unicode-segmentation", 79 + ] 80 + 81 + [[package]] 82 + name = "hermit-abi" 83 + version = "0.3.1" 84 + source = "registry+https://github.com/rust-lang/crates.io-index" 85 + checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" 86 + 87 + [[package]] 88 + name = "indoc" 89 + version = "0.3.6" 90 + source = "registry+https://github.com/rust-lang/crates.io-index" 91 + checksum = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8" 92 + dependencies = [ 93 + "indoc-impl", 94 + "proc-macro-hack", 95 + ] 96 + 97 + [[package]] 98 + name = "indoc-impl" 99 + version = "0.3.6" 100 + source = "registry+https://github.com/rust-lang/crates.io-index" 101 + checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0" 102 + dependencies = [ 103 + "proc-macro-hack", 104 + "proc-macro2", 105 + "quote", 106 + "syn", 107 + "unindent", 108 + ] 109 + 110 + [[package]] 111 + name = "instant" 112 + version = "0.1.12" 113 + source = "registry+https://github.com/rust-lang/crates.io-index" 114 + checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 115 + dependencies = [ 116 + "cfg-if", 117 + ] 118 + 119 + [[package]] 120 + name = "libc" 121 + version = "0.2.147" 122 + source = "registry+https://github.com/rust-lang/crates.io-index" 123 + checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 124 + 125 + [[package]] 126 + name = "lock_api" 127 + version = "0.4.10" 128 + source = "registry+https://github.com/rust-lang/crates.io-index" 129 + checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" 130 + dependencies = [ 131 + "autocfg", 132 + "scopeguard", 133 + ] 134 + 135 + [[package]] 136 + name = "memoffset" 137 + version = "0.9.0" 138 + source = "registry+https://github.com/rust-lang/crates.io-index" 139 + checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 140 + dependencies = [ 141 + "autocfg", 142 + ] 143 + 144 + [[package]] 145 + name = "num_cpus" 146 + version = "1.16.0" 147 + source = "registry+https://github.com/rust-lang/crates.io-index" 148 + checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 149 + dependencies = [ 150 + "hermit-abi", 151 + "libc", 152 + ] 153 + 154 + [[package]] 155 + name = "once_cell" 156 + version = "1.18.0" 157 + source = "registry+https://github.com/rust-lang/crates.io-index" 158 + checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 159 + 160 + [[package]] 161 + name = "parking_lot" 162 + version = "0.11.2" 163 + source = "registry+https://github.com/rust-lang/crates.io-index" 164 + checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 165 + dependencies = [ 166 + "instant", 167 + "lock_api", 168 + "parking_lot_core", 169 + ] 170 + 171 + [[package]] 172 + name = "parking_lot_core" 173 + version = "0.8.6" 174 + source = "registry+https://github.com/rust-lang/crates.io-index" 175 + checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" 176 + dependencies = [ 177 + "cfg-if", 178 + "instant", 179 + "libc", 180 + "redox_syscall", 181 + "smallvec", 182 + "winapi", 183 + ] 184 + 185 + [[package]] 186 + name = "paste" 187 + version = "0.1.18" 188 + source = "registry+https://github.com/rust-lang/crates.io-index" 189 + checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" 190 + dependencies = [ 191 + "paste-impl", 192 + "proc-macro-hack", 193 + ] 194 + 195 + [[package]] 196 + name = "paste-impl" 197 + version = "0.1.18" 198 + source = "registry+https://github.com/rust-lang/crates.io-index" 199 + checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" 200 + dependencies = [ 201 + "proc-macro-hack", 202 + ] 203 + 204 + [[package]] 205 + name = "proc-macro-hack" 206 + version = "0.5.20+deprecated" 207 + source = "registry+https://github.com/rust-lang/crates.io-index" 208 + checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" 209 + 210 + [[package]] 211 + name = "proc-macro2" 212 + version = "1.0.63" 213 + source = "registry+https://github.com/rust-lang/crates.io-index" 214 + checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" 215 + dependencies = [ 216 + "unicode-ident", 217 + ] 218 + 219 + [[package]] 220 + name = "pyheck" 221 + version = "0.1.5" 222 + dependencies = [ 223 + "heck", 224 + "pyo3", 225 + "rayon", 226 + ] 227 + 228 + [[package]] 229 + name = "pyo3" 230 + version = "0.15.2" 231 + source = "registry+https://github.com/rust-lang/crates.io-index" 232 + checksum = "d41d50a7271e08c7c8a54cd24af5d62f73ee3a6f6a314215281ebdec421d5752" 233 + dependencies = [ 234 + "cfg-if", 235 + "indoc", 236 + "libc", 237 + "parking_lot", 238 + "paste", 239 + "pyo3-build-config", 240 + "pyo3-macros", 241 + "unindent", 242 + ] 243 + 244 + [[package]] 245 + name = "pyo3-build-config" 246 + version = "0.15.2" 247 + source = "registry+https://github.com/rust-lang/crates.io-index" 248 + checksum = "779239fc40b8e18bc8416d3a37d280ca9b9fb04bda54b98037bb6748595c2410" 249 + dependencies = [ 250 + "once_cell", 251 + ] 252 + 253 + [[package]] 254 + name = "pyo3-macros" 255 + version = "0.15.2" 256 + source = "registry+https://github.com/rust-lang/crates.io-index" 257 + checksum = "00b247e8c664be87998d8628e86f282c25066165f1f8dda66100c48202fdb93a" 258 + dependencies = [ 259 + "pyo3-macros-backend", 260 + "quote", 261 + "syn", 262 + ] 263 + 264 + [[package]] 265 + name = "pyo3-macros-backend" 266 + version = "0.15.2" 267 + source = "registry+https://github.com/rust-lang/crates.io-index" 268 + checksum = "5a8c2812c412e00e641d99eeb79dd478317d981d938aa60325dfa7157b607095" 269 + dependencies = [ 270 + "proc-macro2", 271 + "pyo3-build-config", 272 + "quote", 273 + "syn", 274 + ] 275 + 276 + [[package]] 277 + name = "quote" 278 + version = "1.0.29" 279 + source = "registry+https://github.com/rust-lang/crates.io-index" 280 + checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" 281 + dependencies = [ 282 + "proc-macro2", 283 + ] 284 + 285 + [[package]] 286 + name = "rayon" 287 + version = "1.7.0" 288 + source = "registry+https://github.com/rust-lang/crates.io-index" 289 + checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" 290 + dependencies = [ 291 + "either", 292 + "rayon-core", 293 + ] 294 + 295 + [[package]] 296 + name = "rayon-core" 297 + version = "1.11.0" 298 + source = "registry+https://github.com/rust-lang/crates.io-index" 299 + checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" 300 + dependencies = [ 301 + "crossbeam-channel", 302 + "crossbeam-deque", 303 + "crossbeam-utils", 304 + "num_cpus", 305 + ] 306 + 307 + [[package]] 308 + name = "redox_syscall" 309 + version = "0.2.16" 310 + source = "registry+https://github.com/rust-lang/crates.io-index" 311 + checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 312 + dependencies = [ 313 + "bitflags", 314 + ] 315 + 316 + [[package]] 317 + name = "scopeguard" 318 + version = "1.1.0" 319 + source = "registry+https://github.com/rust-lang/crates.io-index" 320 + checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 321 + 322 + [[package]] 323 + name = "smallvec" 324 + version = "1.10.0" 325 + source = "registry+https://github.com/rust-lang/crates.io-index" 326 + checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 327 + 328 + [[package]] 329 + name = "syn" 330 + version = "1.0.109" 331 + source = "registry+https://github.com/rust-lang/crates.io-index" 332 + checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 333 + dependencies = [ 334 + "proc-macro2", 335 + "quote", 336 + "unicode-ident", 337 + ] 338 + 339 + [[package]] 340 + name = "unicode-ident" 341 + version = "1.0.9" 342 + source = "registry+https://github.com/rust-lang/crates.io-index" 343 + checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" 344 + 345 + [[package]] 346 + name = "unicode-segmentation" 347 + version = "1.10.1" 348 + source = "registry+https://github.com/rust-lang/crates.io-index" 349 + checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 350 + 351 + [[package]] 352 + name = "unindent" 353 + version = "0.1.11" 354 + source = "registry+https://github.com/rust-lang/crates.io-index" 355 + checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" 356 + 357 + [[package]] 358 + name = "winapi" 359 + version = "0.3.9" 360 + source = "registry+https://github.com/rust-lang/crates.io-index" 361 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 362 + dependencies = [ 363 + "winapi-i686-pc-windows-gnu", 364 + "winapi-x86_64-pc-windows-gnu", 365 + ] 366 + 367 + [[package]] 368 + name = "winapi-i686-pc-windows-gnu" 369 + version = "0.4.0" 370 + source = "registry+https://github.com/rust-lang/crates.io-index" 371 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 372 + 373 + [[package]] 374 + name = "winapi-x86_64-pc-windows-gnu" 375 + version = "0.4.0" 376 + source = "registry+https://github.com/rust-lang/crates.io-index" 377 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+57
pkgs/development/python-modules/pyheck/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , cargo 4 + , fetchFromGitHub 5 + , poetry-core 6 + , pytestCheckHook 7 + , pythonOlder 8 + , rustc 9 + , rustPlatform 10 + }: 11 + 12 + buildPythonPackage rec { 13 + pname = "pyheck"; 14 + version = "0.1.5"; 15 + format = "pyproject"; 16 + 17 + disabled = pythonOlder "3.7"; 18 + 19 + src = fetchFromGitHub { 20 + owner = "kevinheavey"; 21 + repo = "pyheck"; 22 + rev = "refs/tags/${version}"; 23 + hash = "sha256-mfXkrCbBaJ0da+taKJvfyU5NS43tYJWqtTUXiCLVoGQ="; 24 + }; 25 + 26 + cargoDeps = rustPlatform.importCargoLock { 27 + lockFile = ./Cargo.lock; 28 + }; 29 + 30 + postPatch = '' 31 + ln -s ${./Cargo.lock} Cargo.lock 32 + ''; 33 + 34 + nativeBuildInputs = [ 35 + cargo 36 + poetry-core 37 + rustc 38 + rustPlatform.cargoSetupHook 39 + rustPlatform.maturinBuildHook 40 + ]; 41 + 42 + nativeCheckInputs = [ 43 + pytestCheckHook 44 + ]; 45 + 46 + pythonImportsCheck = [ 47 + "pyheck" 48 + ]; 49 + 50 + meta = with lib; { 51 + description = "Python bindings for heck, the Rust case conversion library"; 52 + homepage = "https://github.com/kevinheavey/pyheck"; 53 + changelog = "https://github.com/kevinheavey/pyheck/blob/${version}/CHANGELOG.md"; 54 + license = licenses.mit; 55 + maintainers = with maintainers; [ fab ]; 56 + }; 57 + }
+50
pkgs/tools/security/deepsecrets/default.nix
··· 1 + { lib 2 + , python3 3 + , fetchFromGitHub 4 + }: 5 + 6 + python3.pkgs.buildPythonApplication rec { 7 + pname = "deepsecrets"; 8 + version = "1.0.6"; 9 + format = "pyproject"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "avito-tech"; 13 + repo = "deepsecrets"; 14 + rev = "refs/tags/v${version}"; 15 + hash = "sha256-VfIsPgStHcIYGbfrOs1mvgoq0ZoVSZwILFVBeMt/5Jc="; 16 + }; 17 + 18 + postPatch = '' 19 + substituteInPlace pyproject.toml \ 20 + --replace 'pyyaml = "^5.4.1"' 'pyyaml = "*"' \ 21 + --replace 'regex = "^2023.3.23"' 'regex = "*"' \ 22 + --replace 'mmh3 = "^3.0.0"' 'mmh3 = "*"' 23 + ''; 24 + 25 + nativeBuildInputs = with python3.pkgs; [ 26 + poetry-core 27 + ]; 28 + 29 + propagatedBuildInputs = with python3.pkgs; [ 30 + dotwiz 31 + mmh3 32 + ordered-set 33 + pydantic 34 + pygments 35 + pyyaml 36 + regex 37 + ]; 38 + 39 + pythonImportsCheck = [ 40 + "deepsecrets" 41 + ]; 42 + 43 + meta = with lib; { 44 + description = "Secrets scanner that understands code"; 45 + homepage = "https://github.com/avito-tech/deepsecrets"; 46 + changelog = "https://github.com/avito-tech/deepsecrets/releases/tag/v${version}"; 47 + license = licenses.mit; 48 + maintainers = with maintainers; [ fab ]; 49 + }; 50 + }
+4
pkgs/top-level/all-packages.nix
··· 38168 38168 38169 38169 deepsea = callPackage ../tools/security/deepsea { }; 38170 38170 38171 + deepsecrets = callPackage ../tools/security/deepsecrets { 38172 + python3 = python311; 38173 + }; 38174 + 38171 38175 deeptools = callPackage ../applications/science/biology/deeptools { python = python3; }; 38172 38176 38173 38177 deep-translator = with python3Packages; toPythonApplication deep-translator;
+4
pkgs/top-level/python-packages.nix
··· 3031 3031 inherit (pkgs) graphviz; 3032 3032 }; 3033 3033 3034 + dotwiz = callPackage ../development/python-modules/dotwiz { }; 3035 + 3034 3036 dotmap = callPackage ../development/python-modules/dotmap { }; 3035 3037 3036 3038 downloader-cli = callPackage ../development/python-modules/downloader-cli { }; ··· 7842 7844 pygnmi = callPackage ../development/python-modules/pygnmi { }; 7843 7845 7844 7846 pygti = callPackage ../development/python-modules/pygti { }; 7847 + 7848 + pyheck = callPackage ../development/python-modules/pyheck { }; 7845 7849 7846 7850 pyheos = callPackage ../development/python-modules/pyheos { }; 7847 7851