Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions cve_bin_tool/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@

from cve_bin_tool.log import LOGGER

"""
Validation utilities for CVE Binary Tool.

This module provides functions to validate common security-related
artifacts against their official XML schema definitions, including:

- SPDX: Software Package Data Exchange documents
- CycloneDX: Bill of Materials (SBOM) documents
- SWID: Software Identification Tag files
- Maven POM: Project Object Model files

All functions delegate to a shared `_validate_xml` helper that applies
the correct schema using the `xmlschema` library. Validation results are
logged through the project’s logger for debugging and traceability.

These helpers are used internally to ensure that inputs conform to
standards before further analysis.
"""

# This downgrades a message during module loading.
if True: # Strange construction for pep8 compliance.
logging.getLogger("xmlschema").setLevel(logging.WARNING)
Expand Down