GCP Secret Manager ListSecrets Across Multiple Projects

Last updated 14 days ago on 2026-08-12
Created 14 days ago on 2026-08-12

About

Detects a single identity listing Google Cloud Secret Manager secrets across many distinct projects in a short window. ListSecrets does not return secret values, but sweeping many projects is a common reconnaissance step before targeted AccessSecretVersion calls. Legitimate workloads typically list secrets within one project or a small set of projects; cross-project bursts from one user and source IP are uncommon outside security tooling or compromise.
Tags
Domain: CloudData Source: GCPData Source: Google Cloud PlatformData Source: GCP Audit LogsUse Case: Threat DetectionTactic: DiscoveryRule Type: ESQLPlatform: GCPService: GCP Secret ManagerLanguage: esql
Severity
high
Risk Score
73
MITRE ATT&CK™

Discovery (TA0007)(external, opens in a new tab or window)

False Positive Examples
Organization-wide security scanners, CSPM products, inventory jobs, or approved red-team exercises may list secrets across many projects. Validate the principal, source IP, user agent, and schedule against known tooling before treating the activity as malicious, and exclude documented automation identities when baselined. Platform or IAM administrators troubleshooting Secret Manager access across environments may briefly exceed the project cardinality threshold. Correlate with change tickets and expected administrative clients.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

gcp(external, opens in a new tab or window)

Query
text code block:
from logs-gcp.audit-* metadata _id, _version, _index | where data_stream.dataset == "gcp.audit" and event.action == "google.cloud.secretmanager.v1.SecretManagerService.ListSecrets" and cloud.project.id is not null and client.user.email is not null and source.ip is not null | stats Esql.cloud_project_id_count_distinct = count_distinct(cloud.project.id), Esql.cloud_project_id_values = values(cloud.project.id), Esql.event_count = count(*), Esql.event_outcome_values = values(event.outcome), Esql.client_user_id_values = values(client.user.id), Esql.user_agent_original_values = values(user_agent.original), Esql.earliest_timestamp = min(@timestamp), Esql.latest_timestamp = max(@timestamp) by client.user.email, source.ip, data_stream.namespace | where Esql.cloud_project_id_count_distinct >= 10 | keep client.user.email, source.ip, Esql.cloud_project_id_count_distinct, Esql.cloud_project_id_values, Esql.event_count, Esql.event_outcome_values, Esql.client_user_id_values, Esql.user_agent_original_values, Esql.earliest_timestamp, Esql.latest_timestamp, data_stream.namespace

Install detection rules in Elastic Security

Detect GCP Secret Manager ListSecrets Across Multiple Projects in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).