Skip to content

Alert metadata lookup not working as expected #464

Description

@severin

Hi there!

I'm trying to implement a workflow that labels pull requests that address dependabot alerts. To identify these PRs my idea was to use the fetch-metadata action and look at the alert-state: if it is OPEN then the PR addresses an open dependabot alert.

However, it seems like the fetch-metadata is not working correctly (or maybe I'm just misunderstanding it).

Observed behaviour

  • Dependabot opened a PR that bumps the minimatch dependency from 3.0.4 to 3.1.2:
Screenshot 2023-10-30 at 11 41 45
  • This PR addresses a security alert:
Screenshot 2023-10-30 at 11 42 07
  • Running fetch-metadata on the PR does not return any alert information (even though alert-lookup is set to true):
Screenshot 2023-10-30 at 11 42 39

Expected behaviour

I expected the fetch-metadata action to output alert information:

outputs.alertState: OPEN
outputs.ghsa-id: GHSA-f8q6-p94x-37v3
outputs.cvss: 7.5

Am I doing something wrong or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    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