Back to Checks
Archived Claude workspace has no active API keys
workspace_archived_has_no_active_keys
Service: workspaceSeverity: medium
OfficialVerifiedPrivate
Categories:gen-aiidentity-accesstrust-boundaries
Resource Type:ClaudeWorkspace
Archived workspaces hold no live credentials. An archived workspace is out of sight, so an active key still bound to it keeps working with nobody reviewing it.
Risk
An archived workspace is out of sight, so an active key still bound to it keeps working with nobody reviewing it.
Run this check with Prowler
Run in Prowler CloudInstall
pip install --extra-index-url https://__token__:${PROWLER_REGISTRY_DOWNLOAD_API_KEY}@registry.prowler.com/simple/ "prowler-provider-claude[runtime]"Run
prowler claude --checks workspace_archived_has_no_active_keysRecommendation
Archive or delete the API keys bound to a workspace before archiving the workspace.
Remediation
Other
1Archive or delete the API keys bound to a workspace before archiving the workspace.
Check Code
from prowler.lib.check.models import Check
from prowler_provider_claude.lib.report import CheckReportClaude
from prowler_provider_claude.services.workspace.workspace_client import (
workspace_client,
)
class workspace_archived_has_no_active_keys(Check):
"""Archived workspaces hold no live credentials."""
def execute(self) -> list[CheckReportClaude]:
active_keys = [k for k in workspace_client.api_keys if k.status == "active"]
if not workspace_client.readable("api_keys"):
return []
findings = []
for workspace in [w for w in workspace_client.workspaces if w.archived]:
report = CheckReportClaude(metadata=self.metadata(), resource=workspace)
bound = [k for k in active_keys if k.scope_workspace_id == workspace.id]
if bound:
report.status = "FAIL"
report.status_extended = (
f"Archived workspace {workspace.name} still has {len(bound)} active API "
f"key(s) bound to it: {', '.join(k.name for k in bound)}."
)
else:
report.status = "PASS"
report.status_extended = f"Archived workspace {workspace.name} has no active API keys bound to it."
findings.append(report)
return findings