-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Steps to Reproduce
- Self host your prowler and deploy every container (don't stop or restart the worker container)
- Create a cloud provider with scheduled scan
- Wait few days (without restarting the worker container) for multiple output report to be generated
- Every report will have their timestamp to the date of container start/first scan (so without container restart, every report will be generated to the same day)
Expected behavior
Every report should have the TIMESTAMP
date of the date of generation/scan and not be limited to the date of container start / first scan.
Actual Result with Screenshots or Logs
I've found the root cause here:
prowler/prowler/config/config.py
Lines 13 to 14 in 24364bd
timestamp = datetime.today() | |
timestamp_utc = datetime.now(timezone.utc).replace(tzinfo=timezone.utc) |
Those definition of timestamp
and timestamp_utc
are static. The value will be set during first execution and never updated..
They must be changed to a function to return a dynamic response of the actual current date.
Example of generated report with the wrong date:
In here, my first scan was on Aug 18 but my lasted scan on Aug 27 don't have the correct date and still show the Aug 18 timestamp.
How did you install Prowler?
Docker (docker pull toniblyx/prowler)
Environment Resource
Self-hosted docker container
OS used
Linux
Prowler version
v5.10.2
Pip version
N/A
Context
No response