Back to Checks
claude

Claude activity feed has events within the documented freshness window

audit_activity_feed_ingesting
Service: auditSeverity: medium
OfficialVerifiedPrivate
Categories:gen-ailoggingforensics-ready
Resource Type:ClaudeActivityFeed

The activity feed has recent events. A feed that has stopped producing events looks identical to a quiet organization, and the difference only becomes visible during an investigation when it is too late.

Prowler logoProwlerprowler-provider-claude

Risk

A feed that has stopped producing events looks identical to a quiet organization, and the difference only becomes visible during an investigation when it is too late.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler claude --checks audit_activity_feed_ingesting

Recommendation

Confirm the Compliance API is enabled and that the key carries read:compliance_activities, then re-run the scan.

Remediation

Other

1Confirm the Compliance API is enabled and that the key carries read:compliance_activities, then re-run the scan.

Check Code

from prowler.lib.check.models import Check

from prowler_provider_claude.lib.dates import age_in_days
from prowler_provider_claude.lib.report import CheckReportClaude
from prowler_provider_claude.services.audit.audit_client import audit_client


class audit_activity_feed_ingesting(Check):
    """The activity feed has recent events.

    Recording is not retroactive: it begins when the Compliance API is first
    enabled, so a brand new tenant legitimately has a quiet feed.
    """

    def execute(self) -> list[CheckReportClaude]:
        feed = audit_client.activity_feed
        if not feed.available:
            return []
        maximum_hours = audit_client.audit_config.get("claude_max_feed_gap_hours", 24)
        report = CheckReportClaude(metadata=self.metadata(), resource=feed)
        if not feed.activities:
            report.status = "FAIL"
            report.status_extended = (
                "The activity feed returned no events. If the Compliance API was enabled "
                "recently this is expected, because recording is not retroactive."
            )
            return [report]
        age_days = age_in_days(feed.latest_created_at)
        if age_days is None:
            return []
        age_hours = age_days * 24
        if age_hours <= maximum_hours:
            report.status = "PASS"
            report.status_extended = (
                f"The activity feed is current: the newest of {len(feed.activities)} event(s) "
                f"is under {maximum_hours} hours old."
            )
        else:
            report.status = "FAIL"
            report.status_extended = (
                f"The newest activity feed event is about {age_hours} hours old, beyond the "
                f"{maximum_hours} hour freshness window."
            )
        return [report]