Skip to content

When an AI Security Investigator Has to Ask Permission

Posted on:November 29, 2026 at 12:00 AM

I had the investigator’s prediction before the Lambda ran. It expected the function to read one object in a private S3 bucket. I froze that prediction and approved a single invocation by a separate verifier. S3 allowed the read.

In an earlier post, I sketched how DevOps teams might turn workload observations into action. This experiment picks up at the moment someone has to decide whether to act. What evidence should I be able to inspect before I give the go-ahead? AI-assisted DevOps

Table of contents

Open Table of contents

Where the simulated caller stopped

In an offline rehearsal, I asked a question about the other side of the Lambda boundary. Could a caller outside the approved set start a simulated handler and reach a harmless marker through its role?

A scripted investigator read the synthetic invocation policy, predicted a denial before handler startup, and ended by asking for approval to run the simulation. After I approved, a separate runner evaluated two callers. The out-of-policy caller stopped at invocation. The approved caller started the handler and reached the marker. That second result gave the simulation a positive control. A broken handler or missing marker would have shown up in that control.

These were in-memory traces. They gave me a way to test the approval handoff and see exactly where a simulated attempt stopped. Invocation simulation on GitHub

What the model could support

The live AWS lab asked what the Lambda could do after an approved caller started it. I deployed a small CDK stack with a Lambda function, a dedicated execution role, and one fixture object in a private bucket. I authorized a read-only investigation of that configuration and let Amazon Nova Pro in Sydney examine the collected evidence. Lambda and S3 lab on GitHub

The first model response proposed a hypothesis with an empty evidence list. The workflow rejected it. On the second attempt, the model had read the policy evidence and explained the transport condition, then put completed in the hypothesis status field. The workflow rejected that response too and preserved both attempts in their journals.

The execution role’s permissions boundary also allowed the exact S3 read. With the required evidence references and status values spelled out, the third attempt returned the following revision. This is the model’s JSON output, with indentation added for readability.

{
  "kind": "revise",
  "reason": "The lab Lambda's execution role has an allow policy for s3:GetObject on the designated lab object, but there is a deny policy in the bucket policy that applies when aws:SecureTransport is false. Since the request context shows aws:SecureTransport is true, the allow policy applies and the deny policy does not. However, SCPs, RCPs, and role session policies were not inspected, so there may be additional restrictions not accounted for.",
  "hypothesis": {
    "id": "H1",
    "proposition": "The lab Lambda can perform s3:GetObject on the designated lab object.",
    "falsifier": "An observation that shows the Lambda does not have the necessary permissions to perform s3:GetObject on the designated lab object.",
    "status": "supported",
    "evidenceRefs": ["lambda-configuration", "permission-configuration"],
    "assumptions": [
      "SCPs, RCPs, and role session policies do not deny the s3:GetObject action for the lab Lambda."
    ]
  }
}

The successful episode took four model decisions and one evidence-tool call. Its 16-event journal recorded the evidence references, the revision, and the conclusion. I could replay that record and check what the investigator had actually done before deciding whether to proceed.

Final episode outcome

With its allow prediction on record, the agent ended the read-only investigation with this response.

{
  "kind": "conclude",
  "reason": "The hypothesis has been supported by the evidence and no further observations are available. The conclusion is based on the current evidence and assumptions.",
  "outcome": "completed"
}

One approved check on AWS

The episode ended with the prediction frozen. I approved a single invocation tied to the prediction’s digest. That made the approval specific to the conclusion I had reviewed.

A session under a separate verifier role invoked the Lambda once. That role’s policy granted invocation of the lab function. Inside the handler, the Lambda’s execution role made the fixed S3 request. The verifier recorded allow, matching the frozen prediction, and saved the Lambda and S3 request IDs. The sampled configuration matched the frozen snapshot before and after the invocation.

One controlled allow case gives me a baseline. Next I want to test a case with an applicable deny and one where the outcome depends on the request context.

The next useful result may be a disagreement. If the investigator and AWS disagree, I want to be able to follow it from the policies the model cited, through the prediction I approved for testing, to the response AWS returned.

The source and run instructions are in the investigation package. AttackYourself on GitHub · Investigation package at the deployed revision