Context
dbt (data build tool) is the industry standard for data transformation. Security teams need to scan dbt projects for misconfigurations, credential exposure, and SQL injection risks — especially in CI/CD pipelines.
Related to DCM scanning (#1021) — DCM projects can embed dbt projects.
Security Risks to Scan
profiles.yml / profiles.yaml
dbt_project.yml
packages.yml / packages.yaml
SQL Models & Macros
CI/CD
Implementation
- Add
iac/dbt_security.py following iac/terraform_security.py pattern
- Rule IDs:
DBT-SEC-001 through DBT-SEC-0XX
- Include in CI/CD scan type alongside Terraform, Dockerfile, Helm
Labels: enhancement, security, iac, v0.75.0
Context
dbt (data build tool) is the industry standard for data transformation. Security teams need to scan dbt projects for misconfigurations, credential exposure, and SQL injection risks — especially in CI/CD pipelines.
Related to DCM scanning (#1021) — DCM projects can embed dbt projects.
Security Risks to Scan
profiles.yml / profiles.yaml
require_ssl: false)passwordauth instead of key-pair or OAuthdbt_project.yml
clean-targetspointing outside projectdispatchconfigurationsrequire-dbt-versionconstraint (supply chain risk)packages.yml / packages.yaml
revision: maininstead of tag/sha)SQL Models & Macros
{{ var() }}used in raw SQL without quoting (SQL injection)run_query()with user-controlled inputGRANT ALLin post-hooks{{ log() }}calls{{ env_var() }}exposing secrets in compiled SQLCI/CD
dbt runwithout--fail-fastin productiondbt testin pipelinedbt seedwith sensitive CSV data committed to GitImplementation
iac/dbt_security.pyfollowingiac/terraform_security.pypatternDBT-SEC-001throughDBT-SEC-0XXLabels: enhancement, security, iac, v0.75.0