Skip to content

Commit fae0647

Browse files
authored
Move modules to lib. (#125)
Signed-off-by: Caroline Russell <[email protected]>
1 parent 5a9bff5 commit fae0647

File tree

12 files changed

+17
-19
lines changed

12 files changed

+17
-19
lines changed

blint/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import os
77
import sys
88

9-
from blint.analysis import AnalysisRunner, report
9+
from blint.lib.analysis import AnalysisRunner, report
1010
from blint.logger import LOG
11-
from blint.sbom import generate
12-
from blint.utils import gen_file_list
11+
from blint.lib.sbom import generate
12+
from blint.lib.utils import gen_file_list
1313

1414
BLINT_LOGO = """
1515
██████╗ ██╗ ██╗███╗ ██╗████████╗

blint/lib/__init__.py

Whitespace-only changes.

blint/analysis.py renamed to blint/lib/analysis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
from rich.progress import Progress
1515
from rich.terminal_theme import MONOKAI
1616

17-
from blint.binary import parse
17+
from blint.lib.binary import parse
1818

1919
# pylint: disable-next=unused-import
20-
from blint.checks import (
20+
from blint.lib.checks import (
2121
check_nx,
2222
check_pie,
2323
check_relro,
@@ -31,7 +31,7 @@
3131
)
3232
from blint.config import FIRST_STAGE_WORDS, PII_WORDS, get_int_from_env
3333
from blint.logger import LOG, console
34-
from blint.utils import create_findings_table, is_fuzzable_name, print_findings_table
34+
from blint.lib.utils import create_findings_table, is_fuzzable_name, print_findings_table
3535

3636
try:
3737
import importlib.resources # pylint: disable=ungrouped-imports

blint/android.py renamed to blint/lib/android.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import tempfile
66

7-
from blint.binary import parse, parse_dex
7+
from blint.lib.binary import parse, parse_dex
88
from blint.config import SYMBOL_DELIMITER
99
from blint.cyclonedx.spec import (
1010
Component,
@@ -14,7 +14,7 @@
1414
Type,
1515
)
1616
from blint.logger import LOG
17-
from blint.utils import check_command, create_component_evidence, find_files, unzip_unsafe
17+
from blint.lib.utils import check_command, create_component_evidence, find_files, unzip_unsafe
1818

1919
ANDROID_HOME = os.getenv("ANDROID_HOME")
2020
APKANALYZER_CMD = os.getenv("APKANALYZER_CMD")

blint/binary.py renamed to blint/lib/binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from blint.config import FIRST_STAGE_WORDS, PII_WORDS, get_float_from_env, get_int_from_env
1313
from blint.logger import DEBUG, LOG
14-
from blint.utils import (
14+
from blint.lib.utils import (
1515
camel_to_snake,
1616
calculate_entropy,
1717
check_secret,

blint/checks.py renamed to blint/lib/checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pylint: disable=missing-function-docstring,unused-argument
2-
from blint.utils import parse_pe_manifest
2+
from blint.lib.utils import parse_pe_manifest
33

44

55
def check_nx(f, metadata, rule_obj): # noqa

blint/sbom.py renamed to blint/lib/sbom.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import orjson
1010
from rich.progress import Progress
1111

12-
from blint.android import collect_app_metadata
13-
from blint.binary import parse
12+
from blint.lib.android import collect_app_metadata
13+
from blint.lib.binary import parse
1414
from blint.config import SYMBOL_DELIMITER
1515
from blint.cyclonedx.spec import (
1616
BomFormat,
@@ -28,7 +28,7 @@
2828
Type,
2929
)
3030
from blint.logger import LOG
31-
from blint.utils import (
31+
from blint.lib.utils import (
3232
camel_to_snake,
3333
create_component_evidence,
3434
find_android_files,
File renamed without changes.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "blint"
3-
version = "2.3.1"
3+
version = "2.3.2"
44
description = "Linter and SBOM generator for binary files."
55
authors = ["Prabhu Subramanian <[email protected]>", "Caroline Russell <[email protected]>"]
66
license = "MIT"

tests/test_analysis.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import orjson
22
from pathlib import Path
33

4-
from blint.analysis import ReviewRunner, run_checks
4+
from blint.lib.analysis import ReviewRunner, run_checks
55

66

77
def test_gobinary():
88
test_go_file = Path(__file__).parent / "data" / "ngrok-elf.json"
9-
# test_go_file = Path('C:\\Users\\user\\PycharmProjects\\blint\\tests\\data\\ngrok-elf.json')
109
with open(test_go_file) as fp:
1110
file_content = fp.read()
1211
metadata = orjson.loads(file_content)
@@ -21,7 +20,6 @@ def test_gobinary():
2120

2221
def test_genericbinary():
2322
test_gnu_file = Path(__file__).parent / "data" / "netstat-elf.json"
24-
# test_gnu_file = Path('data/netstat-elf.json')
2523
with open(test_gnu_file) as fp:
2624
file_content = fp.read()
2725
metadata = orjson.loads(file_content)

0 commit comments

Comments
 (0)