Skip to content

Load Plugin from data - #5

Closed
scottrigby wants to merge 1 commit into
plugin-typesfrom
plugin-load
Closed

scottrigby wants to merge 1 commit into
plugin-typesfrom
plugin-load

Conversation

@scottrigby

@scottrigby scottrigby commented Jul 25, 2025 •

Copy link
Copy Markdown
Owner

To-do:


This PR loads a Plugin from data rather than filesystem.
LoadDir now wraps this after loading data from filesystem.

This helps me now with plugin signing by allowing a loaded Plugin object from data read from a packaged plugin tarball.

We discussed wanting to move in this direction in the near future anyway, because we can't assume SDK users will read plugins from disk. Up to this point that has not made much of a difference, but with the new plugin functionality it's likely SDK users will want to make use of them.

…t assuming filesystem access

Signed-off-by: Scott Rigby <[email protected]>
@scottrigby scottrigby changed the title Add plugin.Load in front of LoadDir, to allow loading a plugin without assuming filesystem access Load a Plugin from data rather than assuming filesystem Jul 25, 2025
@scottrigby scottrigby mentioned this pull request Jul 25, 2025
1 task done
@scottrigby scottrigby changed the title Load a Plugin from data rather than assuming filesystem Load Plugin from data Jul 25, 2025
@scottrigby

Copy link
Copy Markdown
Owner Author

included in #6

@scottrigby scottrigby closed this Jul 31, 2025
@scottrigby
scottrigby deleted the plugin-load branch July 31, 2025 17:50
scottrigby pushed a commit that referenced this pull request Oct 13, 2025
scottrigby added a commit that referenced this pull request Aug 13, 2026
…26-6061

backport of helm#32450

updated with:

```
go get google.golang.org/[email protected]
go mod tidy
```

example actions failure:
https://github.com/helm/helm/actions/runs/31733009013/job/94557780520

```
  Vulnerability #1: GO-2026-6061
      Vulnerabilities in the xDS RBAC authorization engine and the HTTP/2
      transport server implementation in google.golang.org/grpc
    More info: https://pkg.go.dev/vuln/GO-2026-6061
    Module: google.golang.org/grpc
      Found in: google.golang.org/[email protected]
      Fixed in: google.golang.org/[email protected]
      Example traces found:
  Error:       #1: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Close
  Error:       #2: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Header
  Error:       #3: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Read
  Error:       #4: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.RecvCompress
  Error:       #5: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.TrailersOnly
  Error:       #6: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Write
  Error:       #7: pkg/action/lazyclient.go:49:17: action.lazyClient.init calls sync.Once.Do, which eventually calls transport.NewHTTP2Client
  Error:       #8: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.Stream.ReadMessageHeader
  Error:       #9: pkg/action/lazyclient.go:49:17: action.lazyClient.init calls sync.Once.Do, which eventually calls transport.http2Client.Close
  Error:       #10: pkg/action/lazyclient.go:49:17: action.lazyClient.init calls sync.Once.Do, which eventually calls transport.http2Client.GracefulClose
  Error:       #11: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.http2Client.NewStream
```

Signed-off-by: Scott Rigby <[email protected]>
scottrigby added a commit that referenced this pull request Aug 13, 2026
…26-6061 (helm#32536)

backport of helm#32450

updated with:

```
go get google.golang.org/[email protected]
go mod tidy
```

example actions failure:
https://github.com/helm/helm/actions/runs/31733009013/job/94557780520

```
  Vulnerability #1: GO-2026-6061
      Vulnerabilities in the xDS RBAC authorization engine and the HTTP/2
      transport server implementation in google.golang.org/grpc
    More info: https://pkg.go.dev/vuln/GO-2026-6061
    Module: google.golang.org/grpc
      Found in: google.golang.org/[email protected]
      Fixed in: google.golang.org/[email protected]
      Example traces found:
  Error:       #1: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Close
  Error:       #2: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Header
  Error:       #3: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Read
  Error:       #4: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.RecvCompress
  Error:       #5: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.TrailersOnly
  Error:       #6: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.ClientStream.Write
  Error:       #7: pkg/action/lazyclient.go:49:17: action.lazyClient.init calls sync.Once.Do, which eventually calls transport.NewHTTP2Client
  Error:       #8: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.Stream.ReadMessageHeader
  Error:       #9: pkg/action/lazyclient.go:49:17: action.lazyClient.init calls sync.Once.Do, which eventually calls transport.http2Client.Close
  Error:       #10: pkg/action/lazyclient.go:49:17: action.lazyClient.init calls sync.Once.Do, which eventually calls transport.http2Client.GracefulClose
  Error:       #11: pkg/repo/repotest/server.go:128:32: repotest.NewOCIServer calls registry.NewRegistry, which eventually calls transport.http2Client.NewStream
```

Signed-off-by: Scott Rigby <[email protected]>
scottrigby added a commit that referenced this pull request Aug 13, 2026
Related to helm#32310
however cherry-picking is not working well here
and for this patch release, this was fixed in v0.39.0 so not bumping to v0.40.0 here

fixed with:

```
go get golang.org/x/[email protected]
go mod tidy
```

example actions fail:

```
  Vulnerability #2: GO-2026-5970
      Infinite loop on invalid input in golang.org/x/text
    More info: https://pkg.go.dev/vuln/GO-2026-5970
    Module: golang.org/x/text
      Found in: golang.org/x/[email protected]
      Fixed in: golang.org/x/[email protected]
      Example traces found:
  Error:       #1: pkg/repo/repotest/server.go:148:2: repotest.OCIServer.Run calls registry.Registry.ListenAndServe, which eventually calls norm.Form.Bytes
  Error:       #2: pkg/repo/repotest/server.go:148:2: repotest.OCIServer.Run calls registry.Registry.ListenAndServe, which eventually calls norm.Form.IsNormalString
  Error:       #3: cmd/helm/docs.go:89:61: helm.run calls cases.Caser.String, which eventually calls norm.Form.Properties
  Error:       #4: pkg/repo/repotest/server.go:148:2: repotest.OCIServer.Run calls registry.Registry.ListenAndServe, which eventually calls norm.Form.QuickSpan
  Error:       #5: pkg/repo/repotest/server.go:148:2: repotest.OCIServer.Run calls registry.Registry.ListenAndServe, which eventually calls norm.Form.String
```

Signed-off-by: Scott Rigby <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant