Back to Checks
claude

Claude organization Claude Code scheduled routines setting matches the documented baseline

claudecode_routines_matches_baseline
Service: claudecodeSeverity: medium
OfficialVerifiedPrivate
Categories:gen-aisoftware-supply-chain
Resource Type:ClaudeOrganizationSettings

The effective organization settings are evaluated for claude_code_routines_enabled. Routines run unattended, so a prompt injection landed once keeps acting on a schedule with nobody watching.

Prowler logoProwlerprowler-provider-claude

Risk

Routines run unattended, so a prompt injection landed once keeps acting on a schedule with nobody watching.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler claude --checks claudecode_routines_matches_baseline

Recommendation

Disable scheduled routines, or record the decision to allow them in the audit config.

Remediation

Other

1Disable scheduled routines, or record the decision to allow them in the audit config.

Check Code

from prowler.lib.check.models import Check

from prowler_provider_claude.lib.report import CheckReportClaude
from prowler_provider_claude.services.claudecode.claudecode_client import (
    claudecode_client,
)


class claudecode_routines_matches_baseline(Check):
    """Claude Code scheduled routines match the documented baseline.

    Routines run unattended, so a prompt injection landed once keeps acting on a schedule with nobody watching.

    Policy-pinned: compared against ``claude_code_routines_expected`` in the Prowler audit config
    rather than assumed, so a capability the organization chose to enable is
    only reported when it differs from the documented baseline.
    """

    def execute(self) -> list[CheckReportClaude]:
        expected = claudecode_client.audit_config.get(
            "claude_code_routines_expected", False
        )
        findings = []
        for settings in claudecode_client.settings:
            row = settings.get("claude_code_routines_enabled")
            if row is None:
                continue
            org = settings.name.removesuffix(" effective settings")
            state = "enabled" if row.value else "disabled"
            report = CheckReportClaude(metadata=self.metadata(), resource=settings)
            if row.value == expected:
                report.status = "PASS"
                report.status_extended = (
                    f"Organization {org} has Claude Code scheduled routines {state}, matching the documented "
                    f"baseline (claude_code_routines_enabled is {str(row.value).lower()})."
                )
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Organization {org} has Claude Code scheduled routines {state} but the documented baseline "
                    f"is {'enabled' if expected else 'disabled'} (claude_code_routines_enabled is "
                    f"{str(row.value).lower()}). Either change the setting or update "
                    "claude_code_routines_expected in the Prowler audit config to record the decision."
                )
            findings.append(report)
        return findings