Scan your whole stack
From OX Research Newsroom
Are you using @statewalker/vcs-store-files?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.7.0
@statewalker/vcs-store-files was last scanned on 23 Nov 2026 at version 0.7.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.7.0 LATEST | 23 Nov 2026 | No rules fired |
| 0.6.0 | 22 Nov 2026 | No rules fired |
| 0.3.2 | 6 Oct 2026 | No rules fired |
| 0.3.1 | 4 Oct 2026 | Not shown |
Findings for v0.7.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.7.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
StateWalker VCS storage that reads and writes a standard .git directory: zlib-compressed loose
objects, pack files with their .idx, loose and packed refs, reflogs, the binary index file, and
the state files of merge, rebase, cherry-pick, revert and stash. All I/O goes through a FilesApi,
so the same code runs against the Node filesystem or any other FilesApi implementation.
A repository written by this package is a repository git can open, and the reverse: git log,
git status and git fsck work on it, and it can read what git init, git commit,
git pack-refs and git repack produce. That is the point of a file backend. It lets an
application keep its data where other Git tools already look, and move between StateWalker code
and the git binary without import or export. The other backends (@statewalker/vcs-store-mem,
-kv, -sql) are for places with no filesystem.
pnpm add @statewalker/vcs-store-files
No peer dependencies. You need a FilesApi: in Node, createNodeFilesApi({ rootDir }) from
@statewalker/vcs-utils-node/files; in tests, createInMemoryFilesApi() from
@statewalker/vcs-core.
| Entry point | Gives |
|---|---|
@statewalker/vcs-store-files |
Everything listed below |
Main exports:
| Export | What it is |
|---|---|
createGitFilesBackend({ files, gitDir?, create?, defaultBranch? }) |
{ history, objects, packs, looseStorage, files, gitDir } over a .git directory: objects reads packs first, then loose objects; packs is the PackSet it reads from. create: true writes HEAD, config, objects/, refs/heads, refs/tags. The result is what repack() and FileGcStrategy take. |
createGitFilesHistoryFromFiles(options) |
Same options, returns a HistoryWithOperations (adds serialization, and delta: a read-only view of which packed objects are deltas). |
FileStagingStore(files, indexPath) |
Staging stored in Git's binary index format (.git/index). |
createFileWorktree({ files, rootPath, blobs, trees, gitDir?, newHasher? }) / FileWorktree |
Worktree over the working directory, with .gitignore support and checkoutTree. computeHash streams the file through newHasher (SHA-1 by default) with its size from stat; checkoutTree streams each blob into FilesApi.write. Neither holds a whole file in memory. |
gc({ history, files, gitDir?, dryRun?, pruneExpireMs?, tmpExpiryMs?, orphanPackExpiryMs?, packRefs?, repack?, writeCommitGraph?, environment? }) |
git gc: under a gc.pid lock, repacks everything reachable into one pack (repack -A -d: unreachable packed objects younger than two weeks are loosened), packs refs, prunes unreachable loose objects older than two weeks, sweeps stale temporaries and orphaned .pack files, then writes the commit-graph (gc.writeCommitGraph, default true; a failure is reported in commitGraphError, as git's gc goes on). |
writeCommitGraph({ files, objects, refs, commitGraph?, reachable?, commits?, append?, split?, ... }) |
git commit-graph write --reachable (or from given commits; --append, --split[=no-merge\|replace], --changed-paths): files byte-identical to git's. The backend's history.commitGraph reads the graph on first use (settings from the global and system config too with the backend's environment), and again after this process changes the shallow file or a replace ref; walks take parents, trees, dates and generations from it. |
repack({ ...backend, all?, unpackUnreachable?, deltaSearch?, dryRun? }) |
git repack -a -d (default), git repack -A -d with unpackUnreachable: true, or, with all: false, git repack -d: one streamed pack, .keep packs honoured, replaced packs and loose copies removed after the install; only packs present before the walk are replaced. |
FileGcStrategy(backend) |
GcStrategy for @statewalker/vcs-core: prune, compact (= repack with all: false), getStats. |
listReachableObjects / collectReachabilityRoots |
What repack and gc keep: objects reachable from every ref, HEAD, the reflogs, the index and every linked worktree's HEAD, index and reflogs. Refs are read strictly: an unreadable or malformed ref throws. |
Lower-level building blocks, also exported:
| Area | Exports |
|---|---|
| Object kernel store | filesStagingStore(files, objectsDir, { freshenMaxAgeMs? }): git's loose layout as a StagingBlobStore for createGitObjects, written through tmp_obj_* and a rename (a write over a loose file older than an hour renews it); spool(content) writes content of unknown size to a tmp_obj_* file so putUnsized can hash it in a second pass without holding it; isFresh(id) says whether a loose object exists and needs no freshening; sweepStaged(olderThanMs) removes stale temporaries as git prune does; withPacks(objects, packs): a GitObjects that reads the packs of a PackSet (openPackSet from @statewalker/vcs-core) first, then loose objects; skipPacked(store, packs): a staging store that does not write objects already packed (in a pack still on storage, in a copy not found corrupt) |
| Loose objects | FileRawStorage (compress option, default true); prunePacked(looseStorage, packs) removes loose copies of packed objects (git prune-packed) |
| Refs | FileRefStore / createFileRefStore(files, gitDir, { atomicFiles?, refLockTimeoutMs?, packedLockTimeoutMs?, logAllRefUpdates?, reflogIdentity? }) with atomic batch and locked packRefs; createFilesRefBatch(atomicFiles), createFilesRefOps(atomicFiles) (batch, packRefs, updatePackedRefs, writeLoose, removeRef, deleteReflogEntry, sweepTemporaries), PackedRefsLockedError, RefUpdateRejectedError; functions readRef, resolveRef, readAllRefs, getRefsByPrefix, readPackedRefs, writePackedRefs, packRefs, createReflogReader, hasReflog, and the parsers parseRefContent, parsePackedRefs, parseReflogLine |
| Working copy | GitWorkingCopy, GitWorkingCopyFactory / createGitWorkingCopyFactory, GitWorkingCopyConfig / createWorkingCopyConfig (reads and writes .git/config), GitCheckout / createGitCheckout, GitStashStore / createGitStashStore (refs/stash and its reflog, through history.refs, as git stash keeps them) |
| Operation state | GitTransformationStore / createTransformationStore(files, gitDir), the merge/rebase/cherry-pick/revert/sequencer stores, GitResolutionStore, detectRepositoryState(files, gitDir, hasConflicts) and readMergeState / readRebaseState / readCherryPickState / readRevertState |
git can readimport { FileMode } from "@statewalker/vcs-core";
import { createFileWorktree, createGitFilesBackend, FileStagingStore } from "@statewalker/vcs-store-files";
import { createNodeFilesApi } from "@statewalker/vcs-utils-node/files";
const files = createNodeFilesApi({ rootDir: "/tmp/demo" });
const { history } = await createGitFilesBackend({ files, create: true }); // HEAD -> refs/heads/main
await history.initialize();
const blobId = await history.blobs.store([new TextEncoder().encode("hello\n")]);
const staging = new FileStagingStore(files, ".git/index");
await staging.read();
await staging.setEntry({ path: "README.md", mode: FileMode.REGULAR_FILE, objectId: blobId, size: 6 });
const treeId = await staging.writeTree(history.trees);
await staging.write(); // writes .git/index
const who = { name: "Ada", email: "ada@example.com", timestamp: 1700000000, tzOffset: "+0000" };
const commitId = await history.commits.store({
tree: treeId,
parents: [],
author: who,
committer: who,
message: "init\n",
});
await history.refs.set("refs/heads/main", commitId);
// Write README.md into the working directory
const worktree = createFileWorktree({
files,
rootPath: "",
blobs: history.blobs,
trees: history.trees,
gitDir: ".git",
});
await worktree.checkoutTree(treeId); // { updated: ["README.md"], removed: [], conflicts: [], failed: [] }
$ cd /tmp/demo && git log --oneline && git status --short && git fsck
8b459a2 init
import { createGitFilesHistoryFromFiles } from "@statewalker/vcs-store-files";
import { createNodeFilesApi } from "@statewalker/vcs-utils-node/files";
const history = await createGitFilesHistoryFromFiles({
files: createNodeFilesApi({ rootDir: "/path/to/repo" }),
}); // gitDir defaults to ".git"; loose objects and existing packs are both readable
await history.initialize();
const head = await history.refs.resolve("HEAD");
const commit = head?.objectId ? await history.commits.load(head.objectId) : undefined;
For a bare repository pass gitDir: "." with rootDir pointing at the repository directory.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.