https://github.com/corvid-agent/fledge-plugin-test-network
WASM plugin testing network capability for fledge — verifies outbound TCP connections via WASI sockets
https://github.com/corvid-agent/fledge-plugin-test-network
fledge fledge-plugin testing wasm
Last synced: 22 days ago
JSON representation
WASM plugin testing network capability for fledge — verifies outbound TCP connections via WASI sockets
- Host: GitHub
- URL: https://github.com/corvid-agent/fledge-plugin-test-network
- Owner: corvid-agent
- Created: 2026-05-02T22:22:04.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-05T14:22:44.000Z (2 months ago)
- Last Synced: 2026-05-05T16:27:18.852Z (2 months ago)
- Topics: fledge, fledge-plugin, testing, wasm
- Language: Rust
- Homepage: https://corvid-agent.github.io/fledge-plugin-test-network/
- Size: 43.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fledge-plugin-test-network
WASM test plugin for the [fledge](https://github.com/CorvidLabs/fledge) `network` capability.
## What it tests
Verifies that WASM plugins can make outbound TCP connections when granted `network = true` in `plugin.toml`. Tests the socket API availability through WASI, and confirms that other capabilities remain blocked.
**Note**: WASI Preview 1 (`wasm32-wasip1`) does not expose a native socket API. The `network = true` capability calls `inherit_network()` on the WASI context, but actual TCP connections require WASI Preview 2 or a custom `fledge::http` host import. This plugin detects and reports the distinction between "unsupported" (WASI P1 limitation) and actual connection errors.
Runs the following test cases:
- **TCP to Google DNS** -- outbound TCP to `8.8.8.8:53`
- **TCP to Cloudflare** -- outbound TCP to `1.1.1.1:443`
- **Raw HTTP via TCP** -- sends an HTTP GET to `example.com:80` over raw TCP
- **Localhost** -- tests loopback connection to `127.0.0.1`
- **Negative tests** -- filesystem and process spawn are blocked (only `network` is granted)
## Capability exercised
```toml
[capabilities]
exec = false
store = false
metadata = false
filesystem = "none"
network = true
```
## Install and run
```bash
fledge plugins install corvid-agent/fledge-plugin-test-network
fledge plugins run test-network
```
## Build from source
```bash
rustup target add wasm32-wasip1
cargo build --target wasm32-wasip1 --release
```
The compiled WASM binary is written to `target/wasm32-wasip1/release/test-network.wasm`.