Skip to content

Allow different output formats in parallel (e.g. for SBOM reports) #753

@bittner

Description

@bittner

Pre-submission checks

  • I am not reporting a new vulnerability or requesting a new vulnerability identifier. These must be reported or managed via upstream dependency sources or services, not this repository.
  • I agree to follow the PSF Code of Conduct.
  • I have looked through the open issues for a duplicate request.

What's the problem this feature will solve?

When I run pip-audit in a CI job I love to have tabular output of the scanning results in the log output, but I also want to submit the results (e.g. SBOM reports in JSON or XML) to the CI service for integration in the PR/MR widget.

Currently, I have to run pip-audit twice. One run for the tabular output, another one to write the JSON or XML report.

Describe the solution you'd like

There are the --format and the --output options, which can only be used once (the last occurrence counts). It would cause a lot of trouble to redefine their behavior, hence new options are likely needed.

Two additional options --cyclonedx-xml=<filepath> and --cyclonedx-json=<filepath> could allow to use any format you like on the console, yet still save the CycloneDX SBOM report in XML and/or JSON.

Additional context

The proposed solution is inspired by Pytest's --junit-xml option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions