Skip to content

SARIF formatter silently dropping findings from build dependencies #390

@mbarbero

Description

@mbarbero

Describe the bug
The sarif formatter is only checking PackageDependencies when collecting findings for a package, missing findings where the purl matched a BuildDependency. Rules like github_action_from_unverified_creator_used assign findings a purl corresponding to a GitHub Actions build dependency, which caused those findings to appear in 'pretty' output but not in 'sarif' output.

To Reproduce
Compare output of sarif and pretty with failing rules like github_action_from_unverified_creator_used

Expected behavior
Sarif and pretty formatter should report the same list of violations


I've prepared a fix in a fork. If the maintainer acknowledges this as an issue, I'll create a pull request with the fix. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions