Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-137684 | A security flaw has been discovered in eosphoros-ai DB-GPT up to 0.8.3. This affects the function editor_sql_run of the file packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/editor/api_editor_v1.py of the component Editor SQL Run API. Performing a manipulation of the argument db_name results in authorization bypass. It is possible to initiate the attack remotely. The exploit has been released to the public and may be used for attacks. The pull request to fixCVSS 8.7CVE-2026-137992 | libexpat through 2.11.0 contains a denial of service vulnerability in defineAttribute() of lib/xmlparse.c that fails to detect duplicate non-ID #IMPLIED or #REQUIRED attribute declarations. Attackers can supply a crafted XML document with repeated ATTLIST declarations in an internal DTD subset to cause quadratic CPU consumption in storeAtts() during parsing.CVSS 8.5CVE-2026-137994 | Leo through 6.8.10 contains an insecure deserialization vulnerability that allows attackers to execute code by embedding pickled data in unknown XML attributes of .leo outlines. Attackers can place a pickle __reduce__ gadget in a or element attribute that resolveUa passes to pickle.loads, executing code with user privileges when the outline is opened.CVSS 7.0CVE-2026-137995 | FOG Project before 1.6.0.119 contains an information disclosure vulnerability that allows unauthenticated attackers to obtain host tokens from status/hostgetkey.php by supplying a host MAC address. Attackers can present the token to service/hostinfo.php to retrieve decrypted Active Directory join credentials and Windows product keys during deployment windows.CVSS 6.8CVE-2026-137996 | Zettlr before 4.11.0 fails to validate URI schemes in Markdown link targets, allowing attackers to launch arbitrary registered protocol handlers via Electron shell.openExternal without confirmation. Attackers can craft documents whose Ctrl/Cmd-clicked links use smb:// to leak NTLM credential hashes on Windows or invoke custom protocol handlers with attacker-controlled parameters.CVSS 8.5CVE-2026-137997 | HCIPy through 0.7.1 contains an insecure deserialization vulnerability that allows attackers to execute code by supplying crafted .pkl files to read_field, read_grid or read_mode_basis. Because hcipy/util/io.py selects pickle by file extension and calls pickle.load, a __reduce__ gadget in a pupil, apodizer, PSF or mode-basis file runs code with the user's privileges.CVSS 8.5CVE-2026-137998 | Detoxify 0.5.3 through 0.5.4 contains an insecure deserialization vulnerability in load_checkpoint that allows attackers to execute code by supplying a crafted checkpoint file. Attackers can embed a pickle __reduce__ gadget in a .ckpt file loaded via torch.load with weights_only=False to run code with the user's privileges.CVSS 8.5CVE-2026-137999 | JSONSchema2PoPo2 through 3.0.3 contains a code injection vulnerability that allows attackers to inject Python code by supplying JSON Schema default or format values that are written unescaped. Attackers can place a single quote in a string property default to break out of the literal in the generated __init__ signature, executing injected code when the generated module is imported.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

Airflow Implicit Xcom vs Explicit Xcom

What is Airflow? Apache Airflow is an open-source orchestration tool used by data engineers for developing, scheduling, and monitoring batch-oriented…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 5 Min. Lesezeit
Quelle: dev.to
Rubrik: Programación segura




What is Airflow?



Apache Airflow is an open-source orchestration tool used by data engineers for developing, scheduling, and monitoring batch-oriented workflows.






How it Works





  • Workflow as code: Airflow workflows are defined entirely in Python, resulting in what is commonly referred to as "Workflow as code".


  • DAGs: Directed Acyclic Graphs in Airflow are used to organise tasks in a specific order with clear dependencies, without looping back on themselves.


  • Automation: Airflow handles scheduling, automated retries if a task fails, and sends alerts if a pipeline breaks.


  • Web UI: It features a web-based UI to visualize, manage, and debug workflows.




from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.python import PythonOperator

def print_hello():
print("hello")

with DAG(
"simple_hello",
start_date=datetime(2026, 6, 17),
schedule=timedelta(minutes=5),
catchup=False,
) as dag:
hello_task = PythonOperator(
task_id="print_hello",
python_callable=print_hello,
)

hello_task









How Airflow is used with Python for Data Engineering



Airflow is the standard tool for data engineers for batch-oriented workflows. Ideal when you need tasks to run on a specific schedule, rely on the successful completion of previous tasks and require robust handling.



Airflow can be integrated with Databases like Snowflake, MySQL, and Postgres, Cloud providers like AWS and Google Cloud for more complex workflows.



For a workflow to execute as intended through various tasks and for tasks that depend on data from previous tasks, data has to be handled correctly by Airflow to avoid breaking the pipeline.






How data moves between tasks



Airflow gives you several ways to pass data between tasks. Picking the right one matters, the wrong choice will slow you down.






1. XCom (cross-communication)



XCom is Airflow's built-in way for tasks to talk to each other. By default, it stores data directly in Airflow's metadata database, which makes it fast to set up but a poor fit for anything large. Think status flags and file paths, not dataframes.



Implicit XCom. When a task's Python callable returns a value, Airflow automatically stores it under the return_value key, no extra code needed.




def extract():
return {"price": 300, "city": "Mombasa"}






Any downstream task can pull that value with xcom_pull(task_ids="extract").



Explicit XCom. Sometimes one return value isn't enough, or you want a custom key instead of return_value. That's what ti.xcom_push() and ti.xcom_pull() are for:




def extract(**context):
context["ti"].xcom_push(key="raw_price", value=3.42)

def transform(**context):
price = context["ti"].xcom_pull(key="raw_price", task_ids="extract")






TaskFlow API. The modern way to write Airflow DAGs. Decorate your functions with @task, and Airflow wires up the XCom push and pull for you based on function arguments and return values:




from airflow.decorators import task

@task
def extract():
return {"price": 3.42}

@task
def transform(data):
return data["price"] * 1.1

transform(extract())






No manual xcom_push or xcom_pull calls. It reads like normal Python, and it's the approach most new DAGs should start with.



One catch that isn't obvious at first: XCom data has to be JSON-serializable. Return a pandas DataFrame straight from a task and it'll fail silently or throw an unhelpful error. Convert it to df.to_dict("records") first, and if you're passing bytes, decode them to a string before pushing.






2. External object storage



For anything too big for the metadata database, don't push the data itself through XCom, push a pointer to it. One task uploads a file to S3 or GCS and returns the URI; the next task downloads it from that URI. The same pattern works with a shared NFS mount or a Kubernetes persistent volume if everything's running on the same cluster. XCom just carries the address, not the payload.






3. Database state changes



Sometimes the cleanest handoff isn't through Airflow at all, it's through the database. Task A runs SQL that creates a temporary table; task B runs SQL that reads from it. Or task A updates rows in an operational table, and task B picks up the new state on its next read. Airflow's job here is purely orchestration, it triggers the SQL, but the transformation happens entirely inside the warehouse.






4. Airflow global storage



Not every piece of shared data belongs to a single task run. Airflow Variables are key-value pairs stored in the metadata database and readable by any task in any DAG, useful for config values that don't change often. Connections and Hooks work the same way for credentials, defined once in the UI or an environment variable, then injected into tasks at runtime instead of hardcoded in your scripts.






5. Custom XCom backends



If you outgrow the default metadata-database backend but still want XCom's syntax, you can configure a custom backend that intercepts XCom writes and redirects them to S3, GCS, or wherever you'd rather store them. Your DAG code stays the same, xcom_push and xcom_pull work exactly as before, only the storage location changes underneath.






6. SubDAGs and TriggerDagRunOperator



For splitting work across DAGs rather than within one, SubDAGs let you nest a DAG inside a task of a parent DAG, though they've fallen out of favor because they tend to create scheduler bottlenecks. TriggerDagRunOperator is the more common approach now: a task in one DAG triggers a run of a completely separate DAG, optionally passing a config dict along with it. It's a cleaner way to decouple pipelines that still need to hand off to each other.






Most XCom bugs aren't about Airflow being complicated, they're about a wrong assumption slipping through quietly. A typo in task_ids. A DataFrame that isn't JSON-serializable. An os.getenv("USER") call that collides with your actual OS environment variable instead of the value you meant to set. None of these throw a loud error. They just make a downstream task pull None and fail somewhere that looks unrelated to the real cause.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Debate de la comunidad y comentarios

🌐 Unirse al chat principal

Inicia el debate en el stream de difusión del Social Chat o envía arriba una contribución experta mediante el formulario de ampliación.

Valoración de la comunidad & prueba social
⭐ Valoración de los lectores
–
Ø / 5.0
Aún no hay valoraciones de lectores
¿Le ha resultado útil este artículo?
0
Dejar una valoración ahora
Valoración detallada (opcional)
Contenido & calidad
Fuente & credibilidad
Actualidad
Briefing de seguridad Gratis · baja en 1 clic

Intelligence Digest — gratis

Cada día las noticias de seguridad más importantes · baja en cualquier momento

Clústeres de historias relacionados & fuentes (IA vectorial)

2 Cluster
2 fuentes
OpenAI counter-sues Apple over trade secret theft
AppleInsider News hace 3 h
1 fuente más
Artículos similares
🔍 Verwandte News

Auch interessante Nachrichten Airflow Implicit Xcom vs Explicit Xcom

Thematisch verwandte Begriffe: Airflow, Implicit, Xcom, Explicit · 6 Treffer

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

Laden...

Cargando artículos ...

Laden...

Cargando vídeos ...

💬 Cargando comentarios…
Desliza para actualizar
Widgets & Topics
Loading widgets…
Nächster Beitrag