Skip to content

fix: resolve GCP monitoring alert policy false negatives#1726

Open
raajheshkannaa wants to merge 1 commit intonccgroup:masterfrom
raajheshkannaa:fix/gcp-monitoring-alert-placeholder
Open

fix: resolve GCP monitoring alert policy false negatives#1726
raajheshkannaa wants to merge 1 commit intonccgroup:masterfrom
raajheshkannaa:fix/gcp-monitoring-alert-placeholder

Conversation

@raajheshkannaa
Copy link
Copy Markdown

Closes #1725

Summary

  • Fix hardcoded <Log Metric Name> placeholder that never matched real alert policies, causing all 8 CIS GCP monitoring checks to return false
  • Each check now passes the correct CIS-recommended metric name (e.g., project_ownership_changes-counter)
  • Uses substring match for filter comparison to handle additional clauses like AND resource.type="global"

Changes

  • ScoutSuite/providers/gcp/resources/stackdrivermonitoring/monitoring_alert_policies.py

Test plan

  • All 50 existing tests pass
  • Each of the 8 alert policy checks now receives a unique metric name argument
  • Disabled policies are skipped early

Fix hardcoded placeholder string that never matches real alert
policies and add missing metric filter name comparison.

Fixes nccgroup#1725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCP Monitoring Alert Policy checks always return false due to unfilled placeholder

1 participant