- Home
- Skills
- Data & Databases
- Airflow DAG Safety Check
More screenshots
Works with the AI Agents you already use
Airflow DAG Safety Check
expose_config = True shows your fernet_key and database password on the Configuration page.
$5
Airflow DAG Safety Check
Example session with this skill installed
Check this project with airflow-dag-safety-check.
- Read your context and instructions
- Compiled the airflow dag safety
$ python3 scripts/check_airflow.py examples/risky
BLOCK airflow.cfg:6 A04 SECRET_IN_AIRFLOW_CFG
fernet_key = <redacted>
Why: airflow.cfg holds a literal secret: fernet_key, secret_key, jwt_secret, a password, flower_basic_auth, a token in backend_kwargs, or a URL with a password (sql_alchemy_conn, broker_url, result_backend). With the fernet_key and a copy of the metadata database anyone can decrypt every stored connection password; secret_key and jwt_secret sign web sessions and API tokens, so whoever has them can forge them.
Safer: Remove the value and rotate it (for fernet_key, add the new key in front of the old one and run airflow rotate-fernet-key). Supply secrets from outside the repository: environment variables such as AIRFLOW__CORE__FERNET_KEY, the option's _cmd or _secret form, or a secrets backend.
BLOCK airflow.cfg:10 A04 SECRET_IN_AIRFLOW_CFG
BLOCK airflow.cfg:14 A03 UI_CONFIG_OR_API_OPEN
BLOCK airflow.cfg:15 A04 SECRET_IN_AIRFLOW_CFG
BLOCK airflow.cfg:18 A03 UI_CONFIG_OR_API_OPEN
BLOCK dags/customer_export.py:9 A01 HARDCODED_CREDENTIAL
BLOCK dags/customer_export.py:12 A01 HARDCODED_CREDENTIAL
BLOCK dags/customer_export.py:22 A01 HARDCODED_CREDENTIAL
BLOCK dags/customer_export.py:26 A02 TRIGGER_CONF_IN_COMMAND
BLOCK dags/team_report.py:16 A02 TRIGGER_CONF_IN_COMMAND
BLOCK webserver_config.py:5 A03 UI_CONFIG_OR_API_OPEN
REVIEW airflow.cfg:5 A17 RISKY_AIRFLOW_CFG_SETTING
REVIEW airflow.cfg:7 A17 RISKY_AIRFLOW_CFG_SETTING
REVIEW dags/customer_export.py:8 A16 HEAVY_TOP_LEVEL_CODE
REVIEW dags/customer_export.py:15 A13 CATCHUP_NOT_SET
REVIEW dags/customer_export.py:15 A14 NO_TASK_TIMEOUT
REVIEW dags/customer_export.py:15 A15 NO_RETRIES
REVIEW dags/customer_export.py:17 A11 DYNAMIC_START_DATE
REVIEW dags/customer_export.py:17 A12 REMOVED_IN_AIRFLOW_3
REVIEW dags/customer_export.py:18 A12 REMOVED_IN_AIRFLOW_3
REVIEW dags/customer_export.py:32 A18 PARAMS_IN_COMMAND
REVIEW dags/team_report.py:8 A11 DYNAMIC_START_DATE
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 4 files, 4 with Airflow content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
bash_command="./export.sh --region {{ dag_run.conf['region'] }}" lets anyone who can trigger the DAG with a config run their own commands on your workers, because Airflow does not escape the rendered command. expose_config = True shows your fernet_key and database password on the Configuration page. This skill finds those and ten other Airflow mistakes before you deploy, and tells you how to fix each one.
Your agent runs a scanner on your Airflow project: DAG files and plugins (every .py file that imports airflow), webserver_config.py, and airflow.cfg. It parses Python with the standard ast module, so comments and strings are not mistaken for code, and reads airflow.cfg section by section the way Airflow does. It knows Airflow 2.x and 3.x (airflow.sdk), DAG(...) and @dag, default_args, Param limits, Jinja templates and the safe env= pattern from the Airflow docs, and it reads the project's own defaults for retries, timeouts and catchup from airflow.cfg. It never imports or runs your DAGs. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK
- A01: passwords, tokens and keys written in DAG code (password=, env= values, extra= JSON, connection URIs with a password, known token formats) or inside commands (PGPASSWORD=..., export API_TOKEN=..., --password=..., curl -u user:password, URLs with a password)
- A02: dag_run.conf templated into bash_command, @task.bash, SSH, Docker and Kubernetes pod commands or SQL text
- A03: expose_config = True (in [webserver] for 2.x and [api] for 3.x), an API backend that lets every request in, AUTH_ROLE_PUBLIC and Airflow 3 all-admins mode
- A04: fernet_key, secret_key, jwt_secret, passwords and database URLs with a password written in airflow.cfg
REVIEW
- A11: start_date computed at parse time (datetime.now(), days_ago())
- A12: schedule_interval, timetable and days_ago, which Airflow 3 removed
- A13: scheduled Airflow 2 DAGs that leave catchup to the default (True in 2.x)
- A14: scheduled DAGs with no execution_timeout or dagrun_timeout
- A15: scheduled DAGs with no retries
- A16: Variable.get, connection lookups, hook queries, HTTP and database calls at the top level of DAG files
- A17: load_examples = True and test_connection = Enabled
- A18: params templated into commands or SQL without an enum or numeric limit (a trigger config can replace them)
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason and safer approach for each rule
- A risky and a safe example project (two DAGs, airflow.cfg and webserver_config.py each), and the real report the scanner produces on the risky one
Limits It reads each file as written: values that reach a command through several variables or other modules, .sh files loaded by bash_command, AIRFLOW__ environment variables in Docker Compose, Helm or Kubernetes files, and connections and variables stored in the database or a secrets backend are not checked. NOT FLAGGED is not a guarantee.
Static check of DAG code and airflow.cfg text. Settings passed as environment variables, the metadata database, and templated fields other than commands and SQL are not checked. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example project includes a clearly fake, inert token, passwords and keys (not-a-real-..., NOTREAL) for the scanner to find. The DAGs are never imported or run.