MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetSecurityConfig

Method GetSecurityConfig

agent/app/service/agents.go:1281–1292  ·  view source on GitHub ↗
(req dto.AgentIDReq)

Source from the content-addressed store, hash-verified

1279}
1280
1281func (a AgentService) GetSecurityConfig(req dto.AgentIDReq) (*dto.AgentSecurityConfig, error) {
1282 agent, _, err := a.loadOpenclawAgentAndInstall(req.AgentID)
1283 if err != nil {
1284 return nil, err
1285 }
1286 conf, err := readOpenclawConfig(agent.ConfigPath)
1287 if err != nil {
1288 return nil, err
1289 }
1290 result := extractSecurityConfig(conf)
1291 return &result, nil
1292}
1293
1294func (a AgentService) UpdateSecurityConfig(req dto.AgentSecurityConfigUpdateReq) error {
1295 agent, install, err := a.loadOpenclawAgentAndInstall(req.AgentID)

Callers

nothing calls this directly

Calls 3

readOpenclawConfigFunction · 0.85
extractSecurityConfigFunction · 0.85

Tested by

no test coverage detected