Skip to content

docs(cloud-security): a deleted resource is removed after two consecutive sweeps - #671

Open
maximelb wants to merge 2 commits into
masterfrom
cloudsec-delete-grace
Open

maximelb wants to merge 2 commits into
masterfrom
cloudsec-delete-grace

Conversation

@maximelb

Copy link
Copy Markdown
Contributor

What

Cloud Security no longer removes a resource the first time a sweep does not see it. A cloud API listing can briefly omit a resource, or return an empty list once. A resource is now removed after it is missing from two consecutive sweeps. This PR documents that behaviour.

  • providers.md, new section "When a deleted resource disappears":
    • the two-sweep rule;
    • a sighting in between cancels the recorded miss;
    • only complete reads count, so an unread service, region or account neither records nor cancels a miss;
    • how a targeted refresh counts;
    • the customer-visible effect: removal and finding closure happen one sweep later;
    • the fallback when two connections cover one account or two sweeps run at once.
  • automation.md: cloud_resource.deleted fires on the second consecutive miss, with a link to that section.

Do not merge this before the change it describes is deployed.

🤖 Generated with Claude Code

…tive sweeps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maximelb

Copy link
Copy Markdown
Contributor Author

/lc-review

@limacharlie-event-notifications limacharlie-event-notifications Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review Summary

Verdict: NOT_APPROVED (0 High, 1 Medium, 3 Low)

This PR changes only docs. The new section conflicts with what configuration.md says about collection exclusions. Details are in the inline threads.

General Feedback

  • Low Priority: docs/cloud-security/provider-setup/aws.md:432-435 ("Current limitation") ends with "Removal works as before once the lock is lifted." Under the new rule, "as before" now means the two-sweep rule. Readers could take it to mean removal on the first miss. Link it to the new section, for example: "Removal then follows the two-sweep rule."
  • No test-time-budget check run exists for this commit, and master does not require it, either through branch protection or through rulesets. This PR changes only docs, so nothing is blocked.
  • The PR body says not to merge this before the described change is deployed. This review cannot check that. It is left to the person who merges.

Blast Radius

The change touches only two pages under docs/cloud-security/ (providers.md and automation.md), plus the new anchor providers.md#when-a-deleted-resource-disappears, which automation.md links to. The anchor matches the heading slug. No other page or the mkdocs.yml nav changes. The one real effect is on customers. Anyone who builds automation on cloud_resource.deleted, or who expects findings to close when a resource is deleted, will now plan for one extra sweep of delay (up to one refresh interval, 6h for example). So the timing and the exception rules in the text must match the deployed behaviour.


This review was generated automatically by Claude Code.

Comment thread docs/cloud-security/providers.md Resolved
Comment thread docs/cloud-security/providers.md Resolved
Comment thread docs/cloud-security/providers.md Resolved
…the two-sweep rule; scope of the rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maximelb

Copy link
Copy Markdown
Contributor Author

Fixed in 6525a8a (the general Low too: aws.md's region-lock note now links to the two-sweep rule). /lc-review

@maximelb

Copy link
Copy Markdown
Contributor Author

/lc-review

@limacharlie-event-notifications limacharlie-event-notifications Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review Summary

Verdict: APPROVED (0 High, 0 Medium, 1 Low)

Re-review of 6525a8a. Since my last review, the PR changed configuration.md, provider-setup/aws.md and providers.md. automation.md has not changed and has no open findings. All three earlier threads are fixed. The configuration.md exclusion text now follows the two-sweep rule. The scope sentence is added, and the "as before" wording is gone. The earlier General Feedback Low on aws.md:432-435 is fixed too: it now links to the two-sweep rule.

One new Low is posted inline. providers.md says only a complete read counts toward a miss. configuration.md says a fully excluded type is removed even after a partial or failed pass. The two pages give different answers for excluded types.

General Feedback

  • No test-time-budget check run exists for this commit. master does not require the check, either through branch protection or through rulesets. This PR changes only docs, so nothing is blocked.
  • The PR body says not to merge this before the described change is deployed. This review cannot check that. It is left to the person who merges.

Blast Radius

Only docs change, in four pages under docs/cloud-security/. automation.md, configuration.md and provider-setup/aws.md now link to the new anchor providers.md#when-a-deleted-resource-disappears. All three relative links resolve to that anchor. The mkdocs.yml nav does not change. The only effect is on customers. Removal, cloud_resource.deleted events and finding closure now come one sweep later, and this now applies to every connector. Collection exclusions also remove inventory one sweep later. Automation that relies on these timings should expect up to one more refresh interval of delay.


This review was generated automatically by Claude Code.

Comment thread docs/cloud-security/providers.md Resolved

@limacharlie-event-notifications limacharlie-event-notifications Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review Summary

Verdict: APPROVED (0 High, 0 Medium, 0 Low)

This is a re-review after 6525a8a. All three earlier threads are fixed, and so is the earlier General Feedback Low.

Earlier findings

  • Medium (conflict with configuration.md about exclusions): fixed. The exclusion warning (configuration.md:270-279) and the fully-excluded-type bullet (configuration.md:297-298) now follow the two-sweep rule and link to it.
  • Low (connector scope not stated): fixed. providers.md:294-295 now says the rule applies to every connector.
  • Low ("how deletions worked before"): fixed. The suggested wording is applied.
  • Low (aws.md's "Removal works as before"): fixed. aws.md:434-435 now links to the two-sweep rule.

General Feedback

  • I re-read all four changed files (providers.md, automation.md, configuration.md, provider-setup/aws.md). I also searched docs/cloud-security for other statements about when a deleted resource is removed. None of them conflict with the new section. code-security/containment-setup.md:237 says only that excluded resources "are removed from inventory" and gives no timing, so it is still correct.
  • No test-time-budget check run exists for this commit. master does not require the check, either through branch protection or through rulesets. The PR changes only docs.
  • The PR body says not to merge this before the change it describes is deployed. This review cannot check that. It is left to the person who merges.

Blast Radius

The PR changes only docs: four pages under docs/cloud-security/, plus a new anchor, providers.md#when-a-deleted-resource-disappears. Three pages link to that anchor, and it matches the heading slug. mkdocs.yml and the nav do not change. The effect is on customer expectations. Automation built on cloud_resource.deleted, the closing of findings, and the inventory removal that collection exclusions cause are now all documented as happening one sweep later.


This review was generated automatically by Claude Code.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants