Skip to content

enable capywfa to detect sources available locally #19

@samastek

Description

@samastek

CaPyWfa has 6 passes. The first three are:

  1. Map BOM to SW360: Matches packages against existing SW360 entries and produces a new SBOM with match results.

  2. Verify SW360 sources: Checks whether packages found in SW360 have source files attached and verified.

  3. Identify packages needing download: Identifies packages that are either found as unapproved in SW360 or not found at all.

Currently, pass 3 exits with error code 80 if there are sources that must be downloaded.

The Problem

Our workflow starts with all source packages already present in a local directory (whose path is passed via --sources), but pass 3 is exiting without detecting the local sources.

The Suggestion

After examining the code, I think we can update the pass3_download_sources method to search for each source package. When a match is found locally under the specified sources dir, the method:

  • Adds an external reference to the SBOM pointing to the local file path
  • Sets SourceFileDownload to "skip" to prevent the exit code 80

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions