bedkillerspacex-boop/codex-skill-library/airflow-dag-security
Claude Code and agent skill by bedkillerspacex-boop/codex-skill-library
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Secure Apache Airflow DAGs and deployment: connections/variables secrecy, DAG code injection risks, RBAC, example-DAG disable, executor isolation, and callback hardening. Use when reviewing Airflow 2.x ops or authoring production DAGs on owned platforms — not for attacking third-party Airflow instances.
Install
npx vskill@latest install bedkillerspacex-boop/codex-skill-library/airflow-dag-securitySKILL.md
The same SKILL.md was published earlier as bedkillerspacex-boop/codex-skill-library/airflow-dag-security.
Airflow DAG Security
Scope And Authorization
- In scope: Airflow deployments and DAGs your organization owns or is authorized to assess.
- Out of scope: Unauthorized access to others’ Airflow UIs or metadata DBs.
- Prefer staging for config changes (
airflow.cfg, secrets backends). - Never print connection passwords in logs, tickets, or
airflow connections getoutput shared widely. - Pair DAG Python with
code-quality-standardsandpython-style-and-typing.
When To Use
- Production DAG review (secrets,
BashOperatorinjection, pickle). - Hardening webserver RBAC/SSO, disabling example DAGs.
- Moving connections/variables to a secrets backend.
- Executor isolation (KubernetesExecutor pods, least privilege).
- Incident after credential leak via task logs.
Do Not Use As Primary
| Need | Skill instead | |
|---|---|---|
| Dataset-aware scheduling patterns | airflow-dataset-scheduling | |
| Generic secrets program | secrets-management-hygiene | |
| Airbyte connector trust | airbyte-connector-security | |
| K8s pod hardening broadly | kubernetes security skills | |
| Implementation quality baseline | code-quality-standards |
Domain Focus
| Area | Guidance | |
|---|---|---|
| Secrets | Connections/Variables via backend (Vault/SM); not raw in DAG files | |
| DAG code | No pickle; no untrusted Jinja user input into bash; pin images | |
| Auth | RBAC on; example DAGs off; SSO; no default admin | |
| Executors | Isolate tasks; don’t run webserver as task user with broad cloud admin | |
| Logs | Redact; limit who can read task logs with secrets | |
| Callbacks | Failure callbacks must not embed secrets in HTTP posts |
Workflow
1. Confirm scope and success criteria
- Record Airflow version, executor, deployment (MWAA/Composer/self-host), DAG repo.
- Success: no secrets in git DAGs; RBAC roles least privilege; example DAGs disabled;
donot_pickle/safe XCom; operators use templating safely. - List high-value connections (warehouses, prod APIs).
2. Inventory configuration and auth
- Confirm auth manager / RBAC roles (Admin, Op, User, Viewer).
- Check public webserver exposure and TLS termination.
3. Secrets backend and connections
- Migrate Variables containing secrets out of metadata UI plain storage when possible.
- Rotate any secret found in git history.
4. DAG code review checklist
| Pattern | Risk | Prefer | |
|---|---|---|---|
BashOperator(bash_command=f"... {user} ...") | Injection | Typed params + strict allowlists | |
PythonOperator with pickle | RCE | airflow.providers serializers / raw python callable in code | |
| Secrets in default args | Leak in UI/logs | Secrets backend macros | |
Unpinned docker images | Supply chain | Digest pins | |
Broad GcpHook / AWS conn | Overprivilege | Scoped IAM roles per DAG owner |
5. Executor and network isolation
- KubernetesExecutor: task ServiceAccount least privilege; NetworkPolicy default deny egress except needs.
- Celery workers: no shared filesystem secrets world-readable.
- Prevent DAGs from reaching cloud metadata if not required.
6. Verify
- Login as Viewer: cannot edit connections or clear DAGs inappropriately.
- Confirm
expose_configis not leaking secrets to UI. - Trigger a deliberate failure: callback does not post secrets.
7. Hand off
- DAG authoring standard in repo README.
- CODEOWNERS for production DAGs.
- Alert on new Admin users and connection mutations.
- Runbook for secret rotation and compromised DAG PR.
Good / Bad
| Topic | Good | Bad | |
|---|---|---|---|
| Secrets | Vault backend | password = "..." in DAG | |
| RBAC | SSO + least roles | Single shared admin | |
| Examples | load_examples=False | Example DAGs in prod | |
| Bash | Fixed scripts + validated args | Untrusted conf → shell | |
| Logs | Restricted + redaction | World-readable task logs with tokens |
Output Checklist
- [ ] Version/executor/deployment recorded
- [ ] Example DAGs disabled; RBAC/SSO reviewed
- [ ] Secrets backend / connection storage reviewed
- [ ] DAG repo scanned for secrets and unsafe operators
- [ ] Executor isolation / IAM scoped
- [ ] Import errors clean; sample task test OK
- [ ] Log access and callbacks reviewed
- [ ] Monitoring on admin/connection changes
- [ ]
code-quality-standardson DAG code
Rules
- Owned Airflow only.
- DAGs are code execution — treat PRs as privileged.
- Never commit connections passwords or service account JSON.
- Fail closed on secret access errors when possible.
- Route pure scheduling-design (datasets) to
airflow-dataset-scheduling.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingairflow-dag-security/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bedkillerspacex-boop/codex-skill-library/airflow-dag-security)