move plugin safety metadata to registry

This commit is contained in:
ZacharyZcR
2026-05-18 15:57:18 +08:00
parent d4ed0867c9
commit 3dde0c6a8e
5 changed files with 52 additions and 32 deletions
+10
View File
@@ -111,6 +111,16 @@ func TestListPlugins(t *testing.T) {
if _, ok := GetPlugin("definitely-missing"); ok {
t.Fatal("unknown plugin should not exist")
}
webpoc, ok := GetPlugin("webpoc")
if !ok {
t.Fatal("missing webpoc plugin")
}
if webpoc.Safe {
t.Fatal("webpoc should be marked unsafe")
}
if !containsString(webpoc.Types, PluginTypeWeb) {
t.Fatalf("webpoc types = %#v, want web", webpoc.Types)
}
}
func TestScanHonorsCanceledContext(t *testing.T) {