- Add privacy projection (core/privacy.py), private report storage, bounded
process capture; omit identities, free text and unapproved paths
- Mask remote peer IPs: only loopback/host/wildcard stay numeric, others are
reduced to remote_scope private/public (schema + scoring updated)
- Map ss TCP states to canonical names; ASCII-only numeric fields; fix
"Microsoft Visual C++" product matching (Python and PowerShell)
- Merge 7fed3b9: -Diagnostic switch, serialization exit code 3, PS7 module
path, UI error detail; keep hardened task/certificate collectors
- Add audit docs, privacy docs and regression tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
105 lines
18 KiB
Markdown
105 lines
18 KiB
Markdown
# Dependency and supply-chain inventory
|
|
|
|
**Evidence:** `requirements.txt:1-2`, static imports across `samsara/`, `tools/`, `tests/`, local `.venv/lib/python3.12/site-packages/*.dist-info/METADATA`, `.venv/pyvenv.cfg`, PowerShell source and native component filenames. No dependency was imported for evaluation, installed, upgraded or contacted. No advisory database or external repository was queried. Observed local versions are metadata evidence, not proof of wheel authenticity, Windows deployment versions, maintenance status or vulnerability absence.
|
|
|
|
## Declared and discoverable Python dependencies
|
|
|
|
The only direct declarations are `PySide6>=6.6,<7` and `jsonschema>=4.21,<5`. No `pyproject.toml`, `setup.py`, `setup.cfg`, Pipfile/Poetry lock, requirements lock, first-party package build manifest or SBOM was present. The reviewed venv declares CPython 3.12.3 and `include-system-site-packages = false`; the application documentation targets Python 3.11+.
|
|
|
|
| Dependency (local metadata version) | Version constraint | Purpose | Direct / transitive | Security concern | Recommendation |
|
|
| --- | --- | --- | --- | --- | --- |
|
|
| PySide6 **6.12.0** | `>=6.6,<7` | Desktop Qt UI; QtCore/QtGui/QtWidgets imports at `samsara/ui/window.py:1-5` and main | Direct, GUI only | Broad range; native plugins/codecs and unused components; no complete vendor/native SBOM or runtime egress verification | Pin/review a platform-compatible exact release. Evaluate Essentials-only package after compatibility/licensing/security review; keep headless path Qt-free. |
|
|
| jsonschema **4.26.0** | `>=4.21,<5` | v1 inventory/section validation (`samsara/models/inventory.py:5-18`, `collectors/windows.py:14`, `:95-106`) | Direct, GUI/headless Windows | Broad range; validation is not redaction. Optional format enforcement and mutable schema/reference policy need review | Pin/hash, close application schema, explicitly enforce required formats and disallow uncontrolled remote schema resolution. |
|
|
| PySide6_Essentials **6.12.0** | `==6.12.0` from resolved PySide6 | Qt runtime/bindings including modules actually imported | Transitive; potential smaller direct alternative | Native library/codecs/plugin dependency closure not captured by pip metadata | Include Qt/native artifacts and platform plugins in SBOM; verify required modules under minimal distribution. |
|
|
| PySide6_Addons **6.12.0** | `==6.12.0` from resolved PySide6 | Additional Qt modules | Transitive | No first-party imports of Addons-specific API identified; unnecessary installed capability | Remove only through a separately approved minimization change and regression validation. Installed does not mean executed. |
|
|
| PySide6_WebEngine **6.12.0.140** | `==6.12.0.140` from resolved PySide6 | Browser/web-content runtime and helper | Transitive | Not used by first-party UI, which does not embed a browser. Large native web runtime and dependency closure; telemetry/egress not audited | Prefer omitting if not needed; inventory/version native engine/helper and vendor advisories if retained. No finding that it was launched or transmitted data. |
|
|
| PySide6_Pdf **6.12.0.140** | `==6.12.0.140` from resolved PySide6 | PDF runtime | Transitive | Application writes HTML/JSON, not PDF; unnecessary parser/plugin capability | Evaluate removal via minimal Qt deployment. Include native PDF code in SBOM if shipped. |
|
|
| shiboken6 **6.12.0** | `==6.12.0` from Essentials | Python/C++ binding runtime | Transitive, required for Qt | Native extension and ABI coupling | Pin with matching PySide6 set and verify signed/hash-approved wheels. |
|
|
| attrs **26.1.0** | `>=22.2.0` from jsonschema; also used by referencing | Validator/reference implementation support | Transitive | Not separately constrained by project; version selected transitively | Lock entire resolved environment, not just top-level packages. |
|
|
| jsonschema-specifications **2025.9.1** | `>=2023.03.6` from jsonschema | Bundled schema specification resources | Transitive | Not separately pinned; dependency provenance | Lock/hash and include resources in SBOM. |
|
|
| referencing **0.37.0** | `>=0.28.4` from jsonschema; `>=0.31.0` from specifications | JSON reference machinery | Transitive | Resolver behavior can be network-capable depending on schema/registry; current application schema has no remote `$ref` | Restrict schema provenance/reference registry to approved local resources; test offline. Do not infer current fetches from package capability alone. |
|
|
| rpds-py **2026.9.1** | `>=0.25.0` from jsonschema; `>=0.7.0` from referencing | Persistent data structure implementation | Transitive | Native Rust extension supply chain/platform wheel provenance | Lock/hash native wheels; include native component/version evidence. |
|
|
| typing_extensions **4.16.0** | `>=4.4.0` from referencing when Python `<3.13` | Runtime typing compatibility | Transitive, selected in reviewed Python 3.12 venv | Environment-marker differences across runtimes | Resolve/lock on every approved Python/platform combination. |
|
|
| pip **24.0** | No project constraint | Environment creation/install tooling; not application runtime import | Build/environment tool | External downloads/install execution; bootstrap provenance and tool version unreviewed | Use organization-approved provisioned tooling/mirrors. Do not install/update during a production assessment or this audit. |
|
|
|
|
All 13 discoverable installed distributions are represented above. Their metadata files are under `.venv/lib/python3.12/site-packages/`: `pyside6-6.12.0.dist-info`, `pyside6_essentials-6.12.0.dist-info`, `pyside6_addons-6.12.0.dist-info`, `pyside6_webengine-6.12.0.140.dist-info`, `pyside6_pdf-6.12.0.140.dist-info`, `shiboken6-6.12.0.dist-info`, `jsonschema-4.26.0.dist-info`, `attrs-26.1.0.dist-info`, `jsonschema_specifications-2025.9.1.dist-info`, `referencing-0.37.0.dist-info`, `rpds_py-2026.9.1.dist-info`, `typing_extensions-4.16.0.dist-info`, `pip-24.0.dist-info`.
|
|
|
|
The transitive `==` pins inside the currently resolved PySide6 family do **not** make project installs reproducible: the top-level range can select another family next time. Installed metadata is not a lockfile or release attestation.
|
|
|
|
### Optional dependencies not selected in this environment
|
|
|
|
PySide6 metadata advertises conditional `tomli>=2.0.1` below Python 3.11 and optional full examples/binding generator; those are not selected by the documented minimum runtime or declared requirements. Addons advertises an optional WebEngine extra, while the meta-package already selects WebEngine in the observed resolution.
|
|
|
|
jsonschema advertises optional format extras involving fqdn, idna, isoduration, jsonpointer, rfc3339-validator, rfc3987, uri-template, webcolors and, for the non-GPL format extra, rfc3986-validator/rfc3987-syntax. These are not requested by `requirements.txt` and are not present in the discovered distribution set. Do not label them installed vulnerabilities.
|
|
|
|
**Concrete enforcement gap:** installed `jsonschema/_format.py:395-402` conditionally imports `rfc3339_validator` under `suppress(ImportError)` before registering date-time checking; `:111-129` returns when a checker is unavailable. The module file and installed distribution are absent locally. Thus `FormatChecker()` alone does not establish date-time validation in the reviewed isolated environment. This is source/metadata evidence, not an executed malformed-input test. Explicitly verify required checker availability or implement reviewed dependency-free field validation later.
|
|
|
|
### Licensing and maintenance
|
|
|
|
Local metadata lists LGPL-3.0-only / GPL-2.0-only / GPL-3.0-only alternatives for the Qt Python distributions, MIT for the validator family/pip, and PSF-2.0 for typing_extensions. This is not a complete native license inventory or a legal opinion. Qt/commercial-license choices, redistribution notices and third-party bundled licenses require organization-approved review. Current maintenance/support/end-of-life status for every package is **Unverified** without authorized vendor/advisory review. No package is declared abandoned or CVE-free based on its version string or project URL.
|
|
|
|
## Standard-library and test dependencies
|
|
|
|
CPython provides `argparse`, `collections`, `copy`, `ctypes`, `datetime`, `functools`, `hashlib`, `html`, `ipaddress`, `json`, `os`, `pathlib`, `platform`, `re`, `shlex`, `socket`, `struct`, `subprocess`, `sys`, `tempfile`, `time` and `urllib.parse`; tests additionally use `unittest`/`unittest.mock` and `shutil`. These are part of the Python runtime, not independent pip dependencies. `urllib.parse.quote` is URL encoding, not an HTTP client; `socket.gethostname` does not explicitly call connect/DNS in this source. `ctypes` loads native code and extends the trust boundary. Python runtime patches, standard library security fixes and platform DLL dependencies are outstanding release checks.
|
|
|
|
No first-party imports of requests/httpx, telemetry SDKs, SQL/database drivers, PySide web widgets, cloud SDKs or remote logging clients were found. Qt SQL/native driver files installed by broad packaging are not evidence of a database integration. No extra third-party unit-test framework is declared.
|
|
|
|
## Native runtimes, modules and external executables
|
|
|
|
| Dependency | Version constraint / evidence | Purpose / use | Kind | Security concern / recommendation |
|
|
| --- | --- | --- | --- | --- |
|
|
| Windows PowerShell | `#requires -Version 5.1`, driver `powershell/Get-ServerInventory.ps1:1`; system `powershell.exe` path `samsara/collectors/windows.py:35-64` | Local read-only section execution | External executable/runtime | Exact Windows build/patch/module versions and publisher trust Unverified. Require signed approved deployment; no bypass/profile execution. |
|
|
| Windows CIM/WMI service and CimCmdlets | Inbox, unpinned OS component | Win32_OperatingSystem/ComputerSystem/NetworkAdapterConfiguration/Service | Runtime/provider | ACL filtering, provider/log/cache effects; collect only approved properties and validate with least privilege. |
|
|
| ServerManager | Inbox, unpinned | Get-WindowsFeature | PowerShell module | Access/servicing/logging behavior not established; validate per Server release. |
|
|
| NetTCPIP | Inbox, unpinned | Get-NetTCPConnection | PowerShell module | Endpoint/process linkage is sensitive; no explicit remote session used. |
|
|
| ScheduledTasks | Inbox, unpinned | Get-ScheduledTask | PowerShell module | Definitions can contain sensitive actions/triggers; provider acquisition is broader than exported projection. |
|
|
| Storage | Inbox, unpinned | Get-Volume | PowerShell module/provider | Storage metadata and external-provider side effects need lab verification. |
|
|
| SmbShare | Inbox, unpinned | Get-SmbShare/Get-SmbOpenFile | PowerShell module/provider | Broad open-file metadata privacy exposure and access requirements; default-disabled sensitive source recommended. |
|
|
| Microsoft.PowerShell.Management / Utility / Security and certificate provider | Inbox, unpinned | Get-Process/Get-ChildItem, object/JSON utilities, certificate stores | PowerShell modules/providers | Restrict to trusted inbox implementations; exact provider runtime behavior not reviewed. |
|
|
| .NET / Microsoft.Win32.RegistryKey, Security.Principal, certificate objects | Windows PowerShell runtime, unpinned | Registry view access, token inspection, public certificate properties | Native/managed runtime | Read handles do not imply values are privacy safe. Type/expansion/key access semantics need approval. |
|
|
| kernel32.GetSystemDirectoryW, shell32.SetCurrentProcessExplicitAppUserModelID | Windows system APIs | Executable resolution; process/taskbar identity | OS APIs | Source does not change persistent configuration; actual system DLL integrity is OS responsibility. |
|
|
| Qt Core/Gui/Widgets, shiboken, platform/image plugins | Resolved PySide family above; full native closure unknown | GUI/event loop, file dialogs, JPEG logo rendering | Native transitive runtime | Image/plugin loading, system IPC, caches and file dialog egress Unverified. Application source does not disable Qt/native capabilities globally. |
|
|
| Qt WebEngine/PDF/Network/SQL libraries and helper | Filename evidence under `.venv/.../PySide6/Qt/`; exact embedded component versions Unverified | Installed broad runtime; not explicitly used by first-party UI | Native transitive, partly unnecessary | Observed `libQt6WebEngineCore.so.6`, `libexec/QtWebEngineProcess`, PDF/network/SQL libraries and database plugins. Inventory/remove unnecessary components; do not claim they ran. |
|
|
| ICU, OpenSSL/TLS backend, image codecs and other native closure | Filename evidence includes `libicu*.so.73`, `libqopensslbackend.so`, JPEG plugin and crypto/SSL stubs | Qt native support | Native transitive | Filenames do not prove patched upstream versions, actual loaded backend or complete licenses. Need native SBOM and binary/advisory review. |
|
|
| Linux display/OpenGL/X11/Wayland libraries, cursor library | `samsara/core/startup.py:14`; desktop packages described by README | Qt desktop integration | OS/runtime | Version/patch inventory not pinned. Loading the named library is native code execution; verify OS baseline. |
|
|
| systemctl / systemd | Host-managed, unpinned | Enumerate services/timers, read selected properties | Linux external executable + IPC | Fixed paths/options, no service changes by source; cache/IPC side effects Unverified. |
|
|
| ip / ss (iproute2) | Host-managed, unpinned | Interfaces and numeric TCP table | Linux external utilities | Permission visibility and endpoint privacy; no explicit active probes. |
|
|
| rpm OR dpkg-query | Host-managed, unpinned | Package inventory query only | Linux external utility/database | Not an installer action; exact database locking/caches need validation. |
|
|
| sleep | Test-only system utility | Cancellation/timeout tests (`tests/test_linux.py:87-89`) | Development executable | A real process is started/killed by tests; do not execute the suite blindly on production. |
|
|
| Git | Development/artifact transport, not production import | Repository/bundle management | Development tool | Source/release provenance needs verification; no remote Git calls made in this audit. |
|
|
|
|
Native filename inspection also found SQL driver plugins and network-related libraries. The complete native dependency closure, bundled third-party subcomponents, Windows CRT/system DLLs and exact Windows module versions are **not** established. A Python-only SBOM is insufficient.
|
|
|
|
## Network, telemetry and download assessment
|
|
|
|
- Application source has no explicit telemetry/update/upload integration. That is not a vendor/runtime telemetry attestation. Dependency source/native behavior was not exhaustively audited or observed.
|
|
- Manual README pip and OS package commands can access configured indexes/repositories and install code. No hash-locked approved wheelhouse is supplied.
|
|
- Headless Windows instructions avoid Qt but still require approved existing Python/jsonschema or the PowerShell-only path. Installing runtimes or dependencies on a production server is outside a read-only collection claim and needs separate authorization.
|
|
- The current schema has a public `$schema` identifier, not a remote `$ref`. There is no identified current schema fetch; a substituted schema/resolver/deployment is outside the integrity assurance.
|
|
|
|
## Outstanding vulnerability checks and exact later commands
|
|
|
|
**No CVEs or vulnerability results are asserted. No scan was run because network access and dependency changes were prohibited.** The source cannot establish which components are vulnerable or patched.
|
|
|
|
The following commands are for a **later authorized build/security environment only**, with approved pinned scanner/tool versions already provisioned. They write output and some query advisory services/send package names and versions; they must not run in the production assessment process or alongside PHI/report files. Confirm approved advisory/mirror endpoints and privacy for private package names before execution. Do not provision tools automatically on an assessed server.
|
|
|
|
```text
|
|
python -m pip inspect --local > pip-inspect.json
|
|
python -m pip freeze --all > installed-packages.txt
|
|
python -m pip_audit --local --strict --format json --output pip-audit-installed.json
|
|
python -m pip_audit --requirement requirements-windows-py311.lock --strict --format json --output pip-audit-lock.json
|
|
python -m cyclonedx_py environment --output-file sbom-python.cdx.json
|
|
syft dir:release-folder -o cyclonedx-json=sbom-native.cdx.json
|
|
grype sbom:sbom-native.cdx.json -o json > grype-native.json
|
|
```
|
|
|
|
`release-folder` must be a clean, approved release staging directory without collected reports. `requirements-windows-py311.lock` must be produced/reviewed first; replace its name with the matching approved target-platform lock. Pip auditing does not cover Windows/Qt native closure, and Syft/Grype coverage is not guaranteed for every bundled binary. Review scanner collection failures and vendor advisories, not just nonzero CVE counts. If advisory egress is prohibited, obtain an approved offline advisory database/export and document its freshness, provenance and uncovered components instead of claiming the online scan succeeded.
|
|
|
|
## Reproducible build and SBOM acceptance approach
|
|
|
|
1. Resolve separately on each approved OS/Python architecture. With approved pip-tools already provisioned: `python -m piptools compile --generate-hashes --output-file requirements-windows-py311.lock requirements.txt`. Repeat on the approved Linux runtime. Generation/resolution may download metadata and requires later authorization.
|
|
2. Review exact versions, licenses, native manifests and hashes; curate a signed approved wheelhouse. Later approved staging commands: `python -m pip download --require-hashes --requirement requirements-windows-py311.lock --dest wheelhouse`, then `python -m pip install --no-index --find-links wheelhouse --require-hashes --requirement requirements-windows-py311.lock` on the matching clean build environment. No installation was performed here.
|
|
3. Generate CycloneDX/SPDX Python and native SBOMs tied to the release commit, source hashes, OS/module patch baseline and platform-specific binary hashes. Include scripts/schema/assets, bundled plugins/codecs and toolchain provenance; retain licenses and verification evidence.
|
|
4. Complete approved vulnerability/maintenance/vendor review and record exceptions with owners, expiry and compensating controls. Scan failures/incomplete native identification block a clean result.
|
|
5. Distribute signed/attested, ACL-protected artifacts through approved infrastructure. Disable assessment-time package installation, downloading and update checks; prove offline operation for the packaged runtime in an isolated synthetic test.
|