Skip to content

(memory): project-root CLAUDE.md/GEMINI.md/agents.md are indexed without the sensitivity gate #295

Description

@devsuitup

Symptom

get-memories (main.js, block "2. {projectPath}/ — project root CLAUDE.md, agents.md") reads CLAUDE.md, GEMINI.md and agents.md at each known project root with a plain fs.readFileSync and feeds the content to the memory FTS index. Unlike the sibling listings, which go through scanMdFiles(dir, isAllowedMemoryPath) since #294, this block has no isSensitivePath / isAllowedMemoryPath call: a project whose CLAUDE.md is a symlink to a sensitive file (a cloned third-party repo added as a project, for instance) gets that file's content into the searchable index.

Found while re-reviewing #294; pre-existing on main, not introduced there.

Expected

The three root files pass the same gate as every other memory listing — resolved target checked with isSensitivePath and isAllowedMemoryPath before the read — and a test with a symlinked CLAUDE.md pointing at a sensitive path pins the exclusion. .ai/contexts/ipc-bridge.md guard inventory updated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions