feat: Add scheduled and recurring scan support with cron expression (…#394
feat: Add scheduled and recurring scan support with cron expression (…#394Somil450 wants to merge 4 commits into
Conversation
utksh1
left a comment
There was a problem hiding this comment.
Thanks for building this out. I’m requesting changes before merge.\n\nRequested changes:\n- Rebase/update the branch first; GitHub shows this PR as behind .\n- Fix the failing CI jobs: , , and .\n- Remove the unused The httpx command line client could not run because the required dependencies were not installed.
Make sure you've installed everything with: pip install 'httpx[cli]' dependency addition from ; this scheduling feature does not use it.\n- Validate on the backend before saving it. Right now invalid cron strings can be persisted and only fail later inside the scheduler loop.\n- Add targeted tests for cron scheduling behavior and invalid-expression handling so we do not regress workflow execution timing.\n\nThe feature is valuable, but it needs to be rebased, tightened, and covered by tests before approval.
utksh1
left a comment
There was a problem hiding this comment.
Thanks for building this out. I’m requesting changes before merge.\n\nRequested changes:\n- Rebase or update the branch first; GitHub shows this PR as behind main.\n- Fix the failing CI jobs: backend-tests, frontend-checks, and formatting-hygiene.\n- Remove the unused httpx dependency addition from backend requirements; this scheduling feature does not use it.\n- Validate cron expressions on the backend before saving them. Right now invalid values can be stored and only fail later inside the scheduler loop.\n- Add targeted tests for cron scheduling behavior and invalid-expression handling so workflow timing stays reliable.\n\nThe feature is valuable, but it needs to be rebased, tightened, and covered by tests before approval.
bb7d540 to
9e53d98
Compare
|
@utksh1 now plz check i have resolved all the issues plz review |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed latest state. CI is green now, but blockers remain: httpx is still added without being used by this feature, and cron expressions are still accepted by create/update routes without backend validation before save. Please remove the unused dependency, validate cron_expression at the API boundary, and add explicit invalid-cron route tests in addition to scheduler tests.
Scheduled and Recurring Scan Support (Resolves #374)
This PR introduces robust scheduling capabilities for automated workflows by allowing users to define execution rules using Cron Expressions or traditional intervals. This enables users to seamlessly set up daily, weekly, monthly, or customized automated security scans.
What's Changed
WorkflowSchedulerwithinbackend/secuscan/workflows.pyto supportcroniterparsing. Workflows will now dynamically calculate the exact next execution timestamp.init_dbto seamlessly inject thecron_expressioncolumn into the existingworkflowstable without disrupting prior user data.frontend/src/pages/Workflows.tsxwith an interactive "Cron Expression" vs "Interval" selector when creating/updating workflows.api.tsto consume and serialize the new cron features correctly.