Background workers often have the "keys to the kingdom." They have high-level database access, permissions to delete files, and are often overlooked in security audits.
The Hidden Attack Surface
Because cron jobs are often run as root or high-privilege service accounts, they are prime targets for lateral movement.
Best Practices
- Least Privilege: Give each worker only the DB permissions it needs.
- Key Rotation: Don't hardcode API keys in crontabs. Use Secret Managers.
- Monitor the Schedule: Use CronRabbit to detect if a "New" job starts pinging your account that you didn't authorize.
Knowing exactly what is running in your background is a critical security layer.
