diff --git a/flake.lock b/flake.lock index 6b8dd47..131a15e 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1735774679, + "narHash": "sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq+raipRI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "f2f7418ce0ab4a5309a4596161d154cfc877af66", "type": "github" }, "original": { @@ -51,11 +51,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728018373, - "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "type": "github" }, "original": { @@ -67,14 +67,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1727825735, - "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "lastModified": 1735774519, + "narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" } }, "root": { @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1727984844, - "narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=", + "lastModified": 1735905407, + "narHash": "sha256-1hKMRIT+QZNWX46e4gIovoQ7H8QRb7803ZH4qSKI45o=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64", + "rev": "29806abab803e498df96d82dd6f34b32eb8dd2c8", "type": "github" }, "original": { diff --git a/src/sbomnix/sbomdb.py b/src/sbomnix/sbomdb.py index 1e4886c..b652960 100644 --- a/src/sbomnix/sbomdb.py +++ b/src/sbomnix/sbomdb.py @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 # pylint: disable=too-many-instance-attributes, too-many-arguments -# pylint: disable=too-many-locals, too-many-statements +# pylint: disable=too-many-locals, too-many-statements, too-many-positional-arguments """Module for generating SBOMs in various formats""" diff --git a/src/vulnxscan/vulnxscan_cli.py b/src/vulnxscan/vulnxscan_cli.py index bc705a0..c5d9b82 100755 --- a/src/vulnxscan/vulnxscan_cli.py +++ b/src/vulnxscan/vulnxscan_cli.py @@ -103,11 +103,10 @@ def _generate_sbom(target_path, buildtime=False): prefix = "vulnxscan_" cdx_suffix = ".json" csv_suffix = ".csv" - with NamedTemporaryFile( - delete=False, prefix=prefix, suffix=cdx_suffix - ) as fcdx, NamedTemporaryFile( - delete=False, prefix=prefix, suffix=csv_suffix - ) as fcsv: + with ( + NamedTemporaryFile(delete=False, prefix=prefix, suffix=cdx_suffix) as fcdx, + NamedTemporaryFile(delete=False, prefix=prefix, suffix=csv_suffix) as fcsv, + ): sbomdb.to_cdx(fcdx.name, printinfo=False) sbomdb.to_csv(fcsv.name, loglevel=logging.DEBUG) return pathlib.Path(fcdx.name), pathlib.Path(fcsv.name) diff --git a/tests/test_sbomnix.py b/tests/test_sbomnix.py index 40feb5c..fa36933 100644 --- a/tests/test_sbomnix.py +++ b/tests/test_sbomnix.py @@ -710,9 +710,10 @@ def __call__(self, uri): def validate_json(file_path, schema_path): """Validate json file matches schema""" - with open(file_path, encoding="utf-8") as json_file, open( - schema_path, encoding="utf-8" - ) as schema_file: + with ( + open(file_path, encoding="utf-8") as json_file, + open(schema_path, encoding="utf-8") as schema_file, + ): json_obj = json.load(json_file) schema_obj = json.load(schema_file) reg = referencing.Registry(retrieve=JSONSchemaRetrieve())