cds-snc / notification-planning-core

Project planning for GC Notify Core Team
0 stars 0 forks source link

Do not run Celery with super user privileges #142

Open jimleroyer opened 1 year ago

jimleroyer commented 1 year ago

Describe the bug

We've noticed this warning in our Celery execution logs:

/app/.venv/lib/python3.10/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is absolutely not recommended!
warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(

We should not be running our Celery workers as superusers. This stackoverflow entry offers a way to mitigate this issue.

Bug Severity

(SEV-1 Critical, SEV-2 Major, SEV-3 Minor, SEV-4 Low)

SEV-3

To Reproduce

  1. Restart a celery worker.
  2. The warnings will surface as the worker boots up.

Expected behavior

No warning given on worker booting up and no superuser running any celery worker.

Impact

Potential security risk, especially with serialization feature enabled.

Additional context