apache / apache/airflow

Cleartext Credential stored locally in Airflow DAG Bundles Git Configuration

Open
#64,099 3 comments 0 reactions 0 assignees View on GitHub
area:dag-bundles kind:bug kind:feature needs-triage provider:git security
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

### Description

Hello Apache Airflow Team,

When configuring a Git-based DAG bundle in Airflow using git bundle connexions, the underlying synchronization mechanism constructs the repository URL by embedding the username and token/password directly into the connection string (e.g., https://:@/.git).

So Dag Author can see these tokens during the DAG parsing phase (DagProcessor pod).

File with git credential:
```
sh-5.1$ cat /dags/sandbox/bare/config
...
[remote "origin"]
url = https://airflow_cen:@gitlab.ctie.etat.lu/pibi/airflow-projects/sandbox-dags.git
```

### Use case/motivation

To prevent access to plaintext passwords, even if DAG authors can access all databases without going through DAG processing scans, the passwords are normally encrypted in DB (note this only prevents access to DB backups in rest - Dag Author can access the credentials anyway).

### Related issues

Rejected vulnerability report: https://github.com/apache/airflow/security/advisories/GHSA-qhqv-64px-4339

### Are you willing to submit a PR?

- [x] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.