Skip to content

Commit

Permalink
celinspector: fix variable scope conflicts and resource detection edg…
Browse files Browse the repository at this point in the history
…e cases

Fix several edge cases in the CEL inspector around variable scoping and resource detection:

- Fix variable scope conflicts between top-level declarations and loop variables
  (e.g when 'i' is both a declared resource and used as a loop variable in filter)
- Add proper tracking of loop variables to avoid false positives in unknown resource detection
- Fix chain method calls on unknown resources to correctly track the dependency chain
- Handle ambiguous identifiers more robustly in nested scopes
- Add comprehensive test coverage for edge cases and variable conflicts

The changes make the inspector more reliable when dealing with complex expressions
that mix resource references with loop variables and method chains.
  • Loading branch information
a-hilaly committed Oct 23, 2024
1 parent f278272 commit 5c1644b
Show file tree
Hide file tree
Showing 2 changed files with 831 additions and 80 deletions.
Loading

0 comments on commit 5c1644b

Please sign in to comment.