Skip to content

fix(agt-policies): use array-path accessors for nested fields - #3794

Open
mehmet turac (mturac) wants to merge 1 commit into
microsoft:mainfrom
mturac:fix/issue-3360
Open

fix(agt-policies): use array-path accessors for nested fields#3794
mehmet turac (mturac) wants to merge 1 commit into
microsoft:mainfrom
mturac:fix/issue-3360

Conversation

@mturac

@mturac mehmet turac (mturac) commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • Deny ne / not_in rules still failed open when an intermediate snapshot path segment was missing, because chained object.get returned undefined instead of null.
  • Generate array-path object.get(input.snapshot, [...], null) accessors and keep negative operators matching on null so those denies fail closed.

Fixes #3360

Test plan

  • Hermetic assertions on _rego_field_accessor / _rego_op_clause
  • Added unit coverage in tests/test_migrate_resolution.py

Chained object.get returned undefined when a parent segment was missing,
so deny ne/not_in rules failed open. Array-path object.get yields null
for missing parents and leaves, keeping negative operators fail-closed.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added tests size/M Medium PR (< 200 lines) labels Aug 20, 2026
@github-actions

Copy link
Copy Markdown

PR Review Summary

Check Status Details
🔍 Code Review ⚠️ Missing No current-run comment
🛡️ Security Scan ⚠️ Missing No current-run comment
🔄 Breaking Changes ⚠️ Missing No current-run comment
📝 Docs Sync ⚠️ Missing No current-run comment
🧪 Test Coverage ⚠️ Missing No current-run comment

Verdict: ⚠️ AI review incomplete; ready for human review

AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims.

@github-actions

Copy link
Copy Markdown

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AGT Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk size/M Medium PR (< 200 lines) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agt-policies: deny ne/not_in still fail-open when an intermediate path segment is missing (post-#3299)

1 participant