Skip to content

fix(azure): normalize MySQL configuration values to uppercase#10398

Open
tejas0077 wants to merge 2 commits intoprowler-cloud:masterfrom
tejas0077:fix/azure-mysql-configuration-value-uppercase
Open

fix(azure): normalize MySQL configuration values to uppercase#10398
tejas0077 wants to merge 2 commits intoprowler-cloud:masterfrom
tejas0077:fix/azure-mysql-configuration-value-uppercase

Conversation

@tejas0077
Copy link
Contributor

Azure MySQL Flexible Server configuration values returned from the API
can be mixed case (e.g. "ON", "on", "On"). This causes security checks
to return incorrect results when comparing configuration values against
expected strings like "ON" or "OFF".

Added .upper() normalization to configuration.value in mysql_service.py.
None values are handled safely with a conditional check.

Before:
value=configuration.value,

After:
value=configuration.value.upper() if configuration.value else configuration.value,

No new dependencies required.
Are there new checks included? No

  1. Review the one-line change in:
    prowler/providers/azure/services/mysql/mysql_service.py

  2. Run existing tests to verify:
    python -m pytest tests/providers/azure/services/mysql/ -v

  3. All 26 existing tests pass with the fix applied.

Configuration values from Azure API can be mixed case (e.g. 'ON', 'on').
Normalizing to uppercase ensures consistent comparison in security checks.
@tejas0077 tejas0077 requested review from a team as code owners March 19, 2026 15:51
@github-actions github-actions bot added provider/azure Issues/PRs related with the Azure provider community Opened by the Community labels Mar 19, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 2026

Conflict Markers Resolved

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

@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.12%. Comparing base (0790619) to head (fb04281).
⚠️ Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10398      +/-   ##
==========================================
+ Coverage   84.16%   86.12%   +1.95%     
==========================================
  Files        1606      223    -1383     
  Lines       51362     5743   -45619     
==========================================
- Hits        43228     4946   -38282     
+ Misses       8134      797    -7337     
Flag Coverage Δ
prowler-py3.10-aws ?
prowler-py3.10-azure 86.12% <ø> (-3.62%) ⬇️
prowler-py3.10-config ?
prowler-py3.10-gcp ?
prowler-py3.10-github ?
prowler-py3.10-googleworkspace ?
prowler-py3.10-iac ?
prowler-py3.10-kubernetes ?
prowler-py3.10-lib ?
prowler-py3.10-m365 ?
prowler-py3.10-mongodbatlas ?
prowler-py3.10-nhn ?
prowler-py3.10-openstack ?
prowler-py3.10-oraclecloud ?
prowler-py3.11-aws ?
prowler-py3.11-azure 86.12% <ø> (-3.62%) ⬇️
prowler-py3.11-config ?
prowler-py3.11-gcp ?
prowler-py3.11-github ?
prowler-py3.11-googleworkspace ?
prowler-py3.11-iac ?
prowler-py3.11-kubernetes ?
prowler-py3.11-lib ?
prowler-py3.11-m365 ?
prowler-py3.11-mongodbatlas ?
prowler-py3.11-nhn ?
prowler-py3.11-openstack ?
prowler-py3.11-oraclecloud ?
prowler-py3.12-aws ?
prowler-py3.12-azure 86.12% <ø> (-3.66%) ⬇️
prowler-py3.12-config ?
prowler-py3.12-gcp ?
prowler-py3.12-github ?
prowler-py3.12-googleworkspace ?
prowler-py3.12-iac ?
prowler-py3.12-kubernetes ?
prowler-py3.12-lib ?
prowler-py3.12-m365 ?
prowler-py3.12-mongodbatlas ?
prowler-py3.12-nhn ?
prowler-py3.12-openstack ?
prowler-py3.12-oraclecloud ?
prowler-py3.9-aws ?
prowler-py3.9-azure 86.12% <ø> (-3.60%) ⬇️
prowler-py3.9-config ?
prowler-py3.9-gcp ?
prowler-py3.9-github ?
prowler-py3.9-googleworkspace ?
prowler-py3.9-iac ?
prowler-py3.9-kubernetes ?
prowler-py3.9-lib ?
prowler-py3.9-m365 ?
prowler-py3.9-mongodbatlas ?
prowler-py3.9-nhn ?
prowler-py3.9-openstack ?
prowler-py3.9-oraclecloud ?

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

Components Coverage Δ
prowler 86.12% <ø> (+1.95%) ⬆️
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.

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

Labels

community Opened by the Community provider/azure Issues/PRs related with the Azure provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant