Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(azure): handle account not supporting Blob #7060

Conversation

danibarranqueroo
Copy link
Member

Context

This PR fixes an issue where the _get_blob_properties method stops processing storage accounts when encountering an account that doesn’t support blobs (e.g., FileStorage). Now, if the error message contains "Blob is not supported for the account.", a warning is logged and the loop continues processing subsequent accounts.

Fix #7047

Description

Updated exception handling in _get_blob_properties to check the error message and continue the loop when the unsupported blob error is detected.

Checklist

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.

@danibarranqueroo danibarranqueroo requested review from a team as code owners February 27, 2025 11:15
@github-actions github-actions bot added the provider/azure Issues/PRs related with the Azure provider label Feb 27, 2025
@MrCloudSec MrCloudSec changed the title fix(storage): fix _get_blob_properties fix(azure): handle account not supporting Blob Feb 27, 2025
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 88.73%. Comparing base (0f414e4) to head (2a6ba53).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7060      +/-   ##
==========================================
- Coverage   88.76%   88.73%   -0.03%     
==========================================
  Files        1201     1201              
  Lines       34920    34926       +6     
==========================================
- Hits        30996    30991       -5     
- Misses       3924     3935      +11     
Flag Coverage Δ
prowler 88.73% <55.55%> (-0.03%) ⬇️

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

Components Coverage Δ
prowler 88.73% <55.55%> (-0.03%) ⬇️
api ∅ <ø> (∅)

@MrCloudSec MrCloudSec merged commit 81edafd into master Feb 27, 2025
11 of 13 checks passed
@MrCloudSec MrCloudSec deleted the PRWLR-6378-fix-storage-ensure-soft-delete-is-enabled-azure-check branch February 27, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/azure Issues/PRs related with the Azure provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug with azure storage_ensure_soft_delete_is_enabled check
2 participants