Skip to content

package-plugin validates the live workspace, causing false-positive Invalid Go manifest file failures when node_modules contains .go files #211

@leo-sift

Description

@leo-sift

The grafana/plugin-actions/build-plugin / package-plugin workflow validates the plugin with:

@grafana/plugin-validator -sourceCodeUri file://./ $PLUGIN_ARCHIVE

That points the validator at the live GitHub Actions workspace after dependencies have been installed, instead of at a clean plugin source snapshot. As a result, validation can fail with false-positive Invalid Go manifest file errors when third-party npm dependencies inside node_modules contain .go files.

Where this happens

The problematic step is the validator invocation using -sourceCodeUri file://./.

Concrete example

In my case, this was triggered by a new version of flatted, which we had to bump to address recent security findings including CVE-2026-32141 [1] [2].

That dependency ships Go source under:

node_modules/flatted/golang/pkg/flatted/flatted.go

The action then failed validation with:

error: Invalid Go manifest file: node_modules/flatted/golang/pkg/flatted/flatted.go
detail: file node_modules/flatted/golang/pkg/flatted/flatted.go is in the source code but not in the manifest

However, any dependency under node_modules that contains .go files can trigger the same failure when the validator scans the whole live workspace.

Expected behavior

The official action should validate the plugin against the plugin source only, not against the full post-install workspace contents.

Impact

This causes otherwise valid plugins to fail the official release workflow unless maintainers:

  • replace the official action
  • fork/vendor the action
  • add cleanup workarounds before validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    📬 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions