Skip to content

Add extra details in the results (workflow, job, step) #188

@sadreck

Description

@sadreck

Is your feature request related to a problem? Please describe.
At the moment when results are reported, the report only includes the offending sink workflow/action file. For instance, if you run Raven against microsoft/graphrag one of the results will be:

Name: Unpinnable Action
Severity: low
Description: Unpinnable actions can lead to software supply chain attacks.
Tags: ['supply-chain', 'best-practice']
Workflow URLS:
- https://github.com/pypa/gh-action-pypi-publish/tree/unstable/v1/action.yml

That workflow URL does not belong to microsoft/graphrag which makes is difficult to answer "what do I need to fix, and where do I find what's calling this?"

Describe the solution you'd like
It would be nice if the following information would be displayed as well:

  • Caller Repo Workflow Url
  • Job Name
  • Step Name

For instance, the unpinnable-action query from:

MATCH (ca:CompositeAction)
  WHERE (
      ca.using = "docker" AND (
          NOT ca.image CONTAINS "@sha256:"
      )
  )
  RETURN DISTINCT ca.url AS url;

would become

MATCH (w:Workflow)-[*]->(j:Job)-[*]->(s:Step)-[*]->(ca:CompositeAction)
  WHERE (
      ca.using = "docker" AND (
          NOT ca.image CONTAINS "@sha256:"
      )
  )
  RETURN DISTINCT ca.url AS vulnerable_url, w.path AS workflow_url, j.name AS job, s.name AS step

Additional context

I'm happy to submit a PR for this, but thought to raise this issue as it will include a significant refactor of the existing code to accommodate it.

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