EveryInc/compound-engineering-plugin · warning

Dropping unsafe Pi install-manifest entry in ${manifestPath}

Error message

Dropping unsafe Pi install-manifest entry in ${manifestPath} (group "${group}"): ${JSON.stringify(entry)}

What it means

filterSafePiManifestEntries in src/targets/pi.ts sanitizes entries loaded from a Pi install manifest before any cleanup acts on them. Each entry is checked with isSafeManagedPath(rootDir, entry); unsafe entries (e.g. containing path traversal, absolute paths, or resolving outside the managed root) are dropped from the returned list so cleanup will never delete outside the managed tree. The dropped entry is logged with this warning, including the manifest file, group, and raw entry JSON.

Source

Thrown at src/targets/pi.ts:372

    if ((err as NodeJS.ErrnoException).code !== "ENOENT") {
      console.warn(`Ignoring unreadable Pi install manifest at ${manifestPath}.`)
    }
  }
  return null
}

function filterSafePiManifestEntries(
  entries: unknown[],
  rootDir: string,
  manifestPath: string,
  group: string,
): string[] {
  const safe: string[] = []
  for (const entry of entries) {
    if (isSafeManagedPath(rootDir, entry)) {
      safe.push(entry)
    } else {
      console.warn(
        `Dropping unsafe Pi install-manifest entry in ${manifestPath} (group "${group}"): ${JSON.stringify(entry)}`,
      )
    }
  }
  return safe
}

async function writeInstallManifest(managedDir: string, manifest: PiInstallManifest): Promise<void> {
  await writeJson(path.join(managedDir, PI_INSTALL_MANIFEST), manifest)
}

async function cleanupRemovedSkills(
  skillsDir: string,
  manifest: PiInstallManifest | null,
  currentSkills: string[],
): Promise<void> {
  if (!manifest) return
  const current = new Set(currentSkills)

View on GitHub (pinned to c9c10f8c75)

Solutions

  1. Inspect the named manifestPath and group; remove or correct the offending entry so it is a safe relative path inside the managed root.
  2. If the manifest was hand-edited, revert to a freshly generated manifest by re-running the install (after backing up).
  3. If the entries are legitimate but flagged (e.g. you intentionally moved content), reinstall so the manifest regenerates with conforming relative entries.
  4. Note the dropped entry means that path will NOT be cleaned up; delete it manually if it is stale.

Example fix

// before: manifest entry that fails the safety check
"skills": ["ce-plan", "../../.ssh"]
// after: only safe relative entries
"skills": ["ce-plan"]
Defensive patterns

Strategy: validation

Validate before calling

function isSafeManagedEntry(rootDir: string, entry: string): boolean {
  if (typeof entry !== 'string' || entry.length === 0) return false
  if (path.isAbsolute(entry)) return false
  const resolved = path.resolve(rootDir, entry)
  return resolved.startsWith(path.resolve(rootDir) + path.sep)
}
// audit manifest entries before install: entries.every(e => isSafeManagedEntry(rootDir, e))

Type guard

function isSafeEntry(entry: unknown): entry is string {
  return typeof entry === 'string' && entry.length > 0 &&
    !path.isAbsolute(entry) && !entry.split(/[\\/]/).includes('..')
}

Prevention

When it happens

Trigger: readInstallManifest loads a manifest whose arrays (per group) contain an entry failing isSafeManagedPath — typically entries like '../evil', absolute paths, or entries that via symlinks would resolve outside rootDir. This can happen when the manifest was hand-edited or written by an older/buggy version.

Common situations: Manually editing the Pi install manifest to add paths; a previous tool version recording paths in a different format; corrupted or tampered manifest files; copying a manifest between machines with different layouts.

Related errors


AI-assisted analysis of EveryInc/compound-engineering-plugin@c9c10f8c75 (2026-08-31). Data as JSON: /api/errors/ef7a1f668547f0cd. Report an issue: GitHub.