Repository navigation
open_door.rego: Fix load_transparency_trust_list - #2993
Open
Tingmao Wang (micromaomao) wants to merge 1 commit into
Open
Tingmao Wang (micromaomao) wants to merge 1 commit into
Tingmao Wang (micromaomao) wants to merge 1 commit into
Conversation
It is missing the allowed_ledgers output, which makes this allow all policy not actually work. verifyPolicyRules in the test code checks that each enforcement point is present in the allow all policy. Since the load_transparency_trust_list rule depends on input.ledgers, we pass in a fake input. The same logic can be applied later if we have more enforcement points with the output being unavoidably dependent on input. Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
There was a problem hiding this comment.
🟡 Changes recommended
The tests do not verify that a non-empty transparency trust list stores every offered ledger key.
1 open issue
What changed in this PR
Fixes transparency trust list loading in the allow-all Rego policy by returning the ledger list required by the security policy enforcer.
Changes:
- Returns all supplied ledgers through
allowed_ledgers. - Provides fake ledger input during template validation so the input-dependent rule remains visible.
| File | Description |
|---|---|
pkg/securitypolicy/rego_utils_test.go |
Supplies empty ledger input when checking policy enforcement points. |
pkg/securitypolicy/open_door.rego |
Adds allowed_ledgers to the transparency trust list result. |
Review effort: Balanced
| unmount_cims := {"allowed": true} | ||
| log_provider := {"allowed": true} | ||
| load_transparency_trust_list := {"allowed": true} | ||
| load_transparency_trust_list := {"allowed": true, "allowed_ledgers": input.ledgers} |
KenGordon
approved these changes
Nov 20, 2026
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.

It is missing the allowed_ledgers output, which makes this allow all policy not actually work.
verifyPolicyRules in the test code checks that each enforcement point is present in the allow all policy. Since the load_transparency_trust_list rule depends on input.ledgers, we pass in a fake input. The same logic can be applied later if we have more enforcement points with the output being unavoidably dependent on input.