build(deps): bump github.com/open-policy-agent/opa from 1.5.0 to 1.5.1

Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/open-policy-agent/opa/releases)
- [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-policy-agent/opa/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/open-policy-agent/opa
  dependency-version: 1.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2025-06-06 06:50:21 +00:00
committed by GitHub
parent 9a135406b7
commit 67d258bfb1
6 changed files with 4866 additions and 8 deletions

View File

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@ func walk(filter, path *ast.Array, input *ast.Term, iter func(*ast.Term) error)
pathCopy = ast.InternedEmptyArrayValue
} else {
// Shallow copy, as while the array is modified, the elements are not
pathCopy = path.Slice(0, path.Len())
pathCopy = copyShallow(path)
}
// TODO(ae): I'd *really* like these terms to be retrieved from a sync.Pool, and
@@ -48,8 +48,7 @@ func walk(filter, path *ast.Array, input *ast.Term, iter func(*ast.Term) error)
filter = filter.Slice(1, -1)
if key.IsGround() {
if term := input.Get(key); term != nil {
path = pathAppend(path, key)
return walk(filter, path, term, iter)
return walk(filter, pathAppend(path, key), term, iter)
}
return nil
}
@@ -149,6 +148,16 @@ func pathIsWildcard(operands []*ast.Term) bool {
return false
}
func copyShallow(arr *ast.Array) *ast.Array {
cpy := make([]*ast.Term, 0, arr.Len())
arr.Foreach(func(elem *ast.Term) {
cpy = append(cpy, elem)
})
return ast.NewArray(cpy...)
}
func init() {
RegisterBuiltinFunc(ast.WalkBuiltin.Name, evalWalk)
}

View File

@@ -10,7 +10,7 @@ import (
"runtime/debug"
)
var Version = "1.5.0"
var Version = "1.5.1"
// GoVersion is the version of Go this was built with
var GoVersion = runtime.Version()