# SBOM Analyzer Inventory ## Overview This document provides a complete inventory of all analyzers used in StellaOps SBOM generation. The Scanner module employs 20+ specialized analyzers organized into four categories: Language, OS/Distribution, Surface, and Capability analyzers. --- ## Analyzer Architecture ``` ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ SCANNER ANALYZER ARCHITECTURE │ └─────────────────────────────────────────────────────────────────────────────────────┘ ┌─────────────────────┐ │ Container Image │ │ (OCI/tar/dir) │ └──────────┬──────────┘ │ ┌──────────▼──────────┐ │ Layer Extractor │ │ (FS reconstruction)│ └──────────┬──────────┘ │ ┌──────────────────────────────┼──────────────────────────────┐ │ │ │ ▼ ▼ ▼ ┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐ │ LANGUAGE ANALYZERS │ │ OS ANALYZERS │ │ SURFACE ANALYZERS │ │ (11) │ │ (9) │ │ (4) │ ├─────────────────────┤ ├─────────────────────┤ ├─────────────────────┤ │ • DotNetAnalyzer │ │ • APKAnalyzer │ │ • FSAnalyzer │ │ • JavaAnalyzer │ │ • DPKGAnalyzer │ │ • EnvAnalyzer │ │ • NodeAnalyzer │ │ • RPMAnalyzer │ │ • SecretsAnalyzer │ │ • PythonAnalyzer │ │ • HomebrewAnalyzer │ │ • ValidationAnalyzer│ │ • GoAnalyzer │ │ • PkgutilAnalyzer │ └─────────────────────┘ │ • RustAnalyzer │ │ • MacOsBundleAnalyzer │ • PhpAnalyzer │ │ • ChocolateyAnalyzer│ ┌─────────────────────┐ │ • RubyAnalyzer │ │ • MSIAnalyzer │ │CAPABILITY ANALYZERS │ │ • DenoAnalyzer │ │ • WinSxSAnalyzer │ │ (1) │ │ • BunAnalyzer │ └─────────────────────┘ ├─────────────────────┤ │ • NativeAnalyzer │ │ • CapabilityDetector│ └─────────────────────┘ └─────────────────────┘ │ │ │ └──────────────────────────────┼──────────────────────────────┘ │ ┌──────────▼──────────┐ │ SBOM Composer │ │ (Dedup + Merge) │ └──────────┬──────────┘ │ ┌────────────────────┼────────────────────┐ │ │ │ ▼ ▼ ▼ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ CycloneDX │ │ SPDX │ │ CBOM │ │ 1.4-1.6 │ │ 2.3 / 3.0.1 │ │ (Cryptographic) │ └─────────────────┘ └─────────────────┘ └─────────────────┘ ``` --- ## Language Analyzers (11) ### 1. DotNetAnalyzer **Ecosystem:** .NET / NuGet ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ DotNetAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ *.csproj, *.fsproj, *.vbproj │ SDK-style project files │ │ │ │ *.props, *.targets │ MSBuild imports │ │ │ │ packages.config │ Legacy package references │ │ │ │ *.deps.json │ Runtime dependency manifest │ │ │ │ *.nuspec │ NuGet package manifest │ │ │ │ paket.lock, paket.dependencies │ Paket package manager │ │ │ │ global.json │ SDK version pinning │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Extraction Logic: │ │ 1. Parse SDK-style elements │ │ 2. Parse legacy packages.config XML │ │ 3. Parse *.deps.json for runtime dependencies │ │ 4. Resolve transitive dependencies from asset files │ │ 5. Extract framework targeting (net6.0, net8.0, etc.) │ │ │ │ PURL Format: │ │ pkg:nuget/Newtonsoft.Json@13.0.1 │ │ pkg:nuget/Microsoft.Extensions.Logging@8.0.0?framework=net8.0 │ │ │ │ Special Handling: │ │ • Framework-specific dependencies │ │ • Native/runtime dependencies (rid-specific) │ │ • Source-linked packages │ │ • Central Package Management (Directory.Packages.props) │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 2. JavaAnalyzer **Ecosystem:** Maven / Gradle / Ivy ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ JavaAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ pom.xml │ Maven POM (project model) │ │ │ │ build.gradle, build.gradle.kts │ Gradle build files │ │ │ │ settings.gradle(.kts) │ Gradle settings │ │ │ │ gradle.lockfile │ Gradle dependency lock │ │ │ │ ivy.xml │ Apache Ivy descriptor │ │ │ │ *.jar!/META-INF/MANIFEST.MF │ JAR manifest │ │ │ │ *.jar!/META-INF/maven/**/pom.xml│ Embedded POM │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Extraction Logic: │ │ 1. Parse Maven effective POM (resolve parent, properties) │ │ 2. Parse Gradle dependency configurations │ │ 3. Inspect JAR manifests for version info │ │ 4. Detect shaded/relocated classes │ │ 5. Extract BOM (Bill of Materials) imports │ │ │ │ PURL Format: │ │ pkg:maven/org.apache.logging.log4j/log4j-core@2.17.1 │ │ pkg:maven/com.google.guava/guava@31.1-jre?type=jar │ │ │ │ Special Handling: │ │ • Shaded JARs (relocated packages) │ │ • Classifiers (sources, javadoc, tests) │ │ • Optional/provided scope dependencies │ │ • Version ranges resolution │ │ • Multi-module projects │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 3. NodeAnalyzer **Ecosystem:** npm / Yarn / pnpm ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ NodeAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ package.json │ Package manifest │ │ │ │ package-lock.json │ npm lockfile (v2/v3) │ │ │ │ npm-shrinkwrap.json │ npm shrinkwrap │ │ │ │ yarn.lock │ Yarn Classic lockfile │ │ │ │ .yarnrc.yml + yarn.lock │ Yarn Berry lockfile │ │ │ │ pnpm-lock.yaml │ pnpm lockfile │ │ │ │ node_modules/**/package.json │ Installed packages │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Extraction Logic: │ │ 1. Parse lockfile for exact resolved versions │ │ 2. Parse package.json for declared dependencies │ │ 3. Walk node_modules for installed packages │ │ 4. Detect workspace configurations (monorepos) │ │ 5. Identify bundled dependencies │ │ │ │ PURL Format: │ │ pkg:npm/lodash@4.17.21 │ │ pkg:npm/%40babel/core@7.20.0 (scoped) │ │ pkg:npm/express@4.18.2?resolved=https://registry.npmjs.org/... │ │ │ │ Special Handling: │ │ • Scoped packages (@org/package) │ │ • Peer dependencies │ │ • Optional dependencies │ │ • Workspace/monorepo packages │ │ • Aliased packages │ │ • Git dependencies (git+https://...) │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 4. PythonAnalyzer **Ecosystem:** PyPI / pip / Poetry / Pipenv ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ PythonAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ requirements.txt │ pip requirements │ │ │ │ requirements-*.txt │ Environment-specific reqs │ │ │ │ setup.py │ Setuptools config (legacy) │ │ │ │ setup.cfg │ Declarative setuptools │ │ │ │ pyproject.toml │ PEP 517/518/621 config │ │ │ │ Pipfile, Pipfile.lock │ Pipenv files │ │ │ │ poetry.lock │ Poetry lockfile │ │ │ │ *.egg-info/PKG-INFO │ Installed egg metadata │ │ │ │ *.dist-info/METADATA │ Installed wheel metadata │ │ │ │ site-packages/* │ Installed packages │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Extraction Logic: │ │ 1. Parse lockfiles for pinned versions │ │ 2. Parse pyproject.toml [project.dependencies] │ │ 3. Parse requirements.txt with constraint handling │ │ 4. Walk site-packages for METADATA files │ │ 5. Detect extras and environment markers │ │ │ │ PURL Format: │ │ pkg:pypi/requests@2.28.1 │ │ pkg:pypi/django@4.1.5?extras=argon2 │ │ │ │ Special Handling: │ │ • Environment markers (platform, python_version) │ │ • Extras ([package[extra1,extra2]]) │ │ • Editable installs (-e .) │ │ • Version constraints (>=1.0,<2.0) │ │ • Hash checking mode │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 5. GoAnalyzer **Ecosystem:** Go Modules ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ GoAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ go.mod │ Module definition │ │ │ │ go.sum │ Dependency checksums │ │ │ │ vendor/modules.txt │ Vendored dependencies │ │ │ │ Binary: __go_buildinfo │ Embedded build info (Go 1.18+) │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Extraction Logic: │ │ 1. Parse go.mod require directives │ │ 2. Parse go.sum for integrity verification │ │ 3. Detect replace directives (local replacements) │ │ 4. Extract build info from compiled binaries │ │ 5. Handle pseudo-versions (v0.0.0-yyyymmddhhmmss-hash) │ │ │ │ PURL Format: │ │ pkg:golang/github.com/gin-gonic/gin@v1.8.1 │ │ pkg:golang/golang.org/x/crypto@v0.0.0-20220722-abcdef │ │ │ │ Special Handling: │ │ • Replace directives (local, version) │ │ • Retract versions │ │ • Pseudo-versions from git │ │ • +incompatible suffix │ │ • Minimal version selection (MVS) │ │ • Binary build info extraction (no source needed) │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 6. RustAnalyzer **Ecosystem:** Cargo / crates.io ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ RustAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ Cargo.toml │ Package manifest │ │ │ │ Cargo.lock │ Dependency lockfile │ │ │ │ Binary: .comment section │ rustc version (ELF) │ │ │ │ Binary: .rdata │ rustc version (PE) │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Extraction Logic: │ │ 1. Parse Cargo.lock [[package]] entries │ │ 2. Parse Cargo.toml [dependencies] │ │ 3. Handle workspace members │ │ 4. Detect target-specific dependencies │ │ 5. Extract feature flags │ │ │ │ PURL Format: │ │ pkg:cargo/serde@1.0.152 │ │ pkg:cargo/tokio@1.25.0?features=full │ │ │ │ Special Handling: │ │ • Feature flags │ │ • Target-specific dependencies [target.'cfg(...)'.dependencies] │ │ • Build dependencies [build-dependencies] │ │ • Dev dependencies [dev-dependencies] │ │ • Workspace inheritance │ │ • Path/git dependencies │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 7. PhpAnalyzer **Ecosystem:** Composer / Packagist ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ PhpAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ composer.json │ Package definition │ │ │ │ composer.lock │ Dependency lockfile │ │ │ │ vendor/composer/installed.json│ Installed packages │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ PURL Format: │ │ pkg:composer/laravel/framework@9.48.0 │ │ pkg:composer/symfony/http-foundation@6.2.0 │ │ │ │ Special Handling: │ │ • PHP version constraints │ │ • Extension requirements (ext-*) │ │ • Platform packages (php, lib-*) │ │ • Stability flags (dev, alpha, beta, RC) │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 8. RubyAnalyzer **Ecosystem:** RubyGems / Bundler ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ RubyAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ Gemfile │ Bundler dependencies │ │ │ │ Gemfile.lock │ Bundler lockfile │ │ │ │ *.gemspec │ Gem specification │ │ │ │ gems.rb / gems.locked │ Alternative Bundler format │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ PURL Format: │ │ pkg:gem/rails@7.0.4 │ │ pkg:gem/nokogiri@1.14.0?platform=ruby │ │ │ │ Special Handling: │ │ • Platform-specific gems │ │ • Git/path sources │ │ • Groups (development, test, production) │ │ • Ruby version constraints │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 9. DenoAnalyzer **Ecosystem:** Deno / deno.land ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ DenoAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ deno.json / deno.jsonc │ Deno configuration │ │ │ │ deno.lock │ Deno lockfile │ │ │ │ import_map.json │ Import map │ │ │ │ deps.ts │ Dependency re-exports │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ PURL Format: │ │ pkg:deno/std@0.177.0 │ │ pkg:deno/oak@v11.1.0 │ │ pkg:npm/lodash@4.17.21 (via npm: specifier) │ │ │ │ Special Handling: │ │ • URL imports (https://deno.land/...) │ │ • npm: specifiers (Deno 1.28+) │ │ • Import maps for aliasing │ │ • JSR registry packages │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 10. BunAnalyzer **Ecosystem:** Bun / npm ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ BunAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ package.json │ Package manifest │ │ │ │ bun.lockb │ Bun binary lockfile │ │ │ │ bunfig.toml │ Bun configuration │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ PURL Format: │ │ pkg:npm/hono@3.11.0 │ │ pkg:npm/elysia@0.7.0 │ │ │ │ Special Handling: │ │ • Binary lockfile parsing (bun.lockb) │ │ • Workspace support │ │ • Bun-specific packages │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### 11. NativeAnalyzer **Ecosystem:** Binary executables (ELF/PE/Mach-O) ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ NativeAnalyzer │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ File Patterns: │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ ELF binaries (no extension) │ Linux executables/libraries │ │ │ │ *.so, *.so.* │ Linux shared libraries │ │ │ │ *.exe, *.dll │ Windows binaries │ │ │ │ *.dylib, Mach-O binaries │ macOS binaries │ │ │ │ *.a, *.lib │ Static libraries │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Extraction Logic: │ │ 1. Parse ELF/PE/Mach-O headers │ │ 2. Extract Build-ID / CodeView GUID / UUID │ │ 3. Parse dynamic linking sections │ │ 4. Extract symbol tables (.dynsym, .symtab) │ │ 5. Parse debug info (DWARF) if present │ │ │ │ Output: │ │ pkg:generic/libssl.so.1.1?build-id=abc123... │ │ pkg:generic/app?build-id=sha256:... │ │ │ │ Extracted Metadata: │ │ • Linked libraries (DT_NEEDED, imports) │ │ • Exported symbols │ │ • Architecture (x86_64, arm64, etc.) │ │ • Compiler identification │ │ • Build-time options (PIE, RELRO, stack canary) │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` --- ## OS/Distribution Analyzers (9) ### Linux Distributions ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ LINUX PACKAGE ANALYZERS │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ APKAnalyzer (Alpine) │ │ │ │ │ │ │ │ Database: /lib/apk/db/installed │ │ │ │ │ │ │ │ Version Format: 1.2.3-r4 │ │ │ │ • 1.2.3 = upstream version │ │ │ │ • r4 = Alpine revision │ │ │ │ │ │ │ │ PURL: pkg:apk/alpine/openssl@1.1.1q-r0?distro=alpine-3.16 │ │ │ │ │ │ │ │ Special: Virtual packages, multi-arch support │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ DPKGAnalyzer (Debian/Ubuntu) │ │ │ │ │ │ │ │ Database: /var/lib/dpkg/status │ │ │ │ │ │ │ │ Version Format: [epoch:]upstream-debian │ │ │ │ • epoch = optional numeric prefix (1:) │ │ │ │ • upstream = original version │ │ │ │ • debian = distro-specific revision │ │ │ │ │ │ │ │ PURL: pkg:deb/debian/openssl@1.1.1n-0+deb11u3?distro=bullseye │ │ │ │ │ │ │ │ Special: Source packages, virtual packages, multi-arch │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ RPMAnalyzer (RHEL/Fedora/SUSE) │ │ │ │ │ │ │ │ Database: /var/lib/rpm/Packages (BerkeleyDB) │ │ │ │ /var/lib/rpm/rpmdb.sqlite (SQLite, newer) │ │ │ │ │ │ │ │ Version Format: NEVRA (Name-Epoch:Version-Release.Arch) │ │ │ │ • Epoch = numeric prefix (usually 0 or omitted) │ │ │ │ • Version = upstream version │ │ │ │ • Release = distro release + dist tag │ │ │ │ │ │ │ │ PURL: pkg:rpm/redhat/openssl@1.1.1k-7.el8_6?arch=x86_64 │ │ │ │ │ │ │ │ Special: Epoch handling, dist tags, modular packages │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### macOS Analyzers ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ macOS PACKAGE ANALYZERS │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ HomebrewAnalyzer │ │ │ │ │ │ │ │ Locations: │ │ │ │ • /usr/local/Cellar/ (Intel) │ │ │ │ • /opt/homebrew/Cellar/ (Apple Silicon) │ │ │ │ │ │ │ │ Detection: INSTALL_RECEIPT.json in formula directories │ │ │ │ │ │ │ │ PURL: pkg:brew/openssl@1.1.1q │ │ │ │ pkg:brew/homebrew/cask/docker@4.15.0 (casks) │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ PkgutilAnalyzer │ │ │ │ │ │ │ │ Command: pkgutil --pkgs │ │ │ │ Database: /var/db/receipts/ │ │ │ │ │ │ │ │ Detects: System packages, installer packages (.pkg) │ │ │ │ │ │ │ │ PURL: pkg:macos/com.apple.pkg.CLTools_Executables@14.0.0 │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ MacOsBundleAnalyzer │ │ │ │ │ │ │ │ File: *.app/Contents/Info.plist │ │ │ │ │ │ │ │ Extracts: │ │ │ │ • CFBundleIdentifier │ │ │ │ • CFBundleShortVersionString │ │ │ │ • CFBundleVersion │ │ │ │ │ │ │ │ PURL: pkg:swift/com.apple.Safari@16.2 │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### Windows Analyzers ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ WINDOWS PACKAGE ANALYZERS │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ ChocolateyAnalyzer │ │ │ │ │ │ │ │ Location: C:\ProgramData\chocolatey\lib\ │ │ │ │ │ │ │ │ Detection: .nupkg files, .nuspec metadata │ │ │ │ │ │ │ │ PURL: pkg:choco/7zip@22.01 │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ MSIAnalyzer │ │ │ │ │ │ │ │ Registry: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ │ │ │ │ Uninstall\ │ │ │ │ │ │ │ │ Detection: DisplayName, DisplayVersion, Publisher │ │ │ │ │ │ │ │ PURL: pkg:msi/Microsoft Visual C++ 2019@14.29.30139 │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ WinSxSAnalyzer │ │ │ │ │ │ │ │ Location: C:\Windows\WinSxS\Manifests\ │ │ │ │ │ │ │ │ Detection: Side-by-side assembly manifests │ │ │ │ │ │ │ │ Extracts: System assemblies, .NET Framework components │ │ │ │ │ │ │ │ PURL: pkg:winsxs/Microsoft.VC90.CRT@9.0.30729.1 │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` --- ## Surface Analyzers (4) ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ SURFACE ANALYZERS │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ FileSystemAnalyzer │ │ │ │ │ │ │ │ Detects: │ │ │ │ • SUID/SGID binaries │ │ │ │ • World-writable files/directories │ │ │ │ • Capability-enhanced binaries (getcap) │ │ │ │ • Symlink targets │ │ │ │ • File permissions and ownership │ │ │ │ │ │ │ │ Output: property:fs/suid-binary, property:fs/world-writable │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ EnvironmentAnalyzer │ │ │ │ │ │ │ │ Sources: │ │ │ │ • /etc/environment │ │ │ │ • Shell profiles (.bashrc, .profile, .zshrc) │ │ │ │ • Container ENV instructions (from image config) │ │ │ │ │ │ │ │ Detects: │ │ │ │ • PATH entries │ │ │ │ • LD_LIBRARY_PATH / LD_PRELOAD │ │ │ │ • User context │ │ │ │ • Locale settings │ │ │ │ │ │ │ │ Output: property:env/PATH, property:env/LD_PRELOAD │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ SecretsAnalyzer │ │ │ │ │ │ │ │ Detection Patterns: │ │ │ │ • API keys (AWS, GCP, Azure, GitHub, etc.) │ │ │ │ • Private keys (RSA, ECDSA, Ed25519) │ │ │ │ • Passwords in config files │ │ │ │ • Connection strings │ │ │ │ • JWT tokens │ │ │ │ • OAuth secrets │ │ │ │ │ │ │ │ Output: finding:secret/aws-access-key, finding:secret/private-key│ │ │ │ │ │ │ │ Note: Findings are security alerts, not SBOM components │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ ValidationAnalyzer │ │ │ │ │ │ │ │ Validates: │ │ │ │ • SBOM completeness (all files accounted for) │ │ │ │ • Hash verification (checksums match) │ │ │ │ • Signature verification (if signed) │ │ │ │ • Format compliance (CycloneDX/SPDX schema) │ │ │ │ │ │ │ │ Output: validation:sbom/complete, validation:sbom/verified │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` --- ## Capability Analyzer ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ CAPABILITY DETECTOR │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ The CapabilityDetector analyzes code patterns to identify runtime │ │ capabilities that affect security posture and reachability analysis. │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ DETECTED CAPABILITIES │ │ │ │ │ │ │ │ ┌─────────────────┬────────────────────────────────────────┐ │ │ │ │ │ Capability │ Detection Patterns │ │ │ │ │ ├─────────────────┼────────────────────────────────────────┤ │ │ │ │ │ Exec │ Process.Start, exec, spawn, fork │ │ │ │ │ │ Network │ Socket, HttpClient, fetch, axios │ │ │ │ │ │ Filesystem │ File.*, fs.*, open, read, write │ │ │ │ │ │ Crypto │ Cipher, Hash, Sign, Verify │ │ │ │ │ │ Database │ SqlConnection, MongoClient, Redis │ │ │ │ │ │ DynamicCode │ eval, exec, compile, CodeDom │ │ │ │ │ │ Reflection │ Type.GetMethod, Assembly.Load │ │ │ │ │ │ NativeInterop │ DllImport, P/Invoke, FFI │ │ │ │ │ │ Serialization │ JSON.parse, pickle, Marshal │ │ │ │ │ │ MemoryUnsafe │ unsafe, pointer, IntPtr │ │ │ │ │ └─────────────────┴────────────────────────────────────────┘ │ │ │ │ │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ Usage in Policy: │ │ • Exec capability + CVE in child process → higher risk │ │ • Network capability + CVE in HTTP library → exploitable remotely │ │ • DynamicCode capability → increased attack surface │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` --- ## Analyzer Pipeline Summary ``` ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ COMPLETE ANALYZER INVENTORY │ ├───────────────────┬────────────────────┬───────────────────────┬────────────────────┤ │ Category │ Analyzer │ Files/Sources │ PURL Type │ ├───────────────────┼────────────────────┼───────────────────────┼────────────────────┤ │ Language (11) │ DotNetAnalyzer │ *.csproj, *.deps.json │ pkg:nuget │ │ │ JavaAnalyzer │ pom.xml, *.jar │ pkg:maven │ │ │ NodeAnalyzer │ package.json, *.lock │ pkg:npm │ │ │ PythonAnalyzer │ requirements.txt │ pkg:pypi │ │ │ GoAnalyzer │ go.mod, go.sum │ pkg:golang │ │ │ RustAnalyzer │ Cargo.toml, *.lock │ pkg:cargo │ │ │ PhpAnalyzer │ composer.json │ pkg:composer │ │ │ RubyAnalyzer │ Gemfile, *.gemspec │ pkg:gem │ │ │ DenoAnalyzer │ deno.json, deno.lock │ pkg:deno │ │ │ BunAnalyzer │ bun.lockb │ pkg:npm │ │ │ NativeAnalyzer │ ELF/PE/Mach-O │ pkg:generic │ ├───────────────────┼────────────────────┼───────────────────────┼────────────────────┤ │ OS/Distro (9) │ APKAnalyzer │ /lib/apk/db/installed │ pkg:apk │ │ │ DPKGAnalyzer │ /var/lib/dpkg/status │ pkg:deb │ │ │ RPMAnalyzer │ /var/lib/rpm/ │ pkg:rpm │ │ │ HomebrewAnalyzer │ /opt/homebrew/Cellar │ pkg:brew │ │ │ PkgutilAnalyzer │ pkgutil --pkgs │ pkg:macos │ │ │ MacOsBundleAnalyzer│ *.app/Info.plist │ pkg:swift │ │ │ ChocolateyAnalyzer │ chocolatey/lib/ │ pkg:choco │ │ │ MSIAnalyzer │ Registry │ pkg:msi │ │ │ WinSxSAnalyzer │ WinSxS/Manifests/ │ pkg:winsxs │ ├───────────────────┼────────────────────┼───────────────────────┼────────────────────┤ │ Surface (4) │ FileSystemAnalyzer │ File permissions │ property:fs │ │ │ EnvironmentAnalyzer│ ENV, .profile │ property:env │ │ │ SecretsAnalyzer │ Pattern matching │ finding:secret │ │ │ ValidationAnalyzer │ SBOM validation │ validation:sbom │ ├───────────────────┼────────────────────┼───────────────────────┼────────────────────┤ │ Capability (1) │ CapabilityDetector │ Code patterns │ capability:* │ └───────────────────┴────────────────────┴───────────────────────┴────────────────────┘ Total: 25 Analyzers ``` --- ## Related Documentation - [Policy Engine Data Pipeline](policy-engine-data-pipeline.md) - How analyzers feed policy decisions - [Scanner Architecture](../../modules/scanner/architecture.md) - Scanner module dossier - [SBOM Generation Flow](../../flows/03-sbom-generation-flow.md) - End-to-end SBOM flow - [Data Schemas](../../11_DATA_SCHEMAS.md) - SBOM format specifications