shellbits

Field NotesNovember 2026

SBR-2026-05Technical guide 16 min

Path filters are blind inside .git: deleted files and dropped branches are still in the directory you hand to an AI tool

A repository directory is a compressed, hash-addressed database of every state Git still remembers. Controls that decide by path or by raw bytes have nothing to match inside it. In our lab, a path deny list matched none of the 34 files under .git, and a byte scan saw none of the canaries that were recoverable from objects.

Developer toolsData egress
In this piece
  1. 01One directory, several points in time
  2. 02Where old content lives after each everyday action
  3. 03The lab: five exports, four canaries
  4. 04What eight tools' documentation says about .git
  5. 05Recorded gaps: tools that read more than their ignore rules implied
  6. 06What the secrets research measured, and what it did not
  7. 07Three questions before a tool gets a directory
  8. 08What to do on Monday morning

When a developer says "I deleted that key", three things are usually true: the file is gone from the working directory, new commits do not contain it, and .gitignore now covers it. None of the three touches the object store. Git is a content-addressed key-value store: objects are named by hash, and a blob holds content without a file name1. While a commit or a reflog entry still points at the old content, or garbage collection has not reached it, it is still in .git.

That matters once you hand the directory to an AI coding tool. The tool gets everything its process can read. The controls that decide what may be read or sent look at paths (ignore files, deny lists) or at raw file bytes (string and pattern matching). Inside the object store, file names are hashes and content is zlib-compressed, sometimes stored only as a delta against another object12. Neither kind of control has anything to match.

Our claim: when a tool gets a directory, the unit of exposure is the object store, and most tools' documentation does not say what they do with it.

01One directory, several points in time#

Your editor shows the working tree. Everything else is under .git, or wherever .git points.

The object store has no paths#

A new object is first written as a loose file under .git/objects, in a subdirectory named after the first two characters of its hash; later Git packs objects into objects/pack12. In a pack, an object can be stored as a delta: instructions that copy byte ranges from a base object and insert new data2. File names live in tree objects; a blob has no name1.

So a repository with years of history can be a few pack-<hash>.pack files. An old customers.sql has no path of its own: its name is in a tree, its content in a blob, and both are compressed inside a pack.

What keeps old content alive#

An object stays while something reaches it. git gc keeps what is reachable from branches, tags, the index, remote-tracking branches, reflogs and everything under refs/13.

reflog
.git/logs: where each ref has pointed, on this machine only1412. It still points at commits from before an amend or a rebase13.
stash
The newest entry is refs/stash; older ones exist only in its reflog. Each is a commit, and git stash -a also stores ignored files15.
index
.git/index. The manual names earlier runs of git add as a source of unreachable objects13.
cruft pack
Where git gc puts unreachable objects by default (gc.cruftPacks is true)13.
linked worktree
Its .git is a file with a gitdir: path; objects and refs belong to the main repository1216.
alternates
objects/info/alternates lists other object stores that this repository borrows from12.

The last two mean that .git can extend beyond the directory you hand over.

02Where old content lives after each everyday action#

Two things decide how long content stays: whether anything points at it, and whether collection runs. Two clocks apply. A reflog entry expires by the date recorded in the entry14; when we checked, the commit's own date played no part. An object that nothing points at then gets a grace period (gc.pruneExpire, two weeks), counted from the object's modification time, which Git refreshes when the object is written again13. A cruft pack records that time for each object2. Automatic collection starts only above about 6,700 loose objects (gc.auto) or 50 packs (gc.autoPackLimit), so a small repository may not collect for a long time13. The periods below are the manual's defaults.

ActionWhere the content still isDefault periodWhat removes it
Delete a file and commitIn earlier commits: reachable history that every clone receives3NoneA history rewrite; clones and forks elsewhere remain17
Add it to .gitignoreNo effect on tracked files; git rm --cached changes later commits only4NoneAs above
Delete a branchThe branch reflog goes with it18, but the HEAD reflog still points at commits you made or checked out there5Reflog entries: 30 days from their own date (gc.reflogExpireUnreachable). Objects: two weeks of modification timegit gc, once both have passed
git stash dropUnreachable at once, still in the object store15. A stash you keep never expires by default19Two weeks of modification time, not from the dropgit gc after the grace period
Amend, rebase, force-pushLocally, the reflog13. A bare remote keeps no reflog by default; the old commit stays until that server collects20Local: as for a deleted branch. Remote: the platform'sLocally git gc; remotely the platform17
git gc with defaultsKeeps what refs and reflogs reach. Unreachable objects inside the grace period go into a cruft pack; older ones are deleted13Not applicableNothing inside the grace period

No row says "gone immediately", and none is an exact lifetime: the two periods overlap, and nothing goes until git gc runs. When we checked, a dropped stash whose object files were 20 days old went at the next git gc, and a commit whose reflog entries had expired stayed, because a repack had refreshed its modification time.

The lab in the next section has a second run with commit and reflog dates and object file times set 45 days back before the same default git gc: the deleted branch and the dropped stash are gone, 14 of 23 objects remain, and the deleted file is still in reachable history5. That run rewrites dates and file times; nobody waited 45 days.

03The lab: five exports, four canaries#

We built a synthetic repository, planted four canary strings in states a developer would call "dealt with", ran one default git gc, and exported the project in five ways5.

The two measurements are these functions.

labs/git-boundary/run.pypython
def scan_objects(repo: Path) -> set[str]:
    """Canaries recoverable from every object Git can still enumerate."""
    found: set[str] = set()
    listing = git(repo, "cat-file", "--batch-all-objects", "--batch-check", check=False)
    for line in listing.splitlines():
        sha, kind, _size = line.split()
        if kind != "blob":
            continue
        data = subprocess.run(["git", "-C", str(repo), "cat-file", "blob", sha], env=ENV, capture_output=True).stdout
        for name, (token, _why) in CANARIES.items():
            if token.encode() in data:
                found.add(name)
    return found


def scan_files(root: Path, skip_git: bool = True) -> set[str]:
    """Canaries visible as plain bytes in files (what a string scanner sees)."""
    found: set[str] = set()
    for p in root.rglob("*"):
        if not p.is_file() or (skip_git and ".git" in p.relative_to(root).parts):
            continue
        data = p.read_bytes()
        for name, (token, _why) in CANARIES.items():
            if token.encode() in data:
                found.add(name)
    return found
ExportFilesBytesRecoverable canariesSeen by byte scan
Copy the working tree, skip .git65,790BB
git archive HEAD55,756nonenone
git bundle --all, then clone3336,158Anone
Copy the whole directory4040,741A, B, C, DB
Copy the directory, then apply a path deny list3840,688A, C, Dnone
Export methodABCDrecoverableCopy the working tree, skip .git1 / 4git archive HEAD0 / 4git bundle --all, then clone1 / 4Copy the whole directory4 / 4Whole directory, path deny list applied3 / 4recoverable, and visible to a byte scanrecoverable, but invisible to a byte scannot in the exportAcommitted, then deleted and added to .gitignoreBignored working file, never committedCcommitted on a branch that was later deletedDstashed, then the stash was dropped
Figure 1Five export methods against four canaries. Data from labs/git-boundary/results.json (Git 2.53.0, 2026-11-22).

Three findings#

  1. "Delete and ignore" leaves content in reachable history. A is in the third export, which holds only what refs reach: what any collaborator's clone receives. A byte scan of that clone does not see it.
  2. A deleted branch and a dropped stash cannot be cloned but are still in the directory. Of 23 objects, 9 are unreachable from any ref. The HEAD reflog holds 4 of them (the branch); nothing points at the other 5 (the stash). After gc, all 23 sit in two packs.
  3. The deny list (*.env, *.sql, *.pem, *.key, id_rsa*) matched none of the 34 files under .git. It dropped two working-tree files, one of them a harmless example. The filtered copy still yields A, C and D, and a byte scan of it finds nothing.

We think a longer deny list cannot fix the third finding: the only paths in the object store look like pack-<hash>.pack. A check that finds A, C and D must decode every object, unreachable ones included. A filter that reads only paths or raw bytes and still finds them would prove us wrong.

What the lab does not show#

  • One Git version, default settings, 23 objects.
  • Plain-text canaries only; no binary keys or other content that compresses poorly.
  • C and D survive the main run because gc ran right after the repository was built; the 45-day run described above is the other end, and it is a simulation.
  • Commits are dated on the day of the run, so canary results and object counts do not drift with the calendar; our re-runs matched the record. Byte counts of exports that include .git move by a few bytes with the run date, and the third export's also contains the temporary path.
  • The deny list is ours. No real tool's filter was tested, and nothing here shows what an AI tool reads or uploads.

04What eight tools' documentation says about .git#

On 2026-11-22 we read eight tools' public documentation and recorded only what it says. "Does not say" is a finding; it means neither that the tool reads .git nor that it does not.

Tool (page date; date read)On .gitIgnore mechanism and its stated limitsCheckpoints
Cursor (undated; read 2026-11-22).git/ is in the default ignore list6.cursorignore and .gitignore. Terminal and MCP tools are not blocked; protection is not guaranteed6Local, separate from Git; mechanism not stated23
GitHub Copilot (undated; VS Code page 2026-11-18; read 2026-11-22)Not mentioned9Admin-set content exclusion. Not a filesystem security boundary; may miss indirect access9VS Code snapshots affected files before each request; location not stated24
Claude Code (no visible date; page metadata 2026-11-19 to 2026-11-21; read 2026-11-22)A protected path for writes; reads not addressed7. Worktrees share the main .git25.claudeignore has no effect. Read deny rules miss commands that do not name the file, and subprocesses7File snapshots for a session's 100 latest checkpoints, kept about 30 days26
OpenAI Codex (undated; read 2026-11-22)Read-only inside writable roots; reads not addressed8No ignore file on the page; an OS sandbox, network off by default8Not on the page
Gemini CLI (2026-04-10; read 2026-11-22)Not mentioned27.geminiignore, for tools that support it; the page names only the @ command as an example27Shadow Git repository in ~/.gemini/history/<project_hash>, local, off by default28
Cline (no visible date; page metadata 2026-02-15 and 2026-09-03; read 2026-11-22)Not mentioned29.clineignore, marked for deprecation: not a security boundary; @ mentions and shell commands still read ignored files10Shadow Git repository, on by default, includes untracked files29
Devin Desktop (no visible date; page metadata 2026-11-15; read 2026-11-22; Windsurf docs redirect here)Indexing skips hidden pathnames; .git is not named11.devinignore covers indexing, Tab and DeepWiki; it does not block the agent's file tools11Not on the page
JetBrains AI Assistant (2026-10-12; read 2026-11-22)Not mentioned30.aiignore; ignored files may still be processed in some cases30Not on the page

Three observations. No page promises that .git is never read or sent: Cursor's own page exempts the terminal, and write protection in Claude Code and Codex guards against tampering, not disclosure. Checkpoints make a second copy: Gemini CLI and Cline implement checkpoints as a shadow Git repository, a second object store, and neither page says whether ignored files are excluded or when that store is collected. And one vendor's documents can disagree: Cursor's search page (undated) says its Instant Grep index is built on the machine, and that Cursor neither uploads paths or code to build a search index nor stores embeddings for search31, while its blog post of 2026-01-27 describes an indexing pipeline with embeddings that uploads every file of a new codebase32. The two may describe different features or different dates; we cannot tell, so we report both.

05Recorded gaps: tools that read more than their ignore rules implied#

In September 2026 the researcher ferstar documented that Z.ai's ZCode 3.12.3 packaged the whole workspace, complete .git included (86.6% of the payload in ferstar's sample), and tried to upload it, even with two related settings off. That 313MB archive did not upload; the server accepted a small public repository of 538 files33. Z.ai apologised and said 3.14.0 disabled the snapshot workflow34. Our SBR-2026-04 covers that case.

RecordIdentifier, date, versionWhat happenedVendor response
CursorCVE-2025-64110 (GHSA-vhc2-fjv4-wqch), 2025-11-03, High; affected 1.7.23, patched 2.035. CVE record: CVSS 4.0 score 8.7, affected below 2.036After prompt injection, or with a malicious model, the agent could write a new cursorignore file that invalidated existing ones, then read protected filesThe agent can no longer create or edit cursorignore files35
Claude CodeThe Register, 2026-01-28; version 2.1.12; no CVE that we found37The Register listed .env in .claudeignore, and separately in .gitignore; Claude Code still read the file. The model itself had recommended .claudeignoreAnthropic did not answer The Register's request for comment. Current documentation says .claudeignore has no effect7
Claude CodeIssue #6699, 2025-08-28 to 2025-09-02; reported on 1.0.9338A deny rule did not stop .env from being read, the reporter saidA collaborator blamed pattern syntax; another user disputed it; the reporter confirmed the rules on 1.0.100. No fix version named

GitHub's changelog of 2026-09-02 says the Copilot app and CLI now respect content exclusion policies39. We infer that one policy took effect on different dates on different surfaces.

The common factor is where the rule lives: inside the tool, which decides whether to pass through it. We expect more such gaps, because an agent has a terminal, and a check on the tool's own file-reading path leaves other paths open.

06What the secrets research measured, and what it did not#

28.65 million

New hardcoded secrets in public GitHub commits in 2025, up 34%. GitGuardian, 2026-03-1740

> 64%

Secrets confirmed valid in 2022 that were still valid in January 202640

17.78%

"Potential secrets" that a scan of a regular git clone misses compared with --mirror, across 52,268 repositories of the top 100 GitHub organisations by stars. Aqua Security, 2024-06-2341

40

Valid API keys found in deleted forks of 3 public repositories. Truffle Security, 2024-07-2442

Each figure measures something different. GitGuardian counts new secrets in public commits and retests old ones; its summary does not separate current files from history40. It shows that most secrets in that sample were not rotated, which is why old content keeps its value.

Aqua's figure counts unvalidated scanner findings, and the authors say the gap comes mainly from refs a regular clone does not fetch, such as refs/pull/, with deleted content only one part41. Truffle Security's studies concern hosting platforms: commits stay retrievable by hash through a fork network after the fork is deleted42, and a scan of all zero-commit force-push events in GH Archive since 2020 found, by its author's account, thousands of active secrets and earned about $25k in bounties; the post gives no exact count43.

Nobody, as far as we found, has measured the .git on developer machines: secrets in reflogs, stashes and cruft packs. Our lab shows a mechanism, not prevalence.

07Three questions before a tool gets a directory#

For each tool that will get a directory, write down three answers and their sources.

QuestionWhat to checkFor .git
1. What can the process read?Which user it runs as, where it starts, whether it has a terminalAn agent that runs commands can run git and read any object; worktrees and alternates extend the range
2. By its own documentation, what does it persist or send?Indexes, caches, checkpoints, telemetry, model requests, each with a dated sentenceRecord silence as "unknown"
3. What enforces the rule?An operating-system boundary, or the tool's own ruleA tool's rule covers only the paths the tool routes through it

The answers to the third question fall on four rungs.

  1. 01

    The data is absent

    You hand over an export; there is no object store to read.

    Unreadable
  2. 02

    Operating-system boundary

    A sandbox or container limits reads and outbound connections, subprocesses included.

    Enforced by the OS
  3. 03

    The tool's own rule

    Ignore files, deny rules, content exclusion, each with stated exceptions.

    Self-enforced
  4. 04

    Not documented

    Assume it reads and stores until there is evidence.

    Unknown

Check sandbox defaults too. Once enabled, Claude Code's sandbox restricts writes and outbound connections by default, but reads cover most of the machine unless you set denyRead, which does not govern the built-in Read tool44. In Codex's sandbox .git is read-only, so still readable8. This means that, for confidentiality, the documented defaults rely on blocking the network.

08What to do on Monday morning#

Take stock of what the directory still holds#

These commands are read-only.

bash
git count-objects -vH
git rev-list --all --objects | wc -l
git cat-file --batch-all-objects --batch-check | wc -l
git fsck --unreachable --no-reflogs
git stash list
git worktree list
cat "$(git rev-parse --git-common-dir)/objects/info/alternates"
git log --all --diff-filter=D --name-only --format='%h %ad %s' --date=short
git log --all --reflog --oneline -S'string-to-find'

Lines two and three compare the objects reachable from refs with everything in the store, unreachable objects and alternates included45; when we checked the lab repository, they printed 14 and 23. Line four lists what only a reflog keeps, or nothing keeps46. Line seven prints an error when the repository has no alternates. The last line has a blind spot: when we checked, it found C but not D, which no reflog points at. Any scanner that walks history from refs and reflogs shares it. To cover every object, decode each blob:

bash
git cat-file --batch-all-objects --batch-check='%(objectname) %(objecttype)' |
  awk '$2=="blob"{print $1}' |
  while read -r id; do
    git cat-file blob "$id" | grep -a -q 'pattern-to-find' && echo "$id"
  done
git log --all --reflog --find-object=<blob-hash> --format='%h %s' --name-only

Rotate first, then remove#

Revoke or rotate a secret first. GitHub's documentation says a rewrite may then be unnecessary, and that rewritten content can remain in clones, forks, cached views and pull requests17. We infer that a tool's caches and checkpoints belong to the same class.

Content that is only in unreachable objects needs no rewrite:

bash
git reflog expire --expire=now --all
git gc --prune=now

Both lines are destructive. The first deletes every reflog entry, and with them older stashes, which exist only there15; when we checked, the newest stash stayed in refs/stash although git stash list printed nothing, so run git stash clear first if stashes must go too. The second collects immediately, which the manual says risks corruption if another process is writing13. The order matters: when we checked, git gc --prune=now alone left C in place.

Content in reachable history, like A, needs git filter-repo, which the Git manual recommends over git filter-branch4748. GitHub's documentation requires version 2.47 or later:

bash
git-filter-repo --sensitive-data-removal --invert-paths --path config/settings.env

This is also destructive: it rewrites commit hashes, and a colleague's old clone can push the content back17. We did not run it.

Hand over an export, not the repository#

bash
mkdir ../export && git archive HEAD | tar -x -C ../export
git clone --depth 1 "file://$PWD" ../export-git
git -C ../export-git remote remove origin
git fetch ../export-git main && git merge --ff-only FETCH_HEAD

The first line exports one tree, without .git49; in the lab it was the only export with no canary5. Lines two and three make a separate copy one commit deep, and line four brings the agent's commits back. Three traps:

  • Use file://. From a local path, Git copies everything under objects5047. When we checked, it printed a warning, ignored --depth, and the copy carried A, C and D.
  • A shallow copy can deepen itself while it can reach its source. Remove the remote, and keep the source out of the agent's reach: when we checked, the copy's reflog still named the source path.
  • A linked worktree isolates edits, not history: the object store is shared1216, as Claude Code's documentation also states25. When we checked, A, C and D were readable from one.

Sandboxes, organisation controls, and guidance worth reading#

When work must happen in the original repository, use the top two rungs. Codex sandboxes commands by default, without network8. Claude Code's sandbox must be enabled, and its list of allowed domains starts empty44. The Copilot cloud agent's firewall is on by default, and GitHub says sophisticated attacks may bypass it51. Managed settings7 and organisation-level content exclusion9 make a rule consistent, we think, not stronger.

Worth reading: the Singapore CSA handbook for agentic coding assistants (v1.0, 2026-10-15), whose control M-013 blocks sensitive files unless a task needs them52; and OWASP's Secure Coding with AI cheat sheet, which warns that .gitignore affects only Git53. Neither discusses Git history or unreachable objects.

References53

  1. Pro Git, 2nd Edition, 10.2 Git Internals: Git ObjectsScott Chacon, Ben Straub · git-scm.comgit-scm.com/book/en/v2/Git-Internals-Git-ObjectsRead 2026-11-22; the page carries no date. Supports: content addressing, blobs without file names, trees holding names, zlib compression.
    DocumentationOriginal read↩× 3
  2. gitformat-pack(5): Git pack formatGit project (git-scm.com)git-scm.com/docs/gitformat-packRead 2026-11-22. Last updated in 2.54.0. Supports: delta objects exist only in packs, the two delta instructions, cruft packs and the .mtimes file.
    DocumentationOriginal read↩× 3
  3. Pro Git, 2nd Edition, 10.7 Git Internals: Maintenance and Data RecoveryScott Chacon, Ben Straub · git-scm.comgit-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-RecoveryRead 2026-11-22; no date. Supports: a file removed in the very next commit is still downloaded by every clone. The book's description of dangling objects staying out of packs predates cruft packs and is not used here.
    DocumentationOriginal read↩× 2
  4. gitignore(5): Specifies intentionally untracked files to ignoreGit project (git-scm.com)git-scm.com/docs/gitignoreRead 2026-11-22. Last updated in 2.55.0.
    DocumentationOriginal read↩× 2
  5. labs/git-boundary: run.py, results.jsonShellbits Research · 2026-11-22Git 2.53.0, Python 3.14.4, default settings, a synthetic repository of 23 objects. Figures in the article come from the recorded results.json (run_date 2026-11-22). The main run dates every commit on the day of the run. A second run (aged) sets commit dates and object file times 45 days back before the same default git gc: 14 objects remain, C and D are collected, and A is still in reachable history. That run is a simulation: it rewrites dates and file times; nobody waited 45 days. Re-runs on 2026-11-22: same canary results and object counts; byte counts of exports that include .git move by a few bytes with the run date, and the third export's also contains the temporary path.
    Our lab↩× 7
  6. Ignore fileCursor Docscursor.com/docs/reference/ignore-fileRead 2026-11-22; no date. The older URL /docs/context/ignore-files redirects here.
    DocumentationOriginal read↩× 3
  7. Configure permissionsAnthropic (Claude Code Docs) · 2026-11-20code.claude.com/docs/en/permissionsRead 2026-11-22 (the .md rendering). The page shows no date; the date field is dateModified from the metadata of the HTML rendering.
    DocumentationOriginal read↩× 5
  8. Agent approvals & securityOpenAI (Codex documentation)learn.chatgpt.com/docs/agent-approvals-security.mdRead 2026-11-22; no date. developers.openai.com/codex/agent-approvals-security.md redirects here. We found no page on checkpoints or an ignore file in the documentation index (llms.txt).
    DocumentationOriginal read↩× 5
  9. Content exclusion for GitHub CopilotGitHub Docsdocs.github.com/en/copilot/concepts/security-governance-and-network-s…Read 2026-11-22; no date. The older URL /copilot/concepts/context/content-exclusion redirects here.
    DocumentationOriginal read↩× 4
  10. .clineignore (deprecate soon)Cline Docs · 2026-09-03docs.cline.bot/customization/clineignoreRead 2026-11-22. The page shows no date; the date field is dateModified from the metadata of the HTML rendering.
    DocumentationOriginal read↩× 2
  11. Devin Desktop .devinignoreCognition (Devin Docs) · 2026-11-15docs.devin.ai/desktop/context-awareness/devin-ignoreRead 2026-11-22 (the .md rendering). The page shows no date; the date field is dateModified from the metadata of the HTML rendering. docs.windsurf.com/context-awareness/windsurf-ignore redirects here.
    DocumentationOriginal read↩× 3
  12. gitrepository-layout(5): Git Repository LayoutGit project (git-scm.com)git-scm.com/docs/gitrepository-layoutRead 2026-11-22. The page says it was last updated in 2.49.0, with no changes through 2.56.1.
    DocumentationOriginal read↩× 5
  13. git-gc(1): Cleanup unnecessary files and optimize the local repositoryGit project (git-scm.com)git-scm.com/docs/git-gcRead 2026-11-22. Last updated in 2.52.0, no changes through 2.56.1. All default periods (gc.reflogExpire 90 days, gc.reflogExpireUnreachable 30 days, gc.pruneExpire two weeks, gc.auto 6700, gc.autoPackLimit 50, gc.cruftPacks true) come from this page. The reflog defaults in the manual do not match the source of 2.50.0 to 2.56.1; see git-src-reflog.
    DocumentationOriginal read↩× 10
  14. git-reflog(1): Manage reflog informationGit project (git-scm.com)git-scm.com/docs/git-reflogRead 2026-11-22. Last updated in 2.51.1. Supports: reflogs record the local repository only; --expire and --expire-unreachable test the age of the entry ("Prune entries older than the specified time"), and the page gives the two defaults as 90 days and 30 days.
    DocumentationOriginal read↩× 2
  15. git-stash(1): Stash the changes in a dirty working directory awayGit project (git-scm.com)git-scm.com/docs/git-stashRead 2026-11-22. Last updated in 2.56.0. The page does not describe how untracked files are represented inside a stash commit.
    DocumentationOriginal read↩× 3
  16. git-worktree(1): Manage multiple working treesGit project (git-scm.com)git-scm.com/docs/git-worktreeRead 2026-11-22. Last updated in 2.56.0.
    DocumentationOriginal read↩× 2
  17. Removing sensitive data from a repositoryGitHub Docsdocs.github.com/en/authentication/keeping-your-account-and-data-secur…Read 2026-11-22; the page carries no date.
    DocumentationOriginal read↩× 4
  18. git-branch(1): List, create, or delete branchesGit project (git-scm.com)git-scm.com/docs/git-branchRead 2026-11-22. Last updated in 2.56.0. Supports: deleting a branch also deletes that branch's reflog.
    DocumentationOriginal read↩
  19. git/git: reflog.h, reflog.c, builtin/reflog.c (v2.49.0; v2.50.0 to v2.56.1; maint, next, master)Git project (GitHub mirror)github.com/git/git/blob/v2.56.1/reflog.hRead 2026-11-22 as raw files from raw.githubusercontent.com. In reflog.h at all 17 release tags from v2.50.0 to v2.56.1 (v2.50.0 to v2.50.2, v2.51.0 to v2.51.3, v2.52.0, v2.52.1, v2.53.0, v2.53.1, v2.54.0, v2.54.1, v2.55.0, v2.55.1, v2.56.0, v2.56.1) and on the maint branch, REFLOG_EXPIRE_OPTIONS_INIT sets default_expire_total to 30 days and default_expire_unreachable to 90 days; next and master have 90 and 30. builtin/reflog.c at v2.49.0 has the older form (unreachable 30 days, total 90 days). reflog.c at v2.53.0 and v2.56.1 tests expire_total first and has the branch that makes the stash reflog never expire when unconfigured. Release-candidate tags were not read.
    Source codeOriginal read↩× 2
  20. git-config(1): core.logAllRefUpdatesGit project (git-scm.com)git-scm.com/docs/git-configRead 2026-11-22. Last updated in 2.56.1. Supports: the reflog is off by default in a bare repository.
    DocumentationOriginal read↩
  21. Git: git-scm.com home page (Latest source release)Git project (git-scm.com)git-scm.comRead 2026-11-22. The latest source release shown that day was 2.56.1, dated 2026-10-26.
    DocumentationOriginal read↩
  22. reflog: fix default expiry periods(commit 60cf5005515d)Pushkar Singh · Git project (GitHub mirror) · 2026-09-24github.com/git/git/commit/60cf5005515d6df30bfc3c1dd13475e13b12f445Read 2026-11-22: the .patch (message and full diff) and the GitHub API commit data and compare results. The diff changes two lines of reflog.h and adds four tests to t/t1410-reflog.sh. The message says the defaults were swapped in the refactoring commit 85658275702b; we read that commit's diff too, and the swap is in it. The message also says unreachable entries came to expire after 90 days; what we ran on Git 2.53.0 expired every unconfigured entry after 30 days, because the code tests the total period first. The commit is an ancestor of master and next, and not of v2.56.1 or maint. We did not check which release will carry it.
    Source codeOriginal read↩
  23. Cursor Agent(Checkpoints)Cursor Docscursor.com/docs/agent/overviewRead 2026-11-22; no date. The older URL /docs/agent/chat/checkpoints redirects here.
    DocumentationOriginal read↩
  24. Review and revert agent changesVisual Studio Code Docs · 2026-11-18code.visualstudio.com/docs/agents/run/review-code-editsRead 2026-11-22. Covers sessions inside VS Code only; we did not look at checkpoints on other Copilot surfaces.
    DocumentationOriginal read↩
  25. Run parallel sessions with worktreesAnthropic (Claude Code Docs) · 2026-11-21code.claude.com/docs/en/worktreesRead 2026-11-22 (the .md rendering). The page shows no date; the date field is dateModified from the metadata of the HTML rendering.
    DocumentationOriginal read↩× 2
  26. CheckpointingAnthropic (Claude Code Docs) · 2026-11-19code.claude.com/docs/en/checkpointingRead 2026-11-22 (the .md rendering). The page shows no date; the date field is dateModified from the metadata of the HTML rendering. The page does not give the on-disk location of the snapshots.
    DocumentationOriginal read↩
  27. Ignoring filesGemini CLI Docs (Google) · 2026-04-10geminicli.com/docs/cli/gemini-ignoreRead 2026-11-22. A banner says Antigravity CLI replaced Gemini CLI for unpaid-tier and Google One users on 18 June 2026.
    DocumentationOriginal read↩× 3
  28. CheckpointingGemini CLI Docs (Google) · 2026-04-10geminicli.com/docs/cli/checkpointingRead 2026-11-22. The page does not say whether the shadow repository honours .gitignore or .geminiignore.
    DocumentationOriginal read↩
  29. CheckpointsCline Docs · 2026-02-15docs.cline.bot/core-workflows/checkpointsRead 2026-11-22. The page shows no date; the date field is dateModified from the metadata of the HTML rendering. The older URL /features/checkpoints redirects here.
    DocumentationOriginal read↩× 2
  30. Restrict or disable AI Assistant featuresJetBrains (AI Assistant 2026.3 Help) · 2026-10-12jetbrains.com/help/ai-assistant/disable-ai-assistant.htmlRead 2026-11-22.
    DocumentationOriginal read↩× 2
  31. Search(Instant Grep;Privacy and security)Cursor Docscursor.com/docs/agent/tools/searchRead 2026-11-22; no date. The older URL /docs/context/codebase-indexing redirects here. The page is about Instant Grep: the index is built on the machine, no paths or code are uploaded to build a search index, and no embeddings are stored for search. Its description differs from cursor-indexing-blog; the two may describe different features or different dates.
    DocumentationOriginal read↩
  32. Securely indexing large codebasesCursor Blog · 2026-01-27cursor.com/blog/secure-codebase-indexingRead 2026-11-22. Describes semantic indexing with a Merkle tree, chunks and embeddings, and says the pipeline uploads every file for a new codebase. The page carries no correction or retirement note.
    Vendor statementOriginal read↩
  33. Inside ZCode: Silently Uploading Your Entire Git History to the Cloudferstar · Code is cheap, let's talk (personal blog, English edition) · 2026-09-18blog.ferstar.org/en/posts/zcode-silent-workspace-snapshot-uploadRead 2026-11-22. Includes updates dated 19, 21 and 23 September. Supports: what the researcher saw ZCode 3.12.3 package, the local state, and the behaviour of the settings; the 313MB archive stayed pending, and a separate public-repository workspace of 538 files was accepted by the server. Does not support: what the server did with anything it received.
    First-hand reportOriginal read↩
  34. Z.ai apologised, open-sourced ZCode, and wiped the commit historyThe Next Web · 2026-09-22thenextweb.com/news/zai-zcode-open-source-commit-history-security-ass…Read 2026-11-22. We did not open Z.ai's own statements; the vendor response is taken from this report and from ferstar's record. The report says Z.ai disabled the workflow that generated and uploaded local repository snapshots and shipped the fix in v3.14.0.
    PressOriginal read↩
  35. Cursorignore Bypass via New Cursorignore Write(GHSA-vhc2-fjv4-wqch,CVE-2025-64110)Cursor (GitHub Security Advisory) · 2025-11-03github.com/cursor/cursor/security/advisories/GHSA-vhc2-fjv4-wqchRead 2026-11-22. The advisory lists affected version 1.7.23, patched version 2.0, severity High. The page text we retrieved shows no CVSS score; for the score and the version range see cve-2025-64110.
    AdvisoryOriginal read↩× 2
  36. CVE-2025-64110, Cursor: Authentication Bypass Possible via New Cursorignore Write(CVE Record,CVE JSON 5)CVE Program (CVE Services API; CNA: GitHub) · 2025-11-04cveawg.mitre.org/api/cve/CVE-2025-64110Read 2026-11-22. From the CNA container: affected versions "< 2.0", CVSS 4.0 base score 8.7 (HIGH), CWE-284, record published 2025-11-04, last updated 2025-11-07. The description says "1.7.23 and below". No NVD score is used.
    AdvisoryOriginal read↩
  37. Claude Code ignores ignore rules meant to block secretsThomas Claburn · The Register · 2026-01-28theregister.com/2026/01/28/claude_code_ai_secrets_filesRead 2026-11-22 (the URL redirects to a new path). The Register reproduced the behaviour itself on version 2.1.12; .claudeignore and .gitignore were two separate tests. The article says Anthropic did not respond to a request for comment.
    PressOriginal read↩
  38. Critical Security Bug: `deny` permissions in `settings.json` are not enforced(issue #6699)coygeek · GitHub (anthropics/claude-code) · 2025-08-28github.com/anthropics/claude-code/issues/6699Read 2026-11-22 through the GitHub API (issue and comments). Closed as completed on 2 September 2025. The thread does not settle whether this was a defect or a pattern-syntax problem.
    First-hand reportOriginal read↩
  39. Content exclusions generally available in Copilot app and CLIGitHub Changelog · 2026-09-02github.blog/changelog/2026-09-02-content-exclusions-generally-availab…Read 2026-11-22.
    Vendor statementOriginal read↩
  40. The State of Secrets Sprawl 2026: AI-Service Leaks Surge 81% and 29M Secrets Hit Public GitHubAnna Nabiullina, Carole Winqwist · GitGuardian Blog · 2026-03-17blog.gitguardian.com/the-state-of-secrets-sprawl-2026Read 2026-11-22. This is the blog summary; the full report PDF was not opened. The page does not separate secrets in current files from secrets only in history.
    Research reportOriginal read↩× 3
  41. Phantom Secrets: Undetected Secrets Expose Major CorporationsYakir Kadkoda, Ilay Goldman · Aqua Security · 2024-06-23aquasec.com/blog/undetected-hard-code-secrets-expose-corporationsRead 2026-11-22; page metadata shows a modification on 30 April 2026. The 17.78% figure counts potential secrets reported by a scanner, not validated secrets.
    Research reportOriginal read↩× 2
  42. Anyone can Access Deleted and Private Repository Data on GitHubJoe Leon · Truffle Security · 2024-07-24trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-d…Read 2026-11-22. That GitHub treats this as intended design is the researchers' account; GitHub's own reply is not on the page.
    Research reportOriginal read↩× 2
  43. Guest Post: How I Scanned all of GitHub’s “Oops Commits” for Leaked SecretsSharon Brizinov · Truffle Security · 2025trufflesecurity.com/blog/guest-post-how-i-scanned-all-of-github-s-oop…Read 2026-11-22. The original publication date is not on the page. The year is inferred: the tool repository released with the post, trufflesecurity/force-push-scanner, was created on 2025-06-26 (GitHub API). The post says thousands of active secrets were found and gives no exact count.
    Research reportOriginal read↩
  44. Configure the sandboxed Bash toolAnthropic (Claude Code Docs) · 2026-11-20code.claude.com/docs/en/sandboxingRead 2026-11-22 (the .md rendering). The page shows no date; the date field is dateModified from the metadata of the HTML rendering. The page says the sandbox is off by default.
    DocumentationOriginal read↩× 2
  45. git-cat-file(1): Provide contents or details of repository objectsGit project (git-scm.com)git-scm.com/docs/git-cat-fileRead 2026-11-22. Last updated in 2.56.0. Supports: --batch-all-objects covers every object in the repository and its alternates, reachable or not.
    DocumentationOriginal read↩
  46. git-fsck(1): Verifies the connectivity and validity of the objects in the databaseGit project (git-scm.com)git-scm.com/docs/git-fsckRead 2026-11-22. Last updated in 2.53.0.
    DocumentationOriginal read↩
  47. git-filter-branch(1): Rewrite branchesGit project (git-scm.com)git-scm.com/docs/git-filter-branchRead 2026-11-22. Last updated in 2.44.0. Used only for its warning (not recommended; use git filter-repo) and its checklist for shrinking a repository.
    DocumentationOriginal read↩× 2
  48. git-filter-repo: READMEElijah Newren · GitHub (newren/git-filter-repo)github.com/newren/git-filter-repoRead 2026-11-22 (README.md on the main branch). We did not install or run the tool.
    DocumentationOriginal read↩
  49. git-archive(1): Create an archive of files from a named treeGit project (git-scm.com)git-scm.com/docs/git-archiveRead 2026-11-22. Last updated in 2.54.0.
    DocumentationOriginal read↩
  50. git-clone(1): Clone a repository into a new directoryGit project (git-scm.com)git-scm.com/docs/git-cloneRead 2026-11-22. Last updated in 2.54.0. Supports: a clone from a local path copies everything under the objects directory, hardlinked when possible; the definition of --depth.
    DocumentationOriginal read↩
  51. Customizing or disabling the firewall for GitHub CopilotGitHub Docsdocs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilo…Read 2026-11-22; no date.
    DocumentationOriginal read↩
  52. Security Assessment Handbook: Agentic AI Coding Assistants(v1.0)Cyber Security Agency of Singapore · 2026-10-15cyber-security-agency-singapore.github.io/security-assessment-handboo…Read 2026-11-22. The handbook page shows v1.0 (2026); the publication date, 15 October 2026, comes from the csa.gov.sg publication page (updated 20 November 2026). The handbook's only mention of Git is .git/hooks as a write path.
    StandardOriginal read↩
  53. Secure Coding with AI Cheat SheetOWASP Cheat Sheet Seriescheatsheetseries.owasp.org/cheatsheets/Secure_Coding_with_AI_Cheat_Sh…Read 2026-11-22; no date. It does not mention the .git directory or Git history.
    StandardOriginal read↩

Cite this piece

Shellbits Research. “Path filters are blind inside .git: deleted files and dropped branches are still in the directory you hand to an AI tool.” Field Notes, SBR-2026-05. 2026-11-22. https://shellbits.com/research/what-is-in-dot-git/

Version and notesv1.0

First published . Corrections: research@shellbits.com; we log every correction here.

Code and recorded output for the lab in this piece: labs/git-boundary/

On the Shellbits platform this problem belongs to Aperture.

Related pieces