Audit Your Agent Setup Like a Dependency Graph
Published · 6 min read
By Cong Le · Pocket Grove
Original research brief: . Sources reviewed: .
Quick answer: Inventory every component your agent can activate, follow it to executable code or a remote service, and record its resolved identity, access, and update path. Review the installed artifact alongside its configuration. A familiar plugin name or pinned top-level file does not describe everything that can run.
An agent setup can begin with a short instruction file and grow into a collection of scripts, tools, hooks, packages, and services. Each addition may be reasonable. The combined execution path becomes harder to describe.
Suppose a project instruction invokes a helper, the helper starts a package runner, and that package contacts a hosted service. Reviewing the instruction alone leaves several decisions unexplained: which package was resolved, which local resources it inherited, and which destination received the request.
A dependency graph makes those questions concrete. Start with one useful workflow and follow what it can activate.
Inventory behavior as well as files
Use a conceptual report-generation workflow. An agent reads a skill, calls a local helper, gathers repository data, and uploads a report to a service. This is an illustrative design, not an audit of a particular product.
Project instructions
└── report skill
└── helper script
├── package dependency
├── local repository files
└── remote report service
The skill can influence the agent without executing code itself. The helper and package execute directly. The remote service has its own implementation and access rules. Record those distinctions rather than labelling every configuration file as an executable.
Inventory installation and update behavior too. A component may run a setup script before its normal entry point is ever used. A background updater may change the files that tomorrow's session will load.
For each connection in the graph, write the reason it exists. “The helper needs repository metadata to create the requested report” is reviewable. “This tool might need everything” leaves no useful boundary.
Separate the requested source from the installed artifact
A branch, tag, package version, or marketplace entry tells an installer where to look. The audit also needs to identify what it obtained.
GitHub's secure-use guidance for Actions recommends full commit SHAs for immutable action references and notes that tags can move. That guidance applies directly to Actions. The corresponding review question for an agent extension is which immutable identity, if any, its installation mechanism provides.
Do not assume every installer offers the same guarantees. For a downloaded archive, record its digest and trusted expected identity. For a source checkout, record the resolved commit and any local modifications. For a generated executable, record the build inputs and the resulting artifact separately.
A content digest helps detect a change in the bytes covered by the digest. It does not establish that those bytes are trustworthy or suitable for the permissions you intend to grant.
Build one inventory row per activated component
This worksheet is a proposed audit format, not a standard or a complete security assessment:
| Field | Question it answers |
|---|---|
| Component and purpose | Why is this dependency here? |
| Configured source | Where did the installer look? |
| Resolved identity | Which version, commit, or artifact was selected? |
| Installed location and digest scope | Which files were inspected? |
| Entry points | What starts during installation, updates, and use? |
| Effective access | Which files, services, and actions are reachable? |
| Update trigger | What can change the component? |
| Owner and last review | Who handles updates or removal? |
Avoid recording secret values in this inventory. Names of credential bindings and their intended scopes are usually enough to describe access.
For a remote service, the inventory cannot claim to hash the server implementation. Record the endpoint, authentication boundary, service owner, and documented contract. Mark implementation identity as externally managed where that is the actual limit of your evidence.
Follow dependencies past the first package
A top-level pin does not automatically freeze every dependency or external download it uses. Examine how the component resolves its own requirements and whether installation scripts fetch additional material.
For npm-based helpers, the package-lock documentation describes the dependency tree, resolved locations, integrity values, and install-script metadata. Those fields are useful inputs to a review. They do not replace inspecting what the scripts do or confirming the environment used the intended lockfile.
Pay attention to local links and mutable directories. A helper pinned to a commit can still load a script from a workspace path that another process changes. Likewise, the configuration may name one executable while the shell's search path selects another.
Bound the review around the workflow's consequential paths. Trace components that can execute code, alter files, contact services, or affect authorization before spending time cataloguing harmless documentation assets.
Review effective access at the execution point
A declaration saying “read reports” may coexist with a process that can read the whole working directory. Compare the advertised purpose with the permissions the runtime actually enforces.
For the illustrative helper, ask whether it needs the entire home directory, a writable repository, or only a prepared input folder. Check which environment variables and network destinations it can reach. Record any gap between intended and effective access.
The goal is a usable workflow with a clear boundary. If a component needs broad access for a legitimate task, document that decision and review its update path accordingly. Broad capability plus unnoticed updates deserves more attention than a fixed local transformation with narrow inputs.
An agent's description of its restrictions is useful context. Enforcement belongs in the runtime, operating environment, and destination services.
Treat updates as a change to the graph
When a component changes, review more than the visible version number. Compare its entry points, dependency resolutions, install steps, destinations, and permissions. A small package update can add a new execution path without changing the skill's prose.
Keep the previous inventory long enough to answer what ran during an earlier session. The record should point to evidence about the installed artifact at that time, rather than silently replacing history with today's installation.
Before enabling an update, answer five practical questions:
- Does the resolved source match the intended publisher and revision?
- Do the inspected files match the recorded artifact identity?
- Have dependencies, executable entry points, or destinations changed?
- Is effective access still justified by the workflow?
- Can the previous supported configuration be restored if the update fails?
Connect the inventory to the exact code and environment used for verification. Keep only a short route to this record in the agent's everyday instructions, following the same approach as keeping large knowledge bases out of the active context.
The useful outcome is a setup you can explain: what activates, which implementation it uses, what it can reach, and what would cause that answer to change.
Apps from the studio
All appsThese practices come from shipping Pocket Grove's active apps. If you came here looking for something to install, start with one of these.
Related guides
Check Whether Your Agent's Tests Supply the Missing Behavior
Audit fixtures and mocks so agent-written tests exercise the behavior your application must provide, with a practical boundary-check worksheet.
Agent Cleanup Needs Proof of Ownership
Design cleanup that identifies task-owned files and processes, checks resource generations, and preserves uncertain state instead of deleting it.
What Git Worktrees Still Share Between Coding Agents
Understand what linked Git worktrees isolate and what stays shared, including stash, refs, configuration, and hooks, before running parallel agents.