Samedi 05 Décembre 2026 21:21:57 GMT+01:00

Netcrook

AccueilManifeste
Actualités
Techcrook
Geocrook
WikicrookÉquipeAppContact
EnglishItaliano

WIKICROOK

Importable Python function

A function a worker can load from code available in its runtime environment.

An importable Python function is a function defined in a Python module that a running process can load using Python’s import system. The module must be available on the process’s import path, and the function must be accessible within it. This does not mean that any arbitrary function can be called: the worker needs the relevant code installed or otherwise present in its runtime environment.

In task-processing systems such as Celery, workers execute work based on messages received from a broker. If a message can cause a worker to select and run an importable function, someone who can write untrusted messages to that broker may be able to trigger code already available to the worker. The impact depends on the message handling, installed code, and the worker’s permissions. Defenses include restricting broker access to authorized publishers and consumers, isolating the broker, and running workers with only the privileges they need.

← index WIKICROOK