Skip to content

LearnCloud

How to write up a cloud finding

Brief

A cloud finding is fixed fastest when the platform team can find the resource, read the line at fault and change it in their own infrastructure code without asking us anything. That means exact identifiers, the policy or setting quoted as the API returned it, a pointer to the log event behind every claim, an honest statement of what was not reviewed, and a retest that is one command.

Track
Cloud
Stage
Report
Reviewed
On this page
  1. Check first
  2. Which identifiers does a cloud finding need?
  3. How do I quote the policy or setting at fault?
  4. How do I point at the evidence?
  5. How do I write the coverage statement?
  6. How do I give the fix as a console path and as code?
  7. How do I write the retest step?
  8. The defender sees
  9. Done when
  10. Not covered
  11. Tools
  12. Related research
  13. Where this page fits
  14. Reviewed

All commands

Situation
A confirmed finding from a cloud stage, with the read-only review role or test identity that showed it still available for the retest. Everything here concerns the accounts, subscriptions and projects named in the scope letter, and the commands are reads made to fill in the write up, apart from a terraform plan that the client's engineer runs and that changes nothing.
Goal
One cloud finding a platform engineer can locate, understand, fix in code and verify from the ticket alone.
Outputs
Representative examples on placeholder hosts, trimmed to the lines that matter. Not captured from a public fixture yet.

Check first

  • The finding is confirmed, and its reach is shown, not assumed.
  • The client's infrastructure code repository and the module that owns the resource, if they shared it.
  • Which team owns the account, so the ticket lands with them.
  • The review role still works, so every identifier and quote is read fresh on the day of writing.
  • The general structure every finding follows, from writing a finding. This page adds what is different for cloud.

Steps

Which identifiers does a cloud finding need?

aws iam get-role --role-name ci-deploy --query 'Role.[Arn,RoleId,CreateDate]' --output text

Expected output

arn:aws:iam::111122223333:role/ci-deploy	AROAEXAMPLEID7Q2LMNOP	2024-06-03T10:12:44+00:00   # <- account, name and the id that changes if the role is recreated

The role in this page's examples is the lab's role ci-deploy, whose inline policy holds the PassAny statement; it is a separate principal from the user ci-deploy on the captured pages, and this page's outputs stay representative until its own capture. The finding names the account, the region where it applies, the full ARN and the unique id. A role deleted and created again under the same name gets a new id, so the id tells the team whether they are looking at the role we tested. In Azure the equivalent is the full resource id with the subscription in it; in Google Cloud, the project id and full resource name.

Negative result. If the resource is gone by the time we write, the finding says so, gives the identifiers from the evidence and the time it was last seen.

Fix. Tag every resource with an owner, so a finding's identifiers lead straight to a team.

How do I quote the policy or setting at fault?

aws iam get-role-policy --role-name ci-deploy --policy-name deploy --query 'PolicyDocument.Statement[?Sid==`PassAny`]'

Expected output

[
    {
        "Sid": "PassAny",
        "Effect": "Allow",
        "Action": "iam:PassRole",
        "Resource": "*"   # <- the one line the fix changes
    }
]

Quote the statement as the API returned it, with its Sid, and for a managed policy the version id from get-policy. Paraphrase invites a reply saying the policy does not say that. Where the fault is a missing setting, such as no trail in a region, quote the empty response.

Negative result. No single statement is at fault, only the sum of several; then quote each one and say which pair creates the path.

Fix. Scope iam:PassRole to the role ARNs the pipeline deploys, with an iam:PassedToService condition.

How do I point at the evidence?

aws cloudtrail lookup-events --region us-east-1 --start-time 2026-10-28T13:00Z \
  --lookup-attributes AttributeKey=Username,AttributeValue=atarus-review \
  --query 'Events[].[EventTime,EventName,EventId]' --output text

Expected output

2026-10-28T14:12:09+00:00	SimulatePrincipalPolicy	3c1e7a52-9d4b-4f8e-a2c6-0b5d71e9f384   # <- the event behind the claim
2026-10-28T14:10:51+00:00	GetRolePolicy	8a2f40c3-61de-4b7a-95e0-c4d2b17e6a09

Each claim carries a pointer: the API call, the time in UTC, the account, the region, our identity and the event id. The team can then find the same event in their own logs, which also tells them whether their monitoring saw it.

Negative result. No event for a read the claim rests on, usually a data event nobody logs. The tool output is then the evidence, and the logging gap is a second finding.

Fix. Send management events from every account to an organization trail kept in a separate account.

How do I write the coverage statement?

aws account list-regions --region-opt-status-contains ENABLED ENABLED_BY_DEFAULT --query 'Regions[].RegionName' --output text | wc -w

Expected output

17   # <- seventeen regions enabled; the review covered two
Coverage: account 111122223333, us-east-1 and eu-west-1, IAM, S3, KMS, Lambda and CloudTrail,
28 Oct 2026, read-only role atarus-review. Not reviewed: the other 15 enabled regions,
EKS workloads, and resource policies on SQS and SNS.

The statement keeps a clean result from reading as "nothing wrong anywhere". A finding about one region in an account with seventeen enabled says so.

Negative result. Every enabled region and service in scope was reviewed; say that, with the date.

Fix. Disable unused regions with an SCP, so the coverage the client needs is smaller.

How do I give the fix as a console path and as code?

data "aws_iam_policy_document" "deploy" {
  statement {
    sid       = "PassAppRole"
    actions   = ["iam:PassRole"]
    resources = ["arn:aws:iam::111122223333:role/app-runtime"]
    condition {
      test     = "StringEquals"
      variable = "iam:PassedToService"
      values   = ["ecs-tasks.amazonaws.com"]
    }
  }
}
terraform plan -target=aws_iam_role_policy.deploy

Expected output

  ~ resource "aws_iam_role_policy" "deploy" {
Plan: 0 to add, 1 to change, 0 to destroy.   # <- one policy changes, nothing else

The console path goes first for whoever is on call: IAM, Roles, ci-deploy, Permissions, deploy, Edit. The code goes beside it, because a console change is undone by the next pipeline run if the code still holds the old statement. The client's engineer runs the plan; we only read the output they share.

Negative result. The resource is not in code at all; then the finding says so and recommends importing it.

Fix. Change the code, not the console, and review IAM changes as their own pull request.

How do I write the retest step?

aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::111122223333:role/ci-deploy \
  --action-names iam:PassRole --resource-arns arn:aws:iam::111122223333:role/admin \
  --query 'EvaluationResults[].EvalDecision' --output text

Expected output

implicitDeny   # <- before the fix this read "allowed"

The retest is one command with both results written down, so the client can run it themselves after the change and close the ticket.

Negative result. Still allowed: the finding stays open, with the retest date and the statement that still grants it.

Fix. Put the same check in the pipeline as a policy test, so the line cannot come back.

The defender sees

The write up touches nothing beyond the reads that fill it in, which appear in CloudTrail under our review role. The evidence pointers let the client search for the same calls from any other identity, which is the question a cloud finding should always leave them asking. How we answer it for our own activity, step by step, is on the CloudTrail and GuardDuty evidence review and the Entra sign-in and audit log review.

Done when

The finding names the account, region and full resource id, quotes the statement or setting at fault with its version, points to the log event for each claim, states coverage, gives the fix as a console path and as code, and ends with a retest command and its expected result.

Not covered

Severity scoring in general (see writing a finding), proving reach (see cloud impact without damage), and compliance mapping; the outputs shown are representative examples on placeholder accounts, not captured runs.