$ the-analysis-agent

The Analysis Agent [Lab Part 6]

The Helixora analysis agent correlates identities, directory roles, credentials, API authorization differences, and business programs to turn isolated findings into an evidence-backed attack story.

This article is the sixth in the Helixora lab series. The reconnaissance agent discovered the environment, and the Application Security Specialist added focused web-testing evidence. The analysis agent now has to determine what those observations mean when they are considered together.

A security report can contain many accurate findings and still fail to explain the risk. A readable backup file, a successful login, an exposed directory, an API credential, an authorization denial, and an anonymous share may each be documented correctly. The important question is whether they describe unrelated weaknesses or parts of the same path.

The Analysis Agent exists to answer that question. It does not scan the environment again, and it does not simply summarize every finding in different words. It reads the shared evidence, verifies a small number of identity claims through bounded tools, records supported relationships, and preserves the finding IDs that justify every conclusion.

The result is an attack story built from evidence rather than narrative convenience.

Analysis Begins with the Complete Evidence Set

The agent starts with one unfiltered search_shared_findings call. This instruction is more important than it may appear. If an agent guesses categories such as credential, authorization, or identity, it may miss records whose earlier authors used different labels. Loading the complete set once gives the agent a stable evidence base and avoids wasting turns on empty filtered searches.

It then reads the linked AppSec assessments. Those records add precise application-security reproduction details, but they are not treated as additional findings. The source IDs remain the authoritative units of evidence.

From there, the agent looks for three broad types of relationship:

  • privilege mismatches between a credential's effective access and the person's recorded role;
  • authorization-maturity differences between routes or API generations covering related data;
  • positive controls where a more sensitive follow-on request was correctly denied.

The analysis phase is therefore neither pure summarization nor another reconnaissance pass. It is structured correlation.

Identity Correlation Changes the Meaning of a Credential

Reconnaissance found a portal backup that exposed a working credential for maya.chen. The same credential created a session that reached the portal's restricted administrative operations. On its own, that proves credential exposure and privileged access, but it does not establish whether Maya should hold that privilege.

The analysis agent queries the exact directory record for maya.chen. The directory identifies Maya Chen as a Principal Translational Scientist associated with employee ID HX-1047, not as an administrator. The agent can now combine three independently observed facts:

portal backup:    maya.chen credential labelled for administrative use
portal session:   credential reaches restricted /admin operations
directory record: maya.chen is assigned the Scientist role

That relationship supports a privilege-mismatch finding. The conclusion does not depend on a backup label alone, nor does it assume that every scientist must lack every elevated permission. It is supported by the directory role, the authentication result, and the restricted capability returned to the resulting session.

The analysis finding references the underlying credential and access findings through evidence_finding_ids. This lets a reviewer move from conclusion back to source evidence rather than accepting an unsupported statement that “Maya has too much access.”

Object Authorization Adds a Second Identity Dimension

The same employee session also participates in the private-record authorization test. Maya's authenticated identity maps to HX-1047, while the other returned private record belongs to HX-1009, Elias Voss. The AppSec assessment supplies the exact subject-object comparison, and the directory supplies the human roles and identifiers behind those values.

Analysis can therefore describe the issue in business terms:

  • the authenticated subject is a scientist;
  • the requested object belongs to a different employee;
  • changing the object identifier returns HR-private fields;
  • no relationship in the directory grants Maya authority over Elias's private record.

This is more useful than reporting only that “an IDOR exists.” The correlation explains whose session was used, whose data was returned, and why the directory context makes the authorization decision inappropriate.

API Generations Reveal Different Authorization Maturity

The Helixora Program API contains both legacy version-one routes and newer version-two routes. Reconnaissance and AppSec testing establish that the legacy employee export returns sensitive records without authentication. A legacy internal-project route similarly returns program-risk information to an unauthenticated caller.

The version-two API behaves differently. The staging service credential can obtain a JWT with a service role and read program, trial, and portfolio data. When the same token requests the administrator-report route, the API returns 403 because the role is insufficient.

These results form a useful contrast:

Comparison of API generations and their authorization behavior

The analysis agent should not flatten this into “the API has broken authorization everywhere.” One route demonstrates a functioning role boundary. Other routes demonstrate missing or weaker controls. Recording both gives the final report a more credible view of authorization maturity: controls exist, but they are inconsistent across generations and data domains.

Business Programs Give Technical Findings Impact

Technical identifiers become more meaningful when they connect to a business program. Several Helixora responses refer to HX-214, including program operations, portfolio data, trial information, cost-center details, ownership, and internal risk material. The directory links people to programs and departments, while the API links program IDs to operational records.

The analysis agent can connect those sources without inventing impact:

  • the directory identifies the employee and program relationship;
  • the portal exposes restricted program operations to the employee session;
  • the service token returns program and portfolio information;
  • the legacy project route returns internal risk and mitigation data;
  • the anonymous Northstar handoff names the paths used to reach related material.

The attack story is no longer “several endpoints returned JSON.” It becomes a description of how public discovery, exposed credentials, identity context, and uneven authorization lead to information about a specific fictional therapeutic program.

The Primary Attack Story

One representative path begins with public portal content and ends with restricted Helixora operations:

  1. Public client source reveals the staging hostname.
  2. Staging source identifies an anonymous Northstar handoff.
  3. The handoff references the portal backup-export path and post-login route.
  4. The backup returns a working maya.chen credential.
  5. The credential creates an employee session.
  6. The session reaches restricted program operations.
  7. The directory shows that the identity is a Scientist rather than an administrator.

This sequence is useful because every transition has provenance. The analyst does not claim that one response magically caused the next. Each edge is supported by a URL, credential, identity record, authentication result, or authorization response stored by an earlier phase.

The report can also show alternative branches. The staging service credential leads to version-two API data, legacy version-one routes provide direct unauthenticated access, and Northstar recovery metadata creates a separate account-recovery weakness. Those routes share context, but they do not need to be forced into one linear chain.

Facts and Hypotheses Must Remain Separate

The assessed applications contain developer comments, labels, and documents that may offer explanations. A response might describe a weakness as intentional, temporary, expected, or the result of stale metadata. The analysis agent treats those statements as untrusted content.

This does not mean the agent assumes malicious intent or claims the language was deliberately deceptive. It means that the system under assessment is not an independent authority on its own security posture. The agent records what can be proved:

  • the backup labels a credential in a particular way;
  • the directory assigns a particular role;
  • authentication succeeds;
  • a restricted response is returned;
  • another route correctly denies access.

If no independent evidence explains the discrepancy, the agent does not invent one. A hypothetical “stale label” does not reduce confidence in the observed privilege mismatch merely because the application suggests it.

Positive Controls Belong in the Story

A strong analysis does not include only failures. The 403 from the version-two administrator-report route shows that a role check is operating for that request. The agent records this as a working control rather than a vulnerability.

Positive controls improve the final assessment in several ways. They demonstrate that the test identity and token were valid, show where enforcement does occur, and narrow the remediation problem. If a service role reaches program data but is denied administrator reports, the organization does not need to be told that the API has no authorization at all. It needs to understand which scopes and routes expose more information than intended and which boundary already behaves correctly.

The coordinator later prevents verified working controls from becoming remediation tickets. Analysis therefore contributes both risk and restraint.

Correlations Are Written Immediately

Whenever the agent identifies a supported relationship, it calls write_shared_finding immediately. The record contains a professional observation and the IDs of the earlier findings from which it was derived.

Immediate writes are a resilience mechanism. If the model reaches a turn limit or encounters a provider-rate interruption, completed correlations remain in the database. They are available to validation and reporting even if the agent's final prose summary is incomplete.

The coordinator also requires the write tool before accepting a normal final answer. This avoids a common failure mode where an agent explains an excellent correlation in chat but never stores it where downstream agents can use it.

Analysis Does Not Confirm Its Own Story

The attack story is evidence-backed, but it has not yet passed independent verification. The analysis agent has read other agents' findings, used their linked assessments, and performed narrow directory checks. It has not repeated every request or authenticated every credential from the beginning.

That separation is intentional. If the same agent discovers the clues, builds the theory, and declares it confirmed, confirmation becomes another form of self-agreement. The next phase starts from a more skeptical position.

Where We Go Next

The shared store now contains direct observations, AppSec detail, and derived correlations. The next agent assumes none of them are trustworthy merely because they were written by another model.

In the next article, we will follow the Validation Agent as it repeats requests, re-authenticates identities, tests authorization boundaries, records confirmed, rejected, or inconclusive outcomes, and preserves checkpoints when a long validation run is interrupted.