feat: Add support for custom autodiscovery plugin#7034
Merged
olblak merged 15 commits intoupdatecli:mainfrom Jan 4, 2026
Merged
feat: Add support for custom autodiscovery plugin#7034olblak merged 15 commits intoupdatecli:mainfrom
olblak merged 15 commits intoupdatecli:mainfrom
Conversation
Signed-off-by: Olblak <me@olblak.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for custom autodiscovery plugins using WebAssembly (WASM) via the Extism framework. The feature enables users to write custom autodiscovery logic in multiple languages (Rust, JS, Go, C#, F#, C, Haskell, and Zig) that can be executed in a secure sandboxed environment.
Key Changes:
- Introduces a new WASM-based plugin system for autodiscovery with configurable allowed paths, hosts, and timeouts
- Integrates plugin support into the existing autodiscovery framework with experimental feature flag protection
- Provides host functions for plugins to interact with Updatecli's Docker image source spec generation
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/plugins/autodiscovery/plugin/main.go |
Core plugin implementation with WASM initialization and manifest discovery logic |
pkg/plugins/autodiscovery/plugin/spec.go |
Plugin specification structure defining allowed paths, hosts, and timeout configuration |
pkg/plugins/autodiscovery/plugin/utils.go |
Utility function for processing and normalizing allowed paths for WASM sandbox |
pkg/plugins/autodiscovery/plugin/hostFunction.go |
Host function exposing Docker source spec generation to WASM plugins |
pkg/plugins/autodiscovery/plugin/main_test.go |
Test suite validating plugin execution with demo WASM binary |
pkg/core/pipeline/autodiscovery/main.go |
Integration point adding plugin crawler support with .wasm file detection |
pkg/plugins/autodiscovery/plugin/testdata/demo/data.txt |
Test data for demo plugin validation |
e2e/updatecli.d/success.d/autodiscovery/plugin/updatecli.yaml |
End-to-end test configuration demonstrating plugin usage |
go.mod |
Added Extism and Wazero dependencies for WASM runtime |
go.sum |
Dependency checksums for new WASM-related packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #5730
Add support for custom autodiscovery plugin using WASM.
This feature leverage the WASM framework Extism which allows writing plugin using Rust, JS, Go, C#, F#, C, Haskell, and Zig
I also created this repository https://github.com/updatecli/plugins to host a plugin example.
A simple Updatecli manifest looks like
Where the autodiscovery crawler kind can be a file with the ".wasm" extension
At the moment it supports local files but we can envision supporting OCI artifacts in order to push/push plugins similar to Updatecli shared policies.
Please note that WASM comes with its own set of limitations.
Test
To test this pull request, you can run the following commands:
Additional Information
Checklist
Tradeoff
By default, a WASM container doesn't have access to the host local files. For that we need to allow list some path such as
If
allowedpathsis unset, then I made the decision to automatically load the local directory or the scm directory if a scm configuration is specified, to reduce the amount of configuration needed in the Updatecli manifest.By default, a WASM binary is executed from the directory
/mntPotential improvement