chore(go): audit cmd/elydora root
Drop the tautological secret file identity check and the test-only guard path wrapper. Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
1 parent
27b720ca69
commit
5e08ab20f5
3 files changed
+4
-30
No files matched your search
@@ -5,6 +5,8 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/Elydora-Infrastructure/Elydora-Go-SDK/v2/cmd/elydora/plugins"
|
||||
)
|
||||
|
||||
func setMainTestHome(t *testing.T) string {
|
||||
@@ -17,9 +19,9 @@ func setMainTestHome(t *testing.T) string {
|
||||
|
||||
func TestGuardScriptPathRejectsUnsafeAgentID(t *testing.T) {
|
||||
setMainTestHome(t)
|
||||
_, err := guardScriptPathForAgent("../escape")
|
||||
_, err := plugins.ResolveAgentRuntimeDirectory("../escape")
|
||||
if err == nil || !strings.Contains(err.Error(), "invalid agent ID") {
|
||||
t.Fatalf("guardScriptPathForAgent() error = %v", err)
|
||||
t.Fatalf("ResolveAgentRuntimeDirectory() error = %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user