Skip to content

Commit 99f526a

Browse files
committed
Use individual arguments rather than passing the cli args for depscan compatibility.
Signed-off-by: Caroline Russell <[email protected]>
1 parent 2296933 commit 99f526a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

blint/analysis.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def __init__(self):
370370
self.task = None
371371
self.reviewer = None
372372

373-
def start(self, args, files, reports_dir):
373+
def start(self, files, reports_dir, reviews=False, fuzzables=False):
374374
"""Starts the analysis process for the given source files.
375375
376376
This function takes the command-line arguments and the reports
@@ -391,10 +391,10 @@ def start(self, args, files, reports_dir):
391391
f"[green] Blinting {len(files)} binaries",
392392
total=len(files), start=True, )
393393
for f in files:
394-
self._process_files(f, args, reports_dir)
394+
self._process_files(f, reports_dir, reviews, fuzzables)
395395
return self.findings, self.reviews, self.fuzzables
396396

397-
def _process_files(self, f, args, reports_dir):
397+
def _process_files(self, f, reports_dir, reviews, fuzzables):
398398
"""Processes the given file and generates findings.
399399
400400
Args:
@@ -419,10 +419,10 @@ def _process_files(self, f, args, reports_dir):
419419
if finding := run_checks(f, metadata):
420420
self.findings += finding
421421
# Perform symbol reviews
422-
if not args.no_reviews:
422+
if reviews:
423423
self.do_review(exe_name, f, metadata)
424424
# Suggest fuzzable targets
425-
if args.suggest_fuzzable and (fuzzdata := run_prefuzz(metadata)):
425+
if fuzzables and (fuzzdata := run_prefuzz(metadata)):
426426
self.fuzzables.append(
427427
{
428428
"filename": f,

blint/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ def main():
173173
else:
174174
files = gen_file_list(src_dirs)
175175
analyzer = AnalysisRunner()
176-
findings, reviews, fuzzables = analyzer.start(args, files, reports_dir)
176+
findings, reviews, fuzzables = analyzer.start(
177+
files, reports_dir, args.no_reviews, args.suggest_fuzzable
178+
)
177179
report(src_dirs, reports_dir, findings, reviews, files, fuzzables)
178180

179181
if os.getenv("CI") and not args.noerror:

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "blint"
3-
version = "2.0.0"
3+
version = "2.0.0-beta.2"
44
description = "Linter and SBOM generator for binary files."
55
authors = ["Prabhu Subramanian <[email protected]>", "Caroline Russell <[email protected]>"]
66
license = "Apache-2.0"
@@ -65,4 +65,3 @@ max-line-length = 99
6565
[tool.pylint.design]
6666
max-args = 6
6767
max-nested-blocks = 6
68-

0 commit comments

Comments
 (0)