AI agent application security follows the authority around the model: who can request an action, which data the action reads, what code executes, and how its result reaches production. An agent with careful instructions can still call an API with a missing tenant check or run a helper with deployment credentials.
Beam's review method separates four questions so that findings lead to specific fixes. The example below is fictional and the method is our practical review convention; it is not a certification or a claim that static analysis observes production behavior.
| Question | Evidence to inspect | Useful result |
|---|---|---|
| Can this caller perform this action? | Routes, identity verification, resource policy | Principal-operation-resource matrix |
| Where can sensitive data go? | Context assembly, process environments, network and log sinks | Source-to-destination flow |
| What supplied code will execute? | Manifests, lockfiles, lifecycle hooks, downloads | Artifact and execution map |
| What can automation publish? | Triggers, checkout, job credentials, artifacts | CI trust-boundary map |
Start with a bounded review
Record the repository root, revision, relevant applications, exclusions, and available configuration exports. Read source and metadata before running commands supplied by the repository. Do not install a candidate dependency or activate a skill to find out whether it is trustworthy.
A repository review does not authorize database reads, cloud discovery, credential validation, or live API requests. Mark those boundaries as unverified. Limit discovery and file reads, avoid out-of-scope symlinks, and use short redacted excerpts instead of environment dumps or full prompts.
Start with an AI asset inventory when the relevant components are unclear. It gives each model, tool, prompt, and deployment component a source-backed identity before you trace their interactions.
Which API permission is missing?
Suppose a fictional release assistant calls POST /reports/export. Its handler verifies a session, accepts workspaceId and reportId from tool arguments, then schedules an export. The review question is whether that caller can export that report in that workspace.
First follow the credential into the verified principal. Token decoding alone does not establish authenticity; inspect the configured verification and expiry handling. OWASP identifies missing token authenticity and expiration checks among broken-authentication risks. OWASP API authentication guidance.
Then follow the resource lookup and operation policy. OWASP's object-authorization guidance calls for checking the caller's permission for the requested action on the requested object. Authentication middleware cannot substitute for that decision. OWASP object authorization guidance.
In our example, record where workspaceId originates, where membership is enforced, and whether the background worker preserves the authorization context. If the handler forwards untrusted IDs without an applicable policy, recommend enforcing the policy before scheduling and considering membership changes before execution.
A useful local test uses two synthetic tenants and asserts that the wrong tenant creates no export job. Use an already trusted, authorized test harness with in-memory fixtures; inspect it for database or external-service effects first. If execution is outside scope, deliver that test plan with the static finding.
Where does sensitive context leave?
The same assistant builds a prompt from report metadata and invokes a helper. Imagine its error handler writes the complete request object to a trace file, while the dashboard redacts credential fields only when displaying the trace. Our review would identify the earlier file write as the relevant sink.
For each suspected disclosure, record the source, reader, transformation, destination, and trigger. A model endpoint in configuration is not proof that a secret reached it. Conversely, the absence of a familiar credential pattern does not establish that customer documents or session data stayed inside their intended boundary.
Inspect error paths, subprocess environments, fallback providers, and generated artifacts. Record credentials by variable name and purpose; do not replay a real token to confirm validity. Fix the earliest unnecessary collection or unprotected sink rather than relying on a later display filter.
For a permitted local test, substitute a synthetic canary and a mocked sink. Assert whether the canary reaches persistent output on both success and failure. An actual disclosure may require rotation and incident handling, but those are separate operational actions with their own authorized scope.
What runs before the review?
Now suppose the assistant's helper dependency changed. The manifest looks small, but the package includes preparation code and another download. Read the resolved lockfile entry, scripts, executable entrypoint, and reachable downloaded-code references before selecting an installation command.
npm documents lifecycle execution for commands including installation and packaging. Git dependencies with preparation scripts can also install dependencies and run preparation before installation completes. A seemingly convenient inspection workflow can therefore cross into execution. npm lifecycle documentation.
In this example, the report should identify the helper's consumer and execution phase, the resolved artifact, the additional download, and the credentials available to that process. A mutable download with unknown contents is a review gap with a concrete execution consequence; it is not evidence that the publisher is malicious.
Use supplied provenance to connect the distributed artifact to its origin and build context. SLSA defines provenance as verifiable information about where, when, and how an artifact was produced. Review whether the evidence covers the exact digest and whether its signer or builder is trusted under your policy. Presence of a provenance file alone does not answer those questions. SLSA provenance definition.
Which CI step receives authority?
Consider a workflow that asks the release assistant to summarize a pull request and later publishes its output. Draw the path from contributor-controlled text and files to the publication job. Include generated scripts, caches, and artifacts in that path; each may carry input across jobs.
GitHub warns about privileged workflows checking out untrusted pull-request content and about direct expression interpolation into shell scripts. Its guidance also recommends full commit pins for actions. These controls address distinct problems: trusted execution context, safe treatment of input, and immutable dependency identity. GitHub Actions secure use.
For our assistant, the key decision is where review ends and publication authority begins. Record which job creates the summary, which input revision it used, and how the publication job establishes that it received the reviewed output. A familiar artifact name is insufficient evidence of that connection.
Keep untrusted computation separated from release credentials, and inspect the selected code even when its reference is pinned. Repository YAML cannot establish actual environment approvals, branch protection, or runner isolation; use supplied settings evidence or leave those controls unknown. Do not trigger a production run to complete a source review.
What makes the findings actionable?
Each finding needs source locations, a supported path to impact, severity, confidence, and a concrete next action. Separate missing evidence from a demonstrated defect. High confidence in a static authorization bypass does not mean you observed anyone exploit it.
Review agent instructions using the skills specification and security guide, and tool connections using the MCP security guide. Connect the results to your broader coding-agent security review, then use deployment and incident response for operational follow-through.
Visit agentbeam.com for advanced monitoring and control options, further self-hosting, and ongoing monitoring guidance. These four review workflows analyze supplied evidence; they do not automatically configure monitoring or turn Beam's individual-file CLI scanner into an API penetration test or dependency certification service.
Reviewed September 14, 2026. Examples are illustrative; deployed behavior and external controls require separate evidence.
