#058Technical3 min

Audit an AI agent’s security

Scope an authorized agent review around instructions, tool permissions and evidence of leakage.

Hackaiz team · updated 21/11/2026

Illustration: a founder builds an AI app.
Illustration: a founder builds an AI app. Illustrative photo, not a screenshot.

01Identify what the agent can actually do

An agent is more than a chat window when it can call tools, fetch addresses or act on application data. Begin the security review with its capabilities: which tools can read, write, delete or send information, and which credentials those tools use. A polite refusal in one conversation is not evidence that these permissions are enforced by the application. Review the code and the authorized endpoint as separate sources of evidence.

Hackaiz’s AI-agent guide covers instruction injection, excessive tool permissions, internal-network access through URL-fetching tools, key leakage and authentication weaknesses. Instruction injection means content tries to redirect the model away from the task or its governing instructions. Internal-network request abuse, often called SSRF, means a fetching tool reaches addresses that should not be available to the user. These are specific review areas, not a promise to test every possible conversation.

02Authorize code and endpoint checks separately

Use Analyze to prepare the target and Connect GitHub when the agent code is in a private repository. Identify the agent entry point and explain which operations are legitimate. Website and API analysis cannot start without domain ownership proof: the _hackaiz DNS TXT record, an HTTPS file at /.well-known/hackaiz-verification.txt, or the instruction for your project’s AI to create that file. Endpoint authorization does not follow merely from knowing its address.

Hackaiz reviews agent code and, for an authorized endpoint, can send harmless canary prompts to look for context or key leakage. A canary is a recognizable test signal used to observe a response. This is not permission to make the agent perform destructive business operations. Do not provide production secrets as test content or assume the review needs access to private customer conversations.

  1. 1List each tool and its intended data access or action.
  2. 2Connect only repositories and systems you are authorized to assess.
  3. 3Complete domain verification before any website or API analysis.
  4. 4Select the intended checks; unticked checks are not run or billed.

03Read prompts, responses and code locations

For an AI finding, the evidence is the prompt sent and response received, or the exact code location. For example, a URL-fetching helper without an appropriate destination boundary raises a different question from a response that reveals private context. Keep the observed behavior separate from what you suspect could happen. A secret written into a log, echoed in a reply or sent to a user-controlled address also requires understanding the specific data path.

If an endpoint is unreachable, the report says the check did not run rather than declaring the agent safe. The application report uses Danger, To fix and To watch to organize findings. Check coverage alongside these groups: no finding on an untested tool does not validate that tool’s permissions. Review default authentication and fallback keys in code as well, because a robust model instruction cannot compensate for an unauthenticated application boundary.

04Repair the boundary, not only the wording

When reviewing a proposed repair, ask whether unnecessary write, delete or send capabilities have been removed or constrained by application logic. A stronger instruction alone should not be mistaken for a permission check. Check how a fetching tool handles destinations and how secrets reach logs or replies. These questions help your team judge the proposed change without asking the model itself to certify that its behavior is safe.

GitHub corrections from Hackaiz are draft pull requests for human review and approval; nothing is merged automatically. A new check uses credits, so decide which changed capability needs reassessment before launching again. Optional monitoring is for connected systems only and does not act as a live filter for every conversation. If your immediate concern is a downloaded MCP configuration or Skill rather than the deployed agent, use Check before installing for a separate static review without executing the component.

Frequently asked questions

Was this article helpful?

Related articles