blint 3.3.0__tar.gz → 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. blint-4.0.0/PKG-INFO +660 -0
  2. blint-4.0.0/README.md +613 -0
  3. blint-4.0.0/blint/__init__.py +22 -0
  4. blint-4.0.0/blint/api.py +255 -0
  5. {blint-3.3.0 → blint-4.0.0}/blint/cli.py +299 -3
  6. {blint-3.3.0 → blint-4.0.0}/blint/config.py +85 -16
  7. blint-4.0.0/blint/cyclonedx/README.md +14 -0
  8. blint-4.0.0/blint/cyclonedx/spdx.py +836 -0
  9. blint-4.0.0/blint/cyclonedx/spec.py +7426 -0
  10. blint-4.0.0/blint/data/annotations/review_binary_android.yml +174 -0
  11. blint-4.0.0/blint/data/annotations/review_callsites_generic.yml +36 -0
  12. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_functions_generic.yml +3 -3
  13. blint-4.0.0/blint/data/annotations/review_implants_elf.yml +96 -0
  14. blint-4.0.0/blint/data/annotations/review_managed_dotnet.yml +163 -0
  15. blint-4.0.0/blint/data/annotations/review_office_macros.yml +137 -0
  16. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_symbols_generic.yml +47 -0
  17. blint-4.0.0/blint/data/annotations/review_usermode_win.yml +70 -0
  18. blint-4.0.0/blint/data/macos_host_plugin_kinds.yml +122 -0
  19. blint-4.0.0/blint/data/pe_apisets.yml +920 -0
  20. blint-4.0.0/blint/data/pe_driver_kinds.yml +110 -0
  21. blint-4.0.0/blint/data/pe_host_plugin_contracts.yml +280 -0
  22. blint-4.0.0/blint/data/pe_ordinals.yml +1818 -0
  23. blint-4.0.0/blint/data/pe_publisher_identities.yml +35 -0
  24. blint-4.0.0/blint/data/pe_rich_compids.yml +4277 -0
  25. blint-4.0.0/blint/data/pe_roots.yml +207 -0
  26. blint-4.0.0/blint/data/pe_vulnerable_drivers.json +1 -0
  27. blint-4.0.0/blint/data/rules.yml +807 -0
  28. blint-4.0.0/blint/db.py +1926 -0
  29. blint-4.0.0/blint/lib/absint.py +3612 -0
  30. {blint-3.3.0 → blint-4.0.0}/blint/lib/analysis.py +263 -97
  31. blint-4.0.0/blint/lib/android.py +1631 -0
  32. blint-4.0.0/blint/lib/android_blintdb.py +175 -0
  33. blint-4.0.0/blint/lib/android_native.py +776 -0
  34. blint-4.0.0/blint/lib/android_reviews.py +402 -0
  35. {blint-3.3.0 → blint-4.0.0}/blint/lib/android_services.py +5 -7
  36. blint-4.0.0/blint/lib/banners.py +496 -0
  37. blint-4.0.0/blint/lib/binary.py +1912 -0
  38. blint-4.0.0/blint/lib/binary_common.py +1194 -0
  39. blint-4.0.0/blint/lib/binary_elf.py +1013 -0
  40. blint-4.0.0/blint/lib/binary_macho.py +1264 -0
  41. blint-4.0.0/blint/lib/binary_pe.py +1476 -0
  42. blint-4.0.0/blint/lib/binary_reviews.py +751 -0
  43. blint-4.0.0/blint/lib/binary_wasm.py +449 -0
  44. blint-4.0.0/blint/lib/cab.py +324 -0
  45. blint-4.0.0/blint/lib/cache.py +576 -0
  46. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/__init__.py +4 -5
  47. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/algorithms.py +2 -4
  48. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/api.py +12 -15
  49. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/canon.py +2 -5
  50. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/command.py +7 -9
  51. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/fingerprint.py +2 -3
  52. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/match.py +5 -7
  53. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/model.py +8 -9
  54. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph/rusi.py +4 -6
  55. blint-4.0.0/blint/lib/capabilities.py +208 -0
  56. blint-4.0.0/blint/lib/cfbf.py +516 -0
  57. blint-4.0.0/blint/lib/cfg.py +322 -0
  58. blint-4.0.0/blint/lib/checks.py +1460 -0
  59. blint-4.0.0/blint/lib/clickonce.py +184 -0
  60. blint-4.0.0/blint/lib/codesign_macho.py +779 -0
  61. blint-4.0.0/blint/lib/container.py +371 -0
  62. {blint-3.3.0 → blint-4.0.0}/blint/lib/dalvik.py +23 -25
  63. {blint-3.3.0 → blint-4.0.0}/blint/lib/dalvik_callgraph.py +3 -3
  64. {blint-3.3.0 → blint-4.0.0}/blint/lib/dalvik_cfg.py +21 -20
  65. {blint-3.3.0 → blint-4.0.0}/blint/lib/dalvik_dataflow.py +22 -23
  66. {blint-3.3.0 → blint-4.0.0}/blint/lib/dalvik_review.py +9 -9
  67. {blint-3.3.0 → blint-4.0.0}/blint/lib/dalvik_semantics.py +4 -5
  68. blint-4.0.0/blint/lib/diff.py +1386 -0
  69. blint-4.0.0/blint/lib/disassembler.py +3935 -0
  70. {blint-3.3.0 → blint-4.0.0}/blint/lib/driver_ioctl.py +155 -22
  71. {blint-3.3.0 → blint-4.0.0}/blint/lib/elf_abi.py +123 -77
  72. {blint-3.3.0 → blint-4.0.0}/blint/lib/elf_dlopen.py +22 -2
  73. {blint-3.3.0 → blint-4.0.0}/blint/lib/elf_linkmap.py +1 -1
  74. blint-4.0.0/blint/lib/entropy.py +406 -0
  75. blint-4.0.0/blint/lib/finding_ids.py +166 -0
  76. blint-4.0.0/blint/lib/framework_ident.py +785 -0
  77. blint-4.0.0/blint/lib/funcdisc/__init__.py +16 -0
  78. blint-4.0.0/blint/lib/funcdisc/complete.py +299 -0
  79. blint-4.0.0/blint/lib/funcdisc/unwind.py +786 -0
  80. {blint-3.3.0 → blint-4.0.0}/blint/lib/function_reviews.py +166 -32
  81. {blint-3.3.0 → blint-4.0.0}/blint/lib/implant_reviews.py +96 -6
  82. {blint-3.3.0 → blint-4.0.0}/blint/lib/import_attribution.py +93 -10
  83. {blint-3.3.0 → blint-4.0.0}/blint/lib/indicators.py +19 -0
  84. blint-4.0.0/blint/lib/installers.py +143 -0
  85. {blint-3.3.0 → blint-4.0.0}/blint/lib/ios.py +159 -27
  86. blint-4.0.0/blint/lib/jni.py +1415 -0
  87. blint-4.0.0/blint/lib/jni_findclass.py +2310 -0
  88. {blint-3.3.0 → blint-4.0.0}/blint/lib/macho_objc.py +291 -3
  89. blint-4.0.0/blint/lib/macos_bundle.py +638 -0
  90. blint-4.0.0/blint/lib/macos_host_plugins.py +314 -0
  91. blint-4.0.0/blint/lib/msi.py +472 -0
  92. blint-4.0.0/blint/lib/msix.py +703 -0
  93. blint-4.0.0/blint/lib/nuget_package.py +242 -0
  94. blint-4.0.0/blint/lib/office.py +1075 -0
  95. blint-4.0.0/blint/lib/parallel.py +493 -0
  96. blint-4.0.0/blint/lib/pe_catalog.py +713 -0
  97. blint-4.0.0/blint/lib/pe_constants.py +318 -0
  98. blint-4.0.0/blint/lib/pe_debug.py +418 -0
  99. blint-4.0.0/blint/lib/pe_dotnet.py +1883 -0
  100. blint-4.0.0/blint/lib/pe_dotnet_shape.py +412 -0
  101. blint-4.0.0/blint/lib/pe_driver.py +671 -0
  102. blint-4.0.0/blint/lib/pe_host_plugins.py +277 -0
  103. blint-4.0.0/blint/lib/pe_imports.py +423 -0
  104. blint-4.0.0/blint/lib/pe_ioctl_depth.py +326 -0
  105. blint-4.0.0/blint/lib/pe_kernel_posture.py +403 -0
  106. blint-4.0.0/blint/lib/pe_layout.py +494 -0
  107. blint-4.0.0/blint/lib/pe_overlay.py +244 -0
  108. blint-4.0.0/blint/lib/pe_resources.py +554 -0
  109. blint-4.0.0/blint/lib/pe_signature.py +1561 -0
  110. blint-4.0.0/blint/lib/pe_usermode_surface.py +293 -0
  111. blint-4.0.0/blint/lib/pe_vulnerable_drivers.py +112 -0
  112. blint-4.0.0/blint/lib/provisioning.py +365 -0
  113. {blint-3.3.0 → blint-4.0.0}/blint/lib/review_runner.py +78 -6
  114. blint-4.0.0/blint/lib/runners.py +1553 -0
  115. blint-4.0.0/blint/lib/safe_xml.py +32 -0
  116. blint-4.0.0/blint/lib/sbom.py +2964 -0
  117. blint-4.0.0/blint/lib/sevenz.py +706 -0
  118. blint-4.0.0/blint/lib/similarity.py +201 -0
  119. blint-4.0.0/blint/lib/stack_strings.py +101 -0
  120. blint-4.0.0/blint/lib/swift_metadata.py +311 -0
  121. blint-4.0.0/blint/lib/tbd_index.py +666 -0
  122. blint-4.0.0/blint/lib/toolchain.py +275 -0
  123. {blint-3.3.0 → blint-4.0.0}/blint/lib/utils.py +113 -20
  124. blint-4.0.0/blint/lib/windows_posture.py +147 -0
  125. {blint-3.3.0 → blint-4.0.0}/blint/logger.py +11 -1
  126. {blint-3.3.0 → blint-4.0.0}/pyproject.toml +35 -3
  127. blint-3.3.0/PKG-INFO +0 -326
  128. blint-3.3.0/README.md +0 -279
  129. blint-3.3.0/blint/cyclonedx/README.md +0 -6
  130. blint-3.3.0/blint/cyclonedx/spdx.py +0 -739
  131. blint-3.3.0/blint/cyclonedx/spec.py +0 -6073
  132. blint-3.3.0/blint/data/rules.yml +0 -339
  133. blint-3.3.0/blint/db.py +0 -772
  134. blint-3.3.0/blint/lib/__init__.py +0 -0
  135. blint-3.3.0/blint/lib/android.py +0 -906
  136. blint-3.3.0/blint/lib/binary.py +0 -3946
  137. blint-3.3.0/blint/lib/binary_reviews.py +0 -368
  138. blint-3.3.0/blint/lib/checks.py +0 -178
  139. blint-3.3.0/blint/lib/disassembler.py +0 -2303
  140. blint-3.3.0/blint/lib/runners.py +0 -297
  141. blint-3.3.0/blint/lib/sbom.py +0 -1648
  142. blint-3.3.0/blint/lib/stack_strings.py +0 -452
  143. {blint-3.3.0 → blint-4.0.0}/LICENSE +0 -0
  144. {blint-3.3.0/blint → blint-4.0.0/blint/cyclonedx}/__init__.py +0 -0
  145. {blint-3.3.0/blint/cyclonedx → blint-4.0.0/blint/data}/__init__.py +0 -0
  146. {blint-3.3.0 → blint-4.0.0}/blint/data/android-services.json +0 -0
  147. {blint-3.3.0/blint/data → blint-4.0.0/blint/data/annotations}/__init__.py +0 -0
  148. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_apple_local_privesc_mie.yml +0 -0
  149. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_drivers_win.yml +0 -0
  150. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_entries_generic.yml +0 -0
  151. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_entries_pe.yml +0 -0
  152. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_exe_go.yml +0 -0
  153. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_implants_pe.yml +0 -0
  154. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_imports_pe.yml +0 -0
  155. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_ios_fingerprint.yml +0 -0
  156. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_ios_masvs.yml +0 -0
  157. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_ios_privacy_access.yml +0 -0
  158. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_ios_privacy_posture.yml +0 -0
  159. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_ios_sidechannel.yml +0 -0
  160. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_methods_android.yml +0 -0
  161. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_methods_generic.yml +0 -0
  162. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_methods_mips.yml +0 -0
  163. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_methods_pe.yml +0 -0
  164. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_monero_generic.yml +0 -0
  165. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_monero_go.yml +0 -0
  166. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_monero_rust.yml +0 -0
  167. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_rootkits_win.yml +0 -0
  168. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_rpc_win.yml +0 -0
  169. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_symbols_antiforensic.yml +0 -0
  170. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_symbols_hooka.yml +0 -0
  171. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_symbols_macho.yml +0 -0
  172. {blint-3.3.0 → blint-4.0.0}/blint/data/annotations/review_symbols_rust.yml +0 -0
  173. {blint-3.3.0 → blint-4.0.0}/blint/data/trackers.json +0 -0
  174. {blint-3.3.0/blint/data/annotations → blint-4.0.0/blint/lib}/__init__.py +0 -0
  175. {blint-3.3.0 → blint-4.0.0}/blint/lib/callgraph_kpi.py +0 -0
  176. {blint-3.3.0 → blint-4.0.0}/blint/lib/crypto_constants.py +0 -0
  177. {blint-3.3.0 → blint-4.0.0}/blint/lib/review_utils.py +0 -0
blint-4.0.0/PKG-INFO ADDED
@@ -0,0 +1,660 @@
1
+ Metadata-Version: 2.4
2
+ Name: blint
3
+ Version: 4.0.0
4
+ Summary: Linter and SBOM generator for binary files.
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: linter,binary,security,sast
8
+ Author: Team AppThreat
9
+ Author-email: cloud@appthreat.com
10
+ Requires-Python: >=3.10,<3.15
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: Topic :: Utilities
15
+ Classifier: Topic :: Security
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Operating System :: OS Independent
22
+ Provides-Extra: dev
23
+ Requires-Dist: PyYAML (>=6.0.3)
24
+ Requires-Dist: apkInspector (>=1.3.6)
25
+ Requires-Dist: appdirs (>=1.4.4)
26
+ Requires-Dist: apsw (>=3.53.0.0)
27
+ Requires-Dist: ar (>=1.0.1)
28
+ Requires-Dist: custom-json-diff (>=2.1.6)
29
+ Requires-Dist: defusedxml (>=0.7.1)
30
+ Requires-Dist: flake8 (>=7.3.0) ; extra == "dev"
31
+ Requires-Dist: lief (>=0.17.4)
32
+ Requires-Dist: multi-demangle (>=2.1.0)
33
+ Requires-Dist: oras (>=0.2.41)
34
+ Requires-Dist: orjson (>=3.11.7)
35
+ Requires-Dist: packageurl-python (>=0.17.6)
36
+ Requires-Dist: pydantic[email] (>=2.13.3)
37
+ Requires-Dist: pyinstaller (>=6.20.0) ; extra == "dev"
38
+ Requires-Dist: pylint (>=4.0.5) ; extra == "dev"
39
+ Requires-Dist: pytest (>=9.0.3) ; extra == "dev"
40
+ Requires-Dist: pytest-cov (>=7.1.0) ; extra == "dev"
41
+ Requires-Dist: rich (>=15.0.0)
42
+ Requires-Dist: ruff (>=0.14.0) ; extra == "dev"
43
+ Requires-Dist: wasm-tools (>=2.1.0)
44
+ Project-URL: CI, https://github.com/owasp-dep-scan/blint/actions
45
+ Description-Content-Type: text/markdown
46
+
47
+ # blint
48
+
49
+ <img src="./blint.png" width="200" height="auto" />
50
+
51
+ [![AI-DECLARATION: pair](https://img.shields.io/badge/䷼%20AI--DECLARATION-pair-ffedd5?labelColor=ffedd5)](./AI-DECLARATION.md)
52
+
53
+ `blint` is a Binary Linter that checks the security properties and capabilities of your executables. It is powered by [lief](https://github.com/lief-project/LIEF) and can generate a Software Bill-of-Materials (SBOM) for supported binaries.
54
+
55
+ ## What is blint?
56
+
57
+ blint is a tool for reverse engineers, security analysts, and developers to quickly assess the security posture and composition of a binary file. In an age of statically-linked Golang, Rust, and .NET applications, understanding what's inside a binary is more important than ever. blint automates this initial triage process.
58
+
59
+ The default scan flows like this:
60
+
61
+ ```mermaid
62
+ flowchart TD
63
+ A["Inputs: binaries, directories, container images, app and package archives"] --> B["Discover analysis units (one per binary, bundle member, or container member)"]
64
+ B --> P["Parse each unit (ELF, PE, Mach-O, WASM readers plus the Android, installer, and bundle unpackers)"]
65
+ P --> M["*-metadata.json and analysis-coverage.json"]
66
+ P --> C["Security checks (rules.yml)"]
67
+ P --> R["Capability reviews (annotation rules)"]
68
+ D["--disassemble, opt-in: nyxstone plus abstract interpretation"] --> C
69
+ D --> R
70
+ D --> G["Callgraph exports (.mmd, .graphml, .gexf)"]
71
+ C --> O["findings.json, reviews.json, blint-output.html"]
72
+ R --> O
73
+ P -.->|"blint sbom"| S["CycloneDX 1.7 SBOM (1.6 selectable), optional blintdb and deep matching"]
74
+ ```
75
+
76
+ **Supported Binary Formats:**
77
+
78
+ - ELF (for GNU and musl libc)
79
+ - PE (Windows executables and DLLs), including .NET assemblies: metadata tables, strong-name facts, and publish shape (ReadyToRun, NativeAOT, single-file bundles)
80
+ - Mach-O (macOS and iOS, x64 and arm64), including Objective-C and Swift metadata
81
+ - iOS/macOS apps (`.ipa`, and on macOS also `.app`, `.framework`, and `.dSYM` bundles): the main executable, embedded frameworks, dylibs, and app extensions are all analyzed, and embedded provisioning profiles are decoded for the entitlements they grant
82
+ - Windows packages and documents: `.msi`/`.msp` databases, `.cab` archives, `.msix`/`.appx` packages and bundles, ClickOnce deployments, `.nupkg` archives, and Office documents (including VBA macro analysis)
83
+ - Android (APK, APKM, AAB, including DEX files in deep mode)
84
+ - WASM (WebAssembly modules)
85
+ - Disassembler: AArch64, x86/x86-64, i386, ARM and Thumb (armeabi-v7a), Mips, MicroMips (native), and Dalvik (DEX).
86
+
87
+ ## Key Features & Use Cases
88
+
89
+ - **Comprehensive Security Audits:** Automatically checks for common security mitigations like PIE, ASLR, NX, Stack Canaries, and RELRO. Ideal for ensuring your CI/CD pipeline produces hardened binaries.
90
+ - **Software Bill-of-Materials (SBOM) Generation:** Creates [CycloneDX](https://cyclonedx.org/specification/overview/) SBOMs for binaries built with Go, Rust, .NET, and Android toolchains, providing a clear inventory of third-party components for vulnerability management.
91
+ - **Deep Binary Inspection:** Disassembles, extracts, and analyzes a wealth of information including symbols, functions, dependencies, and build toolchains. This raw data is saved as a detailed JSON file.
92
+ - For a complete guide to all attributes in this file, see the [Technical Metadata Documentation](./docs/METADATA.md).
93
+ - For the custom CycloneDX properties blint adds to the BOM, see the [Custom Properties Documentation](./docs/CUSTOM_PROPERTIES.md).
94
+ - Navigate to the [disassembly guide](./docs/DISASSEMBLE.md).
95
+ - For callgraph internals and analyst-facing interpretation, see the [callgraph guide](./docs/CALLGRAPH.md).
96
+ - **Android Deep Analysis:** In deep mode blint parses the dex classes, detects bundled service and tracker SDKs, and runs a Dalvik behavioural review that decodes the bytecode and flags risky behaviours such as dynamic code loading, reflection, native command execution, weak cryptography, and cleartext networking. The findings are attached to the BOM as custom properties. When disassembly is enabled, blint also writes a Dalvik callgraph sidecar next to the BOM.
97
+ - **iOS/macOS App Analysis:** Point blint at an `.ipa` and it unpacks the app bundle, reads the `Info.plist` context (bundle id, version, minimum OS, FairPlay encryption status), and analyzes the main executable along with every embedded framework, dylib, and app extension. For Mach-O binaries, blint recovers Objective-C metadata (classes, superclasses, methods, protocols, and referenced selectors) and demangles Swift symbols, then surfaces iOS privacy capabilities such as location, camera, microphone, contacts, photos, telephony, motion, biometrics, and device fingerprinting. It also reports privacy and fingerprinting behaviours: passive device fingerprinting, installed-app probing, local-network scanning, cross-app tracking, and the app's `PrivacyInfo.xcprivacy` posture including undeclared "required reason" API usage.
98
+ - **Capability Analysis:** Identifies potentially sensitive capabilities by reviewing imported functions and symbols, such as network access, filesystem operations, or cryptographic API usage.
99
+ - Includes cluster-style behavioral reviews for low-level networking patterns (for example eBPF sock_ops usage, TUN interception stacks, raw packet injection primitives, and local DoH redirection indicators).
100
+ - **Windows Depth:** Windows inputs get a structured Authenticode walk (signers, timestamps, chains, signing class), kernel-driver posture (frameworks, IOCTL surfaces, HVCI compatibility, known vulnerable driver matching against a shipped loldrivers.io and Microsoft blocklist snapshot), installer and container unpacking (MSI, CAB, MSIX, 7z SFX, ClickOnce), and a .NET metadata reader that recovers assembly references, P/Invoke surfaces, and publish shape without executing anything.
101
+ - **Binary Diffing:** `blint diff` compares two versions of one binary (or two `*-metadata.json` exports) and reports metadata deltas, hardening regressions with per-property polarity, finding deltas paired across rebuilds, and, with `--disassemble`, a function-level delta keyed on content hashes.
102
+ - **Performance:** `--jobs N` analyzes binaries in parallel worker processes with byte-identical output, and `--cache` turns on a content-addressed parse cache so unchanged binaries are parsed once. `blint capabilities` prints the full catalog of checks and reviews the engine will run, in text or JSON.
103
+ - **CI/CD Integration:** Can be added to build pipelines to enforce security policies, such as requiring code signing on all release artifacts.
104
+ - **Fuzzing Target Identification:** Suggests interesting functions to target for fuzzing based on common patterns in function names (e.g., `parse`, `decode`, `copy`).
105
+ - **Extensible with Custom Rules:** Define your own capabilities and checks using simple [YAML rule files](./docs/RULES.md).
106
+
107
+ ## Installation
108
+
109
+ `blint` requires Python >= 3.10.
110
+
111
+ ```shell
112
+ pip install blint
113
+ ```
114
+
115
+ For **disassembly support**, which enables instruction-level analysis of functions, install the `extended` version. This includes the [nyxstone](https://github.com/emproof-com/nyxstone) disassembler.
116
+
117
+ ```shell
118
+ pip install blint[extended]
119
+ ```
120
+
121
+ ### Via Container Image
122
+
123
+ You can also run blint using the official container image available on GitHub Container Registry. This is a convenient way to run blint without installing Python or any dependencies on your host machine.
124
+
125
+ ```
126
+ docker run --rm -it -v $(pwd):/app -w /app ghcr.io/owasp-dep-scan/blint:latest -i /path/to/your/binary
127
+ ```
128
+
129
+ ## Quick Start
130
+
131
+ Analyze a binary and save the reports to the `/tmp/blint` directory:
132
+
133
+ ```shell
134
+ blint -i /bin/netstat -o /tmp/blint
135
+ ```
136
+
137
+ ```shell
138
+ docker run --rm -it -v /tmp:/tmp -v /bin:/app/bin -w /app ghcr.io/owasp-dep-scan/blint:latest -i /app/bin/netstat -o /tmp/blint
139
+ ```
140
+
141
+ Analyze a Go or Rust binary and get suggestions for fuzzing targets:
142
+
143
+ ```shell
144
+ blint -i /path/to/my-binary --suggest-fuzzable
145
+ ```
146
+
147
+ Analyze an iOS/macOS app (`.ipa`). blint unpacks the bundle and writes a separate
148
+ `*-metadata.json` for the main executable and each embedded framework, dylib, and
149
+ app extension. Add `--disassemble` for instruction-level analysis (Objective-C and
150
+ Swift call sites are resolved to imported APIs):
151
+
152
+ ```shell
153
+ blint -i /path/to/app.ipa -o /tmp/blint --disassemble
154
+ ```
155
+
156
+ Generate a CycloneDX SBOM for an Android application:
157
+
158
+ ```shell
159
+ blint sbom -i /path/to/app.apk -o sbom.cdx.json
160
+ ```
161
+
162
+ ```shell
163
+ docker run --rm -it -v /path/to:/app -w /app ghcr.io/owasp-dep-scan/blint:latest sbom -i /app/app.apk -o sbom.cdx.json
164
+ ```
165
+
166
+ For Android deep analysis, enable deep mode so the dex classes are parsed. This is what makes service and tracker detection and the Dalvik behavioural review possible. Deep mode also enables disassembly, which writes the Dalvik callgraph sidecar next to the BOM. Both `.apk` single files and `.apkm` split bundles are supported.
167
+
168
+ ```shell
169
+ blint sbom -i /path/to/app.apkm -o sbom.cdx.json --deep
170
+ ```
171
+
172
+ Attribute Mach-O imports against an Xcode SDK's `.tbd` stubs, so each imported symbol is confirmed against, and attributed to, the system library that actually exports it (see [`.tbd` SDK index](./docs/METADATA.md#the-tbd-sdk-index---sdk-path) in the metadata guide):
173
+
174
+ ```shell
175
+ blint -i /path/to/macho-binary -o /tmp/blint --sdk-path "$(xcrun --show-sdk-path)"
176
+ ```
177
+
178
+ The same flag exists on `blint sbom`, where it attributes and confirms the Mach-O dependency edges in the BOM.
179
+
180
+ ## Understanding the Output
181
+
182
+ blint produces several JSON artifacts in the specified reports directory.
183
+
184
+ | Filename | Purpose | Details |
185
+ | --------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
186
+ | `exename-metadata.json` | **Raw, detailed metadata** extracted from the binary. This is the source for all other reports. | Contains everything: headers, symbols, functions, dependencies, signature info, and more. See the **[Technical Metadata Documentation](./docs/METADATA.md)** for a full breakdown. |
187
+ | `exename-wasm-report.json` | **Raw WASM parser report** for WebAssembly inputs. | Generated for `.wasm` files and contains the full `wasm_tools` parser output, including section/function/instruction detail, extracted strings with secret/IoC screening, the labeled call graph, toolchain fingerprint, and the `component` interface inventory for Component Model binaries. |
188
+ | `findings.json` | A summary of the **security properties audit**. Designed for CI/CD integration. | Lists security mitigations like PIE, NX, and Stack Canaries and whether they are present. For WASM inputs, the `wasm_tools` analysis findings (`WASM-*`) are passed through as findings. |
189
+ | `analysis-coverage.json` | A run-level account of **what was actually analyzed**. | Counts units attempted, succeeded, failed, and skipped (per role), and records every failure and skip with a reason, so a clean result can never be mistaken for a blind one. |
190
+ | `reviews.json` | A summary of the **capability review**. | Lists detected capabilities (e.g., "networking", "file-read", "crypto") based on the symbols and functions found. |
191
+ | `fuzzables.json` | A list of **suggested functions to fuzz**, generated when using the `--suggest-fuzzable` flag. | Identifies functions with names that suggest data parsing or manipulation, which are often good candidates for fuzzing. |
192
+ | `exename-callgraph.mmd` | Mermaid callgraph export generated with `--export-callgraph-mermaid`. | Includes internal and unresolved edges; also embedded into `blint-output.html`. |
193
+ | `exename-callgraph.graphml` | GraphML callgraph export generated with `--export-callgraph-graphml`. | Useful for Gephi, Cytoscape, and NetworkX workflows. |
194
+ | `exename-callgraph.gexf` | GEXF callgraph export generated with `--export-callgraph-gexf`. | Useful for Gephi-centric large graph exploration. |
195
+ | `sbom-*.cdx.json` | The **Software Bill-of-Materials (SBOM)**, generated by the `sbom` sub-command. | A CycloneDX-formatted JSON file detailing the binary's components and dependencies. |
196
+
197
+ ## Advanced Usage: SBOM Generation with blintdb
198
+
199
+ For C and C++ binaries, identifying components from symbols alone can be imprecise. `blint` can use **blintdb**, a pre-compiled database built from real project outputs, to improve component identification with:
200
+
201
+ - project-level symbol matching
202
+ - binary-name hints
203
+ - optional disassembly hash matching when deep mode is enabled
204
+ - similarity-hash matching (function fuzzy hashes, and the binary import-set digest) when the database carries those columns, so a compiler-drifted recompile degrades to fuzzy matching instead of missing
205
+ - vendored-source banner detection: version strings a statically-linked vendored copy leaves in the binary, which attribute members of a static archive to the project they were compiled from
206
+
207
+ Databases with schema version 2 and version 3 are both supported; the similarity-hash columns are detected per database, so a v2 database (or one whose hash columns are unpopulated) keeps working with exact matching only. Matched components record this as an `internal:blintdb_fuzzy_layer` property (`active`, or a named `unavailable_*`/`inactive_*` state such as `unavailable_hash_columns_absent` or `inactive_no_disassembly`) so "the fuzzy layer found nothing" is never confused with "the fuzzy layer could not run".
208
+
209
+ The workflow is a two-step process:
210
+
211
+ 1. **Download the blintdb database:**
212
+
213
+ ```shell
214
+ blint db --download
215
+ ```
216
+
217
+ This downloads the database to the directory specified by the `BLINTDB_HOME` environment variable.
218
+
219
+ 2. **Generate the SBOM with blintdb enabled:**
220
+
221
+ ```shell
222
+ blint sbom -i /path/to/binary -o sbom.cdx.json --use-blintdb
223
+ ```
224
+
225
+ 3. **For higher-confidence native matching, enable deep mode:**
226
+
227
+ ```shell
228
+ blint sbom -i /path/to/binary -o sbom.cdx.json --use-blintdb --deep
229
+ ```
230
+
231
+ When `--use-blintdb` and `--deep` are set together, `blint` enables disassembly automatically and searches the database with function hashes before falling back to symbol evidence.
232
+
233
+ The generated SBOM keeps the inferred package purl and also records `internal:blintdb_*` evidence properties on matched components so you can review why a component was selected.
234
+
235
+ For repeatable end-to-end validation of local `blint-db` changes, use the integration script in `tests/scripts/validate_blintdb_small_corpus.py`. It builds and validates a versioned 15-case corpus split across Meson, vcpkg, and Homebrew, using the manifest stored in `tests/data/blintdb-small-corpus.json`.
236
+
237
+ The generated `summary.json` includes per-ecosystem provenance copied from the linked `blint-db` run metadata under `ecosystems.<name>.provenance`. That block mirrors `projects.selected_count`, `attempted_count`, `success_count`, `failure_count`, `status_counts`, and `build_failures`. Each `projects.build_failures[]` entry is a flattened per-project failure record with stable keys such as `selector`, `project_name`, `ecosystem`, `build_system`, `status`, `stage`, and `message`, plus optional details like `returncode` or `exception_type` when they are available.
238
+
239
+ ## WebAssembly Component Model SBOM
240
+
241
+ `blint sbom` skips `.wasm` inputs by default. Pass `--wasm-sbom` to include Component Model binaries: their imported WIT interface packages (for example `wasi:cli` at `0.2.0`) are emitted as required library components, and the wasm binary itself becomes the application parent.
242
+
243
+ The purls are built from exact import evidence only (`pkg:generic/wasi/cli@0.2.0?type=wasm` maps the WIT namespace/package identity; the `type=wasm` qualifier follows the format proposed in the wasm-tools dependency research notes). Exported interfaces are recorded as a property on the parent rather than as dependencies, because they are capabilities the binary provides. Core modules are skipped: their imports carry no package identity, so no versionless or fuzzy guesses are emitted.
244
+
245
+ ```shell
246
+ blint sbom -i /path/to/component.wasm -o sbom.cdx.json --wasm-sbom
247
+ ```
248
+
249
+ ## Environment Variables
250
+
251
+ - `BLINTDB_HOME`, `BLINTDB_IMAGE_URL`, `BLINTDB_REFRESH`: Control blintdb download location, source image, and refresh behavior.
252
+ - `BLINT_GLIBC_BASELINE`: Oldest glibc your deployment target ships (for example `2.28` for RHEL 8), used by the `CHECK_ABI_FLOOR` security check. A binary whose GLIBC symbol-version floor exceeds a baseline set here is a `medium` finding; without it the check compares against its built-in default (`2.28` in `rules.yml`) and reports at `info`, saying the default was used. musl and bionic binaries never fire the check. The `--glibc-baseline` CLI option is the same setting and wins when both are given. A value that is not a dotted version is ignored with a warning.
253
+ - `BLINT_CACHE_DIR`: Where the content-addressed parse cache (enabled with `--cache`) stores its database. Defaults to the per-user cache directory.
254
+ - `BLINT_CACHE_MAX_BYTES`: Size bound for the parse cache. Default is 1 GiB; `0` disables eviction.
255
+ - `BLINT_MAX_HEX_BYTES`: Maximum number of raw bytes converted to hex when metadata contains undecodable byte sequences. Default is `4096`.
256
+ - `0` disables truncation.
257
+ - When truncation happens, blint appends `...<truncated:N_bytes>` to preserve context without producing huge JSON fields.
258
+ - `BLINT_MAX_WASM_INSTRUCTIONS`: Total instruction-stream budget for each `*-wasm-report.json`. Instruction streams are the only unbounded part of the wasm parser output and dominate the report size for large modules. Default is `50000`; `0` disables the cap.
259
+ - The budget is divided max-min fair across every function in the report, so short functions keep their whole body and the remainder goes to the long ones, rather than the first functions in section order consuming everything.
260
+ - Trimmed functions keep their truthful `instruction_count` and gain an `instructions_truncated` count, and the report gains a top-level `blint_truncation` block recording the budget, the instructions dropped, and how many functions were affected.
261
+ - `BLINT_RESOLVE_LINK_CLOSURE`: Set to `1` to resolve each ELF binary's dynamic dependency closure the way the loader would, reporting libraries that cannot be found, imported symbols nothing in the closure defines, and search paths that let an untrusted directory answer first. Off by default, because resolution reads the filesystem the scan runs on and is only meaningful when that filesystem is the binary's intended runtime. Results land in the `link_closure` metadata block.
262
+ - `BLINT_LINK_ROOT`: Filesystem root to resolve against. Point this at an unpacked container image or sysroot rather than at the scanning host. Default is `/`.
263
+ - `BLINT_LINK_SEARCH_PATH`: Extra directories treated as if they were in `LD_LIBRARY_PATH`, separated by the platform path separator.
264
+
265
+ ## Command-Line Reference
266
+
267
+ Every block below is the output of `<command> --help` on this version
268
+ (default paths shown as `<user data dir>` are platform dependent).
269
+
270
+ <details>
271
+ <summary><strong>Main Command Help</strong></summary>
272
+
273
+ ```shell
274
+ usage: blint [-h] [-i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]] [-o REPORTS_DIR]
275
+ [--no-error] [--no-banner] [--no-reviews] [--no-wasm-strings]
276
+ [--no-wasm-call-graph] [--suggest-fuzzable] [--use-blintdb]
277
+ [--disassemble] [--export-callgraph-mermaid]
278
+ [--export-callgraph-graphml] [--export-callgraph-gexf]
279
+ [--callgraph-min-confidence {low,medium,high}]
280
+ [--custom-rules-dir CUSTOM_RULES_DIR] [--catalog-dir CATALOG_DIR]
281
+ [--sdk-path SDK_PATH] [--cache] [--jobs JOBS]
282
+ [--glibc-baseline VERSION] [-q]
283
+ {sbom,callgraph-match,canonicalize,capabilities,diff,db,cache} ...
284
+
285
+ Binary linter and SBOM generator.
286
+
287
+ options:
288
+ -h, --help show this help message and exit
289
+ -i, --src SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]
290
+ Source directories, container images or binary files.
291
+ Defaults to current directory.
292
+ -o, --reports REPORTS_DIR
293
+ Reports directory. Defaults to reports.
294
+ --no-error Continue on error to prevent build from breaking.
295
+ --no-banner Do not display banner.
296
+ --no-reviews Do not perform method reviews.
297
+ --no-wasm-strings Do not extract strings from wasm files. Shrinks the
298
+ wasm report and disables the string-based wasm
299
+ findings (e.g. WASM-STR-007).
300
+ --no-wasm-call-graph Do not build the wasm_tools call graph for wasm files.
301
+ Shrinks the wasm report and disables wasm callgraph
302
+ exports.
303
+ --suggest-fuzzable Suggest functions and symbols for fuzzing based on a
304
+ dictionary.
305
+ --use-blintdb Use blintdb v2 for symbol resolution where supported.
306
+ Defaults to true if the file exists at
307
+ /Users/appthreat/Library/Application
308
+ Support/blintdb/blint.db. Use environment variables:
309
+ BLINTDB_IMAGE_URL, BLINTDB_HOME, and BLINTDB_REFRESH
310
+ for customization.
311
+ --disassemble Disassemble functions and store the instructions in
312
+ the metadata. Requires blint extended group to be
313
+ installed.
314
+ --export-callgraph-mermaid
315
+ Export callgraph as Mermaid (.mmd) files and embed
316
+ diagrams into blint-output.html. Effective when
317
+ --disassemble is enabled.
318
+ --export-callgraph-graphml
319
+ Export callgraph as GraphML for external graph
320
+ analysis tools. Effective when --disassemble is
321
+ enabled.
322
+ --export-callgraph-gexf
323
+ Export callgraph as GEXF for Gephi and other graph
324
+ tooling. Effective when --disassemble is enabled.
325
+ --callgraph-min-confidence {low,medium,high}
326
+ Filter exported callgraph edges/external links by
327
+ confidence. Defaults to low (no filtering).
328
+ --custom-rules-dir CUSTOM_RULES_DIR
329
+ Path to a directory containing custom YAML rule files
330
+ (.yml or .yaml). These will be loaded in addition to
331
+ default rules.
332
+ --catalog-dir CATALOG_DIR
333
+ Path to a directory of .cat catalog files (a copied
334
+ CatRoot tree) used to resolve catalog-signed PEs that
335
+ carry no embedded signature. Off by default: without
336
+ it code_signature.scope stays 'none' with
337
+ catalog_lookup 'not_performed' and no unsigned claim
338
+ is made.
339
+ --sdk-path SDK_PATH Path to an Apple SDK root whose .tbd stubs are used to
340
+ attribute and confirm Mach-O imports (for example the
341
+ path printed by `xcrun --show-sdk-path`). Off by
342
+ default; the path must contain .tbd files or the run
343
+ aborts.
344
+ --cache Use the content-addressed parse metadata cache: reuse
345
+ the parse result for a binary already analyzed with
346
+ the same bytes, blint version and options. Off by
347
+ default; see `blint cache stats`.
348
+ --jobs JOBS Analyze up to N binaries in parallel worker processes.
349
+ Accepts a positive integer, 0 or 'auto' for the CPU
350
+ count. Defaults to 1 (sequential, unchanged behavior).
351
+ --glibc-baseline VERSION
352
+ Oldest glibc your deployment target ships (for example
353
+ 2.28 for RHEL 8). CHECK_ABI_FLOOR compares each
354
+ binary's GLIBC symbol-version floor against it; a
355
+ floor above a baseline set here is a medium finding,
356
+ above the built-in default it is info. Equivalent to
357
+ the BLINT_GLIBC_BASELINE environment variable; the
358
+ option wins when both are given.
359
+ -q, --quiet Disable logging and progress bars.
360
+
361
+ sub-commands:
362
+ Additional sub-commands
363
+
364
+ {sbom,callgraph-match,canonicalize,capabilities,diff,db,cache}
365
+ sbom Command to generate SBOM for supported binaries.
366
+ callgraph-match Match a source callgraph against a binary callgraph.
367
+ canonicalize Show the canonical form of one or more function names.
368
+ capabilities Emit the catalog of checks and reviews blint analyzes
369
+ with.
370
+ diff Compare two versions of a binary (binaries or
371
+ *-metadata.json files).
372
+ db Command to manage the pre-compiled database.
373
+ cache Manage the content-addressed parse metadata cache.
374
+ ```
375
+
376
+ </details>
377
+
378
+ <details>
379
+ <summary><strong>SBOM Sub-command Help</strong></summary>
380
+
381
+ ```shell
382
+ usage: blint sbom [-h] [-i SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]] [-o SBOM_OUTPUT]
383
+ [--deep] [--stdout] [-q]
384
+ [--exports-prefix EXPORTS_PREFIX [EXPORTS_PREFIX ...]]
385
+ [--bom-src SRC_DIR_BOMS [SRC_DIR_BOMS ...]] [--use-blintdb]
386
+ [--wasm-sbom] [--jobs JOBS] [--sdk-path SDK_PATH]
387
+
388
+ options:
389
+ -h, --help show this help message and exit
390
+ -i, --src SRC_DIR_IMAGE [SRC_DIR_IMAGE ...]
391
+ Source directories, container images or binary files.
392
+ Defaults to current directory.
393
+ -o, --output-file SBOM_OUTPUT
394
+ SBOM output file. Defaults to sbom-binary-
395
+ postbuild.cdx.json in current directory.
396
+ --deep Enable deep mode to collect more used symbols and
397
+ modules aggressively. Slow operation. Enables
398
+ disassembly automatically (function-hash lookup with
399
+ --use-blintdb, dex callgraph export for android apps).
400
+ --stdout Print the SBOM to stdout instead of a file.
401
+ -q, --quiet Disable logging and progress bars.
402
+ --exports-prefix EXPORTS_PREFIX [EXPORTS_PREFIX ...]
403
+ prefixes for the exports to be included in the SBOM.
404
+ --bom-src SRC_DIR_BOMS [SRC_DIR_BOMS ...]
405
+ Directories containing pre-build and build BOMs. Use
406
+ to improve the precision.
407
+ --use-blintdb Use blintdb v2 for symbol and disassembly-hash
408
+ resolution. Defaults to true if the file exists at
409
+ <user data dir>/blintdb/blint.db. Use environment variables:
410
+ BLINTDB_IMAGE_URL, BLINTDB_HOME, and BLINTDB_REFRESH
411
+ for customization.
412
+ --wasm-sbom Emit SBOM components from WebAssembly Component Model
413
+ binaries using their imported WIT interface packages
414
+ (e.g. wasi:cli@0.2.0) as exact evidence. Core modules
415
+ without component-model evidence are skipped.
416
+ --jobs JOBS Parse up to N binaries in parallel worker processes.
417
+ Accepts a positive integer, 0 or 'auto' for the CPU
418
+ count. Defaults to 1 (sequential, unchanged behavior).
419
+ --sdk-path SDK_PATH Path to an Apple SDK root whose .tbd stubs are used to
420
+ attribute and confirm Mach-O dependency edges. Off by
421
+ default; the path must contain .tbd files or the run
422
+ aborts.
423
+ ```
424
+
425
+ </details>
426
+
427
+ <details>
428
+ <summary><strong>Callgraph-Match Sub-command Help</strong></summary>
429
+
430
+ Matches a callgraph recovered from a compiled binary against one produced from
431
+ source code, so binary functions can be identified even when the binary is
432
+ stripped. Give it a source side (<code>--source</code> JSON or <code>--source-dir</code>,
433
+ analyzed for you when it is a Rust crate) and a binary side (<code>--binary</code>, or
434
+ <code>--binary-metadata</code> from a previous blint run). The primary quality knob is
435
+ <code>--profile</code>; the <code>--min-votes</code>/<code>--margin</code>/<code>--khop</code>/<code>--fp-*</code>
436
+ flags are expert overrides of that preset. The full guide covers layers, defaults, and
437
+ honest accuracy results: [Callgraph matching](./docs/CALLGRAPH_MATCH.md).
438
+
439
+ ```shell
440
+ usage: blint callgraph-match [-h] [--source SOURCE_CALLGRAPH]
441
+ [--source-dir SOURCE_DIR] [-l MATCH_LANGUAGE]
442
+ [--rusi-cmd MATCH_RUSI_CMD]
443
+ [--profile {precision,balanced,recall}]
444
+ [--binary MATCH_BINARY]
445
+ [--binary-metadata MATCH_BINARY_METADATA]
446
+ [-o MATCH_OUTPUT]
447
+ [--min-confidence {low,medium,high}]
448
+ [--algorithm {anchors,layered}]
449
+ [--no-propagation] [--with-fingerprint]
450
+ [--min-votes MATCH_MIN_VOTES]
451
+ [--margin MATCH_MARGIN]
452
+ [--max-iterations MATCH_MAX_ITERATIONS]
453
+ [--khop MATCH_KHOP]
454
+ [--fp-min-shared MATCH_FP_MIN_SHARED]
455
+ [--fp-min-score MATCH_FP_MIN_SCORE]
456
+ [--fp-margin MATCH_FP_MARGIN] [-q]
457
+
458
+ options:
459
+ -h, --help show this help message and exit
460
+ --source SOURCE_CALLGRAPH
461
+ Path to a source-analysis callgraph JSON file.
462
+ Alternatively use --source-dir to analyze a source
463
+ tree directly.
464
+ --source-dir SOURCE_DIR
465
+ Path to a source tree to analyze (instead of
466
+ --source). For Rust this runs rusi for you; set
467
+ --rusi-cmd or the RUSI_CMD environment variable.
468
+ -l, --language MATCH_LANGUAGE
469
+ Source language for --source-dir analysis. Defaults to
470
+ rust. rusi is invoked only when the language is rust.
471
+ --rusi-cmd MATCH_RUSI_CMD
472
+ Base command used to invoke rusi when --source-dir is
473
+ a Rust project, for example 'cargo run -p rusi-cli --'
474
+ or a path to a rusi binary. Falls back to the RUSI_CMD
475
+ environment variable.
476
+ --profile {precision,balanced,recall}
477
+ Confidence preset that sets the matching knobs.
478
+ precision favors high-confidence matches, recall
479
+ enables structural fingerprinting, balanced is the
480
+ default. Individual --min-votes/--margin/--khop/--fp-*
481
+ flags override the preset.
482
+ --binary MATCH_BINARY
483
+ Path to a binary to parse with disassembly. Used when
484
+ --binary-metadata is not supplied.
485
+ --binary-metadata MATCH_BINARY_METADATA
486
+ Path to a pre-generated blint *-metadata.json file.
487
+ -o, --output MATCH_OUTPUT
488
+ Write the full JSON match report to this path.
489
+ --min-confidence {low,medium,high}
490
+ Minimum confidence for matches listed in the report.
491
+ Defaults to low.
492
+ --algorithm {anchors,layered}
493
+ Matching algorithm to use. Defaults to layered.
494
+ --no-propagation Disable structural propagation and report only name-
495
+ based anchors.
496
+ --with-fingerprint Enable experimental Layer 2 structural fingerprint
497
+ matching. Best suited to densely resolved callgraphs;
498
+ may reduce precision on sparse ones.
499
+ --min-votes MATCH_MIN_VOTES
500
+ Layer 1: minimum agreeing matched neighbors to accept
501
+ a propagated match. Overrides the --profile preset.
502
+ --margin MATCH_MARGIN
503
+ Layer 1: minimum vote lead over the runner-up.
504
+ Overrides the preset.
505
+ --max-iterations MATCH_MAX_ITERATIONS
506
+ Maximum propagation/fingerprint rounds. Overrides the
507
+ preset.
508
+ --khop MATCH_KHOP Layer 2: hop radius for fingerprint context. Overrides
509
+ the preset.
510
+ --fp-min-shared MATCH_FP_MIN_SHARED
511
+ Layer 2: minimum shared anchored neighbor names.
512
+ Overrides the preset.
513
+ --fp-min-score MATCH_FP_MIN_SCORE
514
+ Layer 2: minimum combined Jaccard score to accept.
515
+ Overrides the preset.
516
+ --fp-margin MATCH_FP_MARGIN
517
+ Layer 2: minimum Jaccard lead over the runner-up.
518
+ Overrides the preset.
519
+ -q, --quiet Disable logging and progress bars.
520
+ ```
521
+
522
+ </details>
523
+
524
+ <details>
525
+ <summary><strong>Canonicalize Sub-command Help</strong></summary>
526
+
527
+ ```shell
528
+ usage: blint canonicalize [-h] [--json] names [names ...]
529
+
530
+ positional arguments:
531
+ names Function names or raw mangled symbols to canonicalize.
532
+
533
+ options:
534
+ -h, --help show this help message and exit
535
+ --json Emit the result as JSON instead of a table.
536
+ ```
537
+
538
+ </details>
539
+
540
+ <details>
541
+ <summary><strong>Capabilities Sub-command Help</strong></summary>
542
+
543
+ ```shell
544
+ usage: blint capabilities [-h] [--json]
545
+
546
+ options:
547
+ -h, --help show this help message and exit
548
+ --json Emit the catalog as JSON (machine readable; for agents and
549
+ tooling).
550
+ ```
551
+
552
+ </details>
553
+
554
+ <details>
555
+ <summary><strong>Diff Sub-command Help</strong></summary>
556
+
557
+ Compare two versions of one binary. Inputs may be binaries or exported
558
+ <code>*-metadata.json</code> files. The report covers metadata deltas
559
+ (imports, exports, dependencies, entitlements, sections, identity),
560
+ hardening regressions with an explicit per-property polarity, finding and
561
+ capability-review deltas paired across rebuilds, and, with
562
+ <code>--disassemble</code>, a function-level delta keyed on content hashes,
563
+ so a recompile is not reported as rewritten code.
564
+
565
+ ```shell
566
+ usage: blint diff [-h] [--json] [--disassemble] [--no-reviews] [-q]
567
+ old_input new_input
568
+
569
+ positional arguments:
570
+ old_input Old version: a binary or a blint *-metadata.json export.
571
+ new_input New version: a binary or a blint *-metadata.json export.
572
+
573
+ options:
574
+ -h, --help show this help message and exit
575
+ --json Emit the diff report as JSON (machine readable; for agents
576
+ and tooling).
577
+ --disassemble Disassemble binary inputs so the function-level delta
578
+ (added/removed/changed by content hash) can be computed.
579
+ Metadata-JSON inputs carry disassembly only if they were
580
+ generated with --disassemble.
581
+ --no-reviews Skip the capability-review delta.
582
+ -q, --quiet Disable logging and progress bars.
583
+ ```
584
+
585
+ </details>
586
+
587
+ <details>
588
+ <summary><strong>DB Sub-command Help</strong></summary>
589
+
590
+ ```shell
591
+ usage: blint db [-h] [--download]
592
+ [--image-url {ghcr.io/appthreat/blintdb-vcpkg:v2,ghcr.io/appthreat/blintdb-vcpkg-arm64:v2,ghcr.io/appthreat/blintdb-vcpkg-darwin-arm64:v2,ghcr.io/appthreat/blintdb-vcpkg-musl:v2,ghcr.io/appthreat/blintdb-meson:v2,ghcr.io/appthreat/blintdb-meson-arm64:v2,ghcr.io/appthreat/blintdb-meson-darwin-arm64:v2,ghcr.io/appthreat/blintdb-meson-musl:v2}]
593
+
594
+ options:
595
+ -h, --help show this help message and exit
596
+ --download Download the pre-compiled database to the
597
+ <user data dir>/blintdb
598
+ directory. Use the environment variable `BLINTDB_HOME`
599
+ to override.
600
+ --image-url {ghcr.io/appthreat/blintdb-vcpkg:v2,ghcr.io/appthreat/blintdb-vcpkg-arm64:v2,ghcr.io/appthreat/blintdb-vcpkg-darwin-arm64:v2,ghcr.io/appthreat/blintdb-vcpkg-musl:v2,ghcr.io/appthreat/blintdb-meson:v2,ghcr.io/appthreat/blintdb-meson-arm64:v2,ghcr.io/appthreat/blintdb-meson-darwin-arm64:v2,ghcr.io/appthreat/blintdb-meson-musl:v2}
601
+ Blintdb image url. Defaults to
602
+ ghcr.io/appthreat/blintdb-vcpkg-darwin-arm64:v2. The
603
+ environment variable `BLINTDB_IMAGE_URL` is an
604
+ alternative way to set this value.
605
+ ```
606
+
607
+ The default `--image-url` is platform dependent (the dump above was captured on macOS arm64, hence the `darwin-arm64` image); pick the image matching your platform and architecture from the listed choices.
608
+
609
+ </details>
610
+
611
+ <details>
612
+ <summary><strong>Cache Sub-command Help</strong></summary>
613
+
614
+ ```shell
615
+ usage: blint cache [-h] {clear,stats} ...
616
+
617
+ options:
618
+ -h, --help show this help message and exit
619
+
620
+ cache-actions:
621
+ Cache management actions
622
+
623
+ {clear,stats}
624
+ clear Delete all cached parse metadata.
625
+ stats Show cache location, entry count and actual size on disk.
626
+ ```
627
+
628
+ </details>
629
+
630
+ ## Python API
631
+
632
+ Analyze a single binary in process, with the same engine the CLI uses:
633
+
634
+ ```python
635
+ from blint import analyze, NotABinaryError
636
+
637
+ result = analyze("/path/to/binary", disassemble=True)
638
+ result.metadata # parsed metadata (same content as *-metadata.json)
639
+ result.findings # security-check findings, each with a stable finding_id
640
+ result.reviews # capability reviews
641
+ result.fuzzables # fuzzable targets (suggest_fuzzable=True)
642
+ result.coverage # run-level analysis_coverage block (units, failures, skips)
643
+ ```
644
+
645
+ `analyze()` writes no report files. A missing path raises `FileNotFoundError`, a file blint cannot parse raises `NotABinaryError`, and a failed analysis raises `AnalysisFailedError` with the structured failure record attached, so a clean result can never be mistaken for a blind one. Calls are serialized by an internal lock (the engine's rule state is module-global); sequential calls with different options each see their own rules.
646
+
647
+ Every finding carries a `finding_id`: a content hash over `(rule id, binary sha256, evidence locator)`, deliberately not over titles, descriptions, paths or the blint version, so findings can be tracked, suppressed and diffed across runs on the same bytes.
648
+
649
+ ## References
650
+
651
+ - [Lessons from building blint v4](./docs/LESSONS.md)
652
+ - [lief examples](https://github.com/lief-project/LIEF/tree/master/examples)
653
+ - [checksec.py](https://github.com/slimm609/checksec.py)
654
+
655
+ ## Sponsorship
656
+
657
+ If you love `blint`, please consider [donating to our project](https://owasp.org/donate?reponame=www-project-dep-scan&title=OWASP+dep-scan). In addition, `blint` is made possible by the incredible work of the LIEF project. Please consider sponsoring them as well.
658
+
659
+ - [LIEF Project](https://github.com/sponsors/lief-project/)
660
+