Skip to content

Conversation

@lydiavilchez
Copy link
Contributor

Context

New security check for GCP Compute Engine to detect persistent disks attached to suspended VMs. Suspended VMs with attached disks incur unnecessary storage costs and may pose security risks from forgotten data. This check helps identify these resources for cleanup or review.

Description

This PR adds a new GCP check that verifies whether suspended VMs have persistent disks still attached. The check evaluates all VM instances and reports:

  • PASS: VM is not suspended, or VM is suspended with no attached disks
  • FAIL: VM is in SUSPENDED state with persistent disks attached

Steps to review

  1. Review the status field added to the Instance model in compute_service.py
  2. Review how status is captured in _get_instances()
  3. Review the check logic in compute_instance_suspended_with_persistent_disks.py
  4. Review the metadata.json for accuracy

Checklist

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lydiavilchez lydiavilchez requested review from a team as code owners January 9, 2026 12:29
@github-actions github-actions bot added provider/gcp Issues/PRs related with the Google Cloud Platform provider metadata-review labels Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

✅ All necessary CHANGELOG.md files have been updated.

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.92%. Comparing base (df8d823) to head (fde1180).
⚠️ Report is 31 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9747      +/-   ##
==========================================
+ Coverage   92.46%   92.92%   +0.45%     
==========================================
  Files         160      133      -27     
  Lines       22814     3266   -19548     
==========================================
- Hits        21096     3035   -18061     
+ Misses       1718      231    -1487     
Flag Coverage Δ
api ?
prowler-py3.10-gcp 92.92% <100.00%> (?)
prowler-py3.11-gcp 92.92% <100.00%> (?)
prowler-py3.12-gcp 92.92% <100.00%> (?)
prowler-py3.9-gcp 92.92% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler 92.92% <100.00%> (∅)
api ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🔒 Container Security Scan

Image: prowler:c72bee5
Last scan: 2026-01-09 12:41:12 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 3
Total 3

3 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

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

Labels

metadata-review provider/gcp Issues/PRs related with the Google Cloud Platform provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants