timosamGoverned Intelligence
Whitepaper · English edition · 3.10

GOVERNED INTELLIGENCE · WHITEPAPER

Security Testing
with AI Agents

From a suspected vulnerability to a substantiated finding

Timotheos Samartzidis
October 30, 2026 · English edition · 3.10
Two people examine an open access panel on a ship hull in a fictional dry dock.
timosamGoverned Intelligence
From suspected unauthorized access to a review brief

From suspected unauthorized access to a review brief

A customer opens a document in a web portal. The application checks the login, accepts a document number and returns the file. An AI agent examines the relevant source code for security flaws and reports that a logged-in customer could use a different document number to access another customer's files.

That would be a serious vulnerability. At first, it is a claim with several prerequisites. Can the customer choose the number freely? Does the request reach the function in question? Does an upstream service already check who owns the document? And might the database prevent access somewhere outside the first code excerpt?

This whitepaper uses that fictional example to develop an application security review process. If you are responsible for development, architecture or security, it should help you assess what agents can contribute and prepare an initial deployment. The investigation must move from suspicion through sound evidence to an accountable decision and follow-up. That requires repeatable analyses, a separate challenge of the findings and, where necessary, controlled tests.

The portal already presents two distinct questions. Authentication establishes who a user is. Authorization determines what that user may do with a particular object. Login can work correctly while the check on an individual document is missing. These flaws arise from interactions within the application and often cannot be assessed from one code excerpt.

The proposal below therefore connects tools, context and human responsibility. It concerns agent skills for coding agents, not penetration-testing certifications. Domain and technical details appear alongside the questions they explain. Observations from an exercise using artificial test code accompany the relevant investigation steps. They show which result files are produced and where execution reaches its limits. The selection and adoption plan are my recommendations; a pilot—a bounded trial—must first establish their effectiveness in your target system. Operational monitoring and response to real security incidents must remain connected to the teams responsible for them.

How a coding agent works and which tools support it

A coding agent combines a language model with access to files and tools. The model interprets the assignment and proposes next steps. The agent software executes permitted tool calls, processes their results and continues the work. It can read a function, find its callers and then launch an analysis. Codex, Claude Code and Cursor are possible working environments.

timosamGoverned Intelligence
How a coding agent works and which tools support it

The working copy is the directory of source code and configuration provided for the investigation. The findings register is an access-controlled record of cases shared by the review team, for example in a ticketing system. It links claims, evidence, status, owners and treatment.

A skill provides task instructions, sometimes with scripts and other resources. A plugin bundles extensions for a particular agent environment. Trail of Bits Security Skills is a published collection of such security workflows. Figure 1 shows how these instructions, the model and executable tools work together. Trail of Bits

The coding agent connects the model and toolsSkills guide the coding agent. It reads code, passes permitted context to the model, receives proposals, calls scanners and processes their results. Cases and evidence are kept in the findings register. This is a logical interaction, not a validated network architecture.1 · HOW THE COMPONENTS INTERACTSkills and pluginsTask instructionsWorking copyCode andconfigurationCoding agentWorkstation orreview serverLanguage modelselected deploymentAnalysis toolsCodeQL · SemgrepFindings registerCase and evidenceInstructionsCodeContextProposalCallResultCase & evidenceCall or data transferInstructionsLogical interaction; the project defines concrete services and data paths.
Figure 1. The agent mediates between model proposals and tool calls. Skills guide the workflow; the environment limits permissions.

The language model processes the approved context at the selected model provider or in a self-hosted deployment. CodeQL and Semgrep are separate analysis programs in the review environment. They need source files and configuration and save analysis results.

The agent therefore uses a skill's instructions and the outputs of executable tools. Installing a skill does not automatically set up those programs; their installation must be checked separately.

Practical context

Prioritizing tools for an initial deployment

The following ranking orders the initial selection. It is a professional recommendation, not a standardized performance comparison. Project descriptions establish documented functionality, not measured detection performance in your system.

timosamGoverned Intelligence
How a coding agent works and which tools support it
Rank Selection Contribution
1 Trail of Bits Security Skills In-depth code and data-flow analysis, independent challenge, variants and supporting fuzzing workflows.
2 Strix Authorized active investigation with concrete exploit evidence.
3 CodeQL / Semgrep Systematic, repeatable source-code analysis.
4 OpenAI security-threat-model Develop a view of assets, attack paths and trust boundaries from code, supplemented by operational knowledge.
5 Trail of Bits fp-check Test existing candidate findings through deliberate attempts to disprove them.
6 Shannon Connect source-code analysis with active validation; distinguish operating modes.
7 NVIDIA SkillSpector Examine skills for suspicious instructions and possible data exfiltration.

For a first deployment, I recommend the static core of static-analysis and fp-check, supplemented by context building, variant analysis and change review. Strix follows for specifically authorized active tests. Before this selection can do useful work, the team needs a defined subject and a bounded assignment.

Before the agent searches, it needs a brief

A repository is the shared store of source code and its change history. A revision, usually identified by a Git commit, fixes the code version under investigation. The relevant operational configuration is documented separately. Without this baseline, developers may already have changed the flaw while the agent is still explaining an older version.

For the portal, the team also needs to know which services accept requests, where customer identities are established and who enforces document permissions. An application programming interface, or API, is a defined entry point through which another program calls a function. Its reachability changes the possible attack paths.

A threat model organizes this information: what needs protection, who might attack it, through which entry points and with what capabilities? In the example, confidential customer documents are the asset to protect. A trust boundary exists where data or actions are accepted from a context with different permissions. At the customer-to-portal boundary, the application must enforce which documents belong to the customer. A supplied document number does not establish ownership.

timosamGoverned Intelligence
Before the agent searches, it needs a brief

OpenAI's security-threat-model skill supports this assessment from the source code. The application team confirms the operational context because the repository cannot reliably show all actual network exposure, identity services and protective measures. Systems that build and test code are also attack surfaces with their own permissions. Threat-modeling skill

Your team names the responsible owners before the run. The application owner confirms purpose, operation and review scope. The application security function, often called AppSec, assesses cases and maintains the findings register. Platform owners configure access and execution boundaries. In small teams, one person may perform several roles; their decisions remain traceable.

Practical context

What was actually tested in the portal example

To explain the review process through concrete outputs, a small test fixture was examined. It contains two artificial customers, each with one document. The ownership check was deliberately removed from two retrieval functions; a third retains it. For a document assistant, a tool description and its executing function, the handler, extend the example. The baseline revision, the faulty change and a corrected copy are recorded separately.

For the conditional risk assessment, the requester also confirmed the operating assumption of an internet-facing portal containing confidential customer documents. No such portal was built or attacked. The actual function calls used artificial data only; a complete server for the document assistant was also outside the fixture. References below to the exercise have this limited scope. The fictional operating scenario illustrates broader decisions that the local exercise cannot substantiate.

The flaws and expected responses were known. The exercise covered the 18 workflows and tools specifically named in this whitepaper, not everything in their linked collections. It shows observed results, adaptations and missing prerequisites. It does not measure detection performance against unknown vulnerabilities.

Not all 18 entries were fully tested. After the follow-up runs, twelve had been executed within their stated scope and three partially; two remained blocked and one run failed technically. Executed steps include agent methods and adapted workflows. This does not establish native installation and complete execution of all Codex or Claude plugins.

timosamGoverned Intelligence
Before the agent searches, it needs a brief

These statuses describe execution: “executed” means the named review step took place and produced an artifact; “partial” identifies a missing stage; “blocked” identifies an unmet prerequisite; and “failed” describes a run that started but ended in a technical failure. None of these statuses, on its own, is a judgment about the application's security.

A result artifact is a durably saved file that makes an investigation step traceable. Artifacts include agent reports, native scanner files written by the tool itself, and execution logs. Their purposes differ: a findings report explains a suspicion; an execution log shows whether the investigation completed. The following chapters explain these files alongside the methods that produce them. Relative file paths refer to the linked test archive. Its test report (German) contains the complete mapping, including source revisions, commands and original outputs; custom report names are conventions of this exercise.

The first such result is runs/threat-model/fixture-threat-model.md. Created using security-threat-model, it connects components, a data-flow diagram, assets and assumptions to three threats, their conditional priorities and mitigations. It also records which assessment applies only under the confirmed assumption of internet exposure. This makes the basis for the subsequent review brief visible.

Instructions for your own work appear in blue boxes labeled “Practice guide,” directly alongside the relevant method. The additional label distinguishes an agent assignment, a tool command and setup. Observed files, results and limitations are explicitly described in the surrounding text. An expected artifact in a box is not yet a produced test result. The practice guide for all 18 entries (German) additionally brings together prerequisites, assignments, commands, success criteria and remaining limitations. Unless a section specifies another environment, the shell examples assume Bash/WSL after the relevant tool has been installed, with the current directory set to the root of a disposable copy of the test archive. SkillSpector explicitly uses the tested Windows Python entry point. eigener-lauf/—“own run”—is a new output directory, preserving the recorded originals.

timosamGoverned Intelligence
Before the agent searches, it needs a brief

Practical context

Defining the first run precisely

This assignment initially investigates document retrieval. Other review areas require explicit assignments and appropriate methods. Reports and analysis data may be created outside the protected application working copy. Builds—the preparation of source code and dependencies for execution—require separately bounded permission to execute. “Read-only” describes a permission that must be technically enforced. The analysis begins at this boundary.

Connecting source code, data flow and scanner results

The review team follows the document number from the request to file delivery and looks for the effective authorization check. This path through variables, functions and services is called data flow. The sequence of function calls forms the call chain. Both views are needed: a checked variable is of little use if the application later uses a different value.

Scanners automate checks on source code. This static application security testing, or SAST, does not require an attack on the running target application. CodeQL prepares code in an analysis database and examines it using queries. Semgrep uses rules to search for suspicious patterns and can also analyze data flow, depending on the rule, language and edition. Taint analysis traces whether an attacker-influenced input reaches a security-sensitive use and which checks lie between them. Rules and data-flow models largely determine what becomes visible. CodeQL, Semgrep

timosamGoverned Intelligence
Connecting source code, data flow and scanner results

A rule might flag an unchecked document number. Whether another component protects access remains a context question. The agent reads related functions and their callers and develops testable hypotheses. It can investigate relationships that existing rules do not express. It can also misunderstand protective functions or miss paths. The scanner baseline and agent investigation complement each other; both need visible coverage.

Technical detail

The seven Trail of Bits plugins

A SKILL.md contains task instructions; some plugins use other entry points. In the examined revision, for example, insecure-defaults consists of a command file and a workflow. For an initial deployment, I use the priority ratings “essential,” “very high” and “high.” These prioritize general enterprise codebases; the specific task determines their use.

Rank / priority Plugin Function and limitation
1 · Essential static-analysis Contains codeql, semgrep and sarif-parsing. SARIF is a standardized exchange format for static-analysis results. The workflow runs analyses and processes results; programs, rules and databases require separate setup.
2 · Essential audit-context-building Documents functions, assumptions, dependencies and data flows. Produces context dossiers and open questions; this step does not yet search for or fix flaws, or assign severity.
3 · Essential fp-check Examines specific existing candidates, including callers, protective conditions and counterarguments. A reasoned verdict does not replace missing evidence.
4 · Very high variant-analysis Derives a narrow search signature from a known cause, expands it gradually and assesses new candidates. It is not an initial search without a starting case.
5 · Very high differential-review Reviews Git changes with history, affected callers, test coverage and reach. The visible change alone may be insufficient.
6 · High insecure-defaults Examines fallback secrets, default credentials, checks that grant access on failure (fail-open), weak cryptography, excessive permissions and debug data leaks. Candidates are verified.
7 · High semgrep-rule-creator Develops rules through tests using unsafe positive cases, safe negative cases, syntax-tree inspection, iteration until all tests pass and a final review.

Sources: static analysis, context building, variants, rule development, insecure defaults.

timosamGoverned Intelligence
Connecting source code, data flow and scanner results

For an initial full audit, the proposed sequence is audit-context-building → semgrep → codeql → fp-check → variant-analysis. Context comes first; variants follow from understood starting cases. This is a practical choice, not a prescribed sequence for every repository.

The exercise shows what this context looks like in practice: audit-context-building left a DOSSIER.md, six individual function descriptions under functions/, and execution.json in runs/context/audit-context/. Six separate Codex function agents were used; this workflow replaced the native Claude workflow API. The dossier records assumptions and data flows without yet issuing a security judgment. The Trail of Bits workflows used are pinned to specific revisions.

Technical detail

Configuring scanners and reading their outputs

For CodeQL, record the language, database extraction, build mode and query suite. For compiled languages, the build can determine which files enter the database. Project-specific inputs, sensitive operations and protective functions may require additional models. Extraction and build diagnostics, together with excluded areas, belong in the execution report. Successful database creation or zero findings does not establish a complete investigation. Build modes

For Semgrep, document the engine, edition, language and rule packs. Community and Pro capabilities differ particularly across function and file boundaries; support depends on rule type and language. Failed, skipped, partial or ineffective runs for the relevant code must be identified. --metrics=off does not replace a review of other network and platform features. Product boundaries, Semgrep skill

timosamGoverned Intelligence
Connecting source code, data flow and scanner results

The exercise made this distinction visible. Semgrep created six native JSON/SARIF pairs under raw/ in runs/semgrep/; rulesets.json describes the rule selection, scans.json the execution status, and results/results.sarif the merged results. The baseline rules reported no matches. However, two of the six rule-pack runs were incomplete because of rule problems, and Pro was unavailable. The files therefore document analyses that took place and their limits. The known authorization gap went unreported in this baseline.

timosamGoverned Intelligence
Connecting source code, data flow and scanner results

CodeQL was missing during the initial run. CodeQL 2.27.3 was subsequently installed within the project and demonstrated on a separate public MIT-licensed regression example. The outputs under runs/followup/codeql/ include codeql.db/, build.log, quality diagnostics, the explicit suite raw/demo.qls and raw/results.sarif. The database check recorded one project file with 44 baseline lines of code and zero extraction errors. The single query reported 13 locations marked in the example; upstream explicitly labels one of them SPURIOUS, meaning a false alarm.

This is a native tool demonstration, not a complete CodeQL skill test. The broader suite-selection and modeling sequence remained untested; CodeQL did not analyze the portal code. The public example file was analyzed only, never executed. The successful run therefore also provides a concrete reason for the subsequent challenge of findings.

The CodeQL CLI has its own terms of use; open queries do not imply unrestricted use of the engine. Appropriate entitlement must be established for private commercial repositories. Semgrep's engine, rules and products have different terms. Check the selection against existing agreements before the pilot. CodeQL CLI, Semgrep rules terms

Codex Security is an additional investigation route for semantic questions such as authorization, trust boundaries and control flow. The local plugin workflow documents scans without changes to application source code, finding and coverage artifacts, and source-code validation even without a reproducer. Model processing and its data path still require separate review; a local launch does not guarantee exclusively local processing. Cloud scans of connected GitHub repositories are a separate operating route. Plugin quickstart, cloud overview

The plugin's Deep scan combines several complete standard runs performed by parallel review workers and aggregates completed outputs. It does not support diff targets; a separate change review exists for those. Exclusions, limitations and successful finalization must be checked here too. More workers do not establish complete coverage. Deep scans

timosamGoverned Intelligence
Connecting source code, data flow and scanner results

The Codex Security standard run produced a third kind of outcome: input validation, authentication and the dry run succeeded; the real scan then failed technically during preflight. The logs name a native-process failure and timeouts in a technical helper used to prepare requests. runs/codex-security/ contains version data, execution metadata and error JSON; the intended final output directory lacks report.md, findings.json and coverage.json. Diff and Deep were not started afterward. A successful dry run checks the startup path but does not replace a completed scan. The CLI documentation distinguishes those steps accordingly.

All these routes need to describe a case so that another reviewer can examine it. For the portal, the core claim is: “The document number comes from the customer; retrieval uses it without a visible comparison to the customer's identifier. Whether an upstream service prevents access remains unresolved.” Such a case is often called a finding. Its register entry connects code locations, context and scanner runs. Multiple reports of the same cause are consolidated into one case; their distinct code locations and evidence are retained. The next step is to challenge that case.

A good counter-check tries to disprove the suspicion

The next task is to seek the best evidenced explanation for why the flaw might not exist. In the portal, a central check before every document access or a database rule might filter out other customers' documents. A function name such as checkAccess is not evidence of that protection.

timosamGoverned Intelligence
A good counter-check tries to disprove the suspicion

fp-check examines existing candidates, including the attacker model, callers and relevant data flow. The skill requires a reasoned verdict of True Positive for a substantiated finding or False Positive for a refuted report. If a required prerequisite cannot be established, the overarching process keeps the case open as unresolved. This is not an additional final status of the skill. fp-check

The counter-check receives its own assignment, reconstructs the decisive steps and documents its attempts to disprove the claim. Two roles using the same model and the same incorrect assumptions can repeat the same mistake. For consequential or disputed cases, a knowledgeable person supplements the review. Separate role names do not create a technical security boundary either.

In the exercise, fp-check received three predefined claims about the retrieval functions. Two were substantiated within the examined function contract; the claim against the safe control was refuted. runs/fp-check/verdicts.md connects data flow, protective conditions, counterarguments and observed calls for each verdict. This also makes a rejected report traceable. It still does not establish reachability through a real login or network-facing portal.

timosamGoverned Intelligence
A good counter-check tries to disprove the suspicion