-
Notifications
You must be signed in to change notification settings - Fork 10
feat(docker): Add Python DSL advanced features #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
This was referenced Dec 9, 2025
Merged
Owner
Author
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
This was referenced Dec 9, 2025
Owner
Author
Merge activity
|
Adds advanced DSL features for complex container rules: - all_of(), any_of(), none_of() logic combinators - instruction_after(), instruction_before() sequence validation - stage(), final_stage_has() for multi-stage builds - custom_check() for programmatic validation - DockerfileAccess and ComposeAccess wrapper classes All components have 97-100% test coverage (44 new tests). Files added: - python-dsl/rules/container_combinators.py - python-dsl/rules/container_programmatic.py - python-dsl/tests/test_container_combinators.py - python-dsl/tests/test_container_programmatic.py Files modified: - python-dsl/rules/__init__.py (added new exports) Part of: Dockerfile & Docker Compose Support Depends on: PR #5 (Python DSL Core) Next PR: #7 Integration & Rule Library
cc1aef0 to
fe3302e
Compare
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.

Summary
Adds advanced DSL features for writing complex multi-condition container security rules.
Changes
Logic Combinators:
all_of()- AND logic (all conditions must match)any_of()- OR logic (any condition can match)none_of()- NOT logic (no conditions should match)Sequence Validation:
instruction_after()- Ensure instruction orderinginstruction_before()- Validate instruction placementMulti-Stage Build Support:
stage()- Query specific build stagesfinal_stage_has()- Check final stage propertiesProgrammatic Access:
custom_check()- Custom validation functionsDockerfileAccess- Wrapper for Dockerfile graph queriesComposeAccess- Wrapper for docker-compose graph queriesExample Usage
Testing
Stack