Skip to content

Conversation

@vicferpoy
Copy link
Member

Context

When scans are running for more than 24 hours, more than one scheduled scan can be created for the same provider, leading to unexpected behaviors and errors.

Description

With this approach, no more than one scheduled scan can be run in the same day for the same provider.
Also, when the scheduled scan task is triggered, it will take care of duplicates to clean the tenant.

Note

Locally, more than one scheduled scans were forced under the same provider. After triggering the perform scheduled scan task, the duplicated scheduled scan was deleted and the scan was properly run.

Steps to review

Please add a detailed description of how to review this PR.

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack

SDK/CLI

  • Are there new checks included in this PR? Yes / No
    • If so, do we need to update permissions for the provider? Please review this carefully.

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

  • All issue/task requirements work as expected on the API
  • Endpoint response output (if applicable)
  • EXPLAIN ANALYZE output for new/modified queries or indexes (if applicable)
  • Performance test results (if applicable)
  • Any other relevant evidence of the implementation (if applicable)
  • 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.

@vicferpoy vicferpoy requested a review from a team as a code owner January 19, 2026 16:06
@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 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 19, 2026

🔒 Container Security Scan

Image: prowler-api:fe74b9b
Last scan: 2026-01-19 16:20:24 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 11
Total 11

10 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:

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 92.06349% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.16%. Comparing base (3421749) to head (6b3d034).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9829      +/-   ##
==========================================
+ Coverage   86.60%   92.16%   +5.56%     
==========================================
  Files         222      180      -42     
  Lines        5645    24808   +19163     
==========================================
+ Hits         4889    22865   +17976     
- Misses        756     1943    +1187     
Flag Coverage Δ
api 92.16% <92.06%> (?)
prowler-py3.10-azure ?
prowler-py3.11-azure ?
prowler-py3.12-azure ?
prowler-py3.9-azure ?

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

Components Coverage Δ
prowler ∅ <ø> (∅)
api 92.16% <92.06%> (∅)
🚀 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.

provider_id=provider_id,
task__task_runner_task__task_id=task_id,
).order_by("completed_at")
).first()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to order it by completion time? I assume not but I can't see why.

):
# Duplicated task execution due to visibility timeout or scan is already running
if executed_scan:
# Duplicated task execution due to visibility timeout
Copy link
Member

@jfagoagas jfagoagas Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Don't we need to increase it for this kind of tasks?
  2. Is the message being re-queued?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants