Back to Checks
claude

Claude organization Claude Code desktop setting matches the documented baseline

claudecode_desktop_matches_baseline
Service: claudecodeSeverity: low
OfficialVerifiedPrivate
Categories:gen-aisoftware-supply-chain
Resource Type:ClaudeOrganizationSettings

The effective organization settings are evaluated for claude_code_desktop_enabled. Knowing which surfaces are on is the precondition for governing them; an unexpected surface is drift.

Prowler logoProwlerprowler-provider-claude

Risk

Knowing which surfaces are on is the precondition for governing them; an unexpected surface is drift.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler claude --checks claudecode_desktop_matches_baseline

Recommendation

Set the desktop surface to your documented baseline and record it in the audit config.

Remediation

Other

1Set the desktop surface to your documented baseline and record it 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_desktop_matches_baseline(Check):
    """The Claude Code desktop surface matches the documented baseline.

    Knowing which surfaces are on is the precondition for governing them; an unexpected surface is drift.

    Policy-pinned: compared against ``claude_code_desktop_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_desktop_expected", True
        )
        findings = []
        for settings in claudecode_client.settings:
            row = settings.get("claude_code_desktop_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 the Claude Code desktop surface {state}, matching the documented "
                    f"baseline (claude_code_desktop_enabled is {str(row.value).lower()})."
                )
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Organization {org} has the Claude Code desktop surface {state} but the documented baseline "
                    f"is {'enabled' if expected else 'disabled'} (claude_code_desktop_enabled is "
                    f"{str(row.value).lower()}). Either change the setting or update "
                    "claude_code_desktop_expected in the Prowler audit config to record the decision."
                )
            findings.append(report)
        return findings