T09 · Insecure Skill Coding Practices
- Location
config-tracker.js:31- Finding
Automatic Git Versioning Persistently Retains Sensitive Configuration and Agent Data
- Content
View full analysis
path.join(workspacePath, f)); const existingWorkspaceFiles = await Promise.all( workspaceFiles.map(async (f) => ({ path: f, exists: await fileExists(f) })) ); const validWorkspaceFiles = existingWorkspaceFiles .filter(f => f.exists) .map(f => f.path); if (validWorkspaceFiles.length > 0) { // Ensure git repo exists for workspace await initGitRepo(workspacePath, this.config); const changedWorkspaceFiles = await hasChanges(workspacePath, validWorkspaceFiles); if (changedWorkspaceFiles.length > 0) { await commitChanges(workspacePath, changedWorkspaceFiles, this.config); } } // 2. Track openclaw.json const openclawConfigPath = expandTilde(this.config.openclawConfig); const openclawDir = path.dirname(openclawConfigPath); if (await fileExists(openclawConfigPath)) { // Ensure git repo exists for ~/.openclaw/ await initGitRepo(openclawDir, this.config); const changedConfigFiles = await hasChanges(openclawDir, [openclawConfigPath]); if (changedConfigFiles.length > 0) { await commitChanges(openclawDir, changedConfigFiles, this.config); } } } ``` ### Technical Analys ...[truncated 2302 chars]- Remediation
View remediation
