Repository navigation
Feature: Prevent transitive injection via an include_packages config property - #176
Merged
Merged
Conversation
added 8 commits
May 10, 2026 22:06
Issue #172 requests an included_packages property to make it easier to have an allowlist for which packages to enable any injected nodes from. This commit adds the initial configuration value to our manifest configuration, and creates the basic filtering method we will be using as a starting point. Next steps are to add proper validation to the ManifestReference model, unit tests, and documentation.
This makes sure that we don't have entries in both lists. It wouldn't make sense for there to be values in both.
I was looking at <0 , which is never possible for the lenth of a list.
Note that some are failing!
It's great that I actually wrote tests for this. lol.
include_packages config propertyinclude_packages config property
adrienneyager
marked this pull request as ready for review
May 11, 2026 13:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description and Motivations
Add an
included_packagesconfig property as an allowlist alternative to the existingexcluded_packagesdenylist for filtering which packages nodes get injected from a referenced manifest.In non-hierarchical dbt mesh configurations with bi-directional references, maintaining
excluded_packageslists grows exponentially as projects are added. With 5+ projects referencing each other, every project must exclude all other packages that transitively appear through referenced manifests, leading to configuration that is error-prone and difficult to maintain.included_packagesflips the approach: instead of listing every package to block, you simply declare which package owns each manifest.For example:
Note that
included_packagesandexcluded_packagesare mutually exclusive. Specifying both raises aValueError.Changes
dbt_loom/config.py: Addedincluded_packagesfield toManifestReferencewith amodel_validatorenforcing mutual exclusivity withexcluded_packagesdbt_loom/__init__.py: Extracted package filtering logic into afilter_modelsstatic method that handles both allowlist and denylist paths; updated node injection to use ittests/test_manifest_references.py: New test file with 4 unit tests coveringincluded_packagesandexcluded_packagesfilteringdocs/advanced-configuration.md: Documented the newincluded_packagesproperty with usage exampleREADME.md: Added "Include only specific packages" section mirroring the advanced config docsResolves: #172