# Open Policy Agent (OPA) v1.23.0

2026-11-26 · [릴리스 노트 원문](https://github.com/open-policy-agent/opa/releases/tag/v1.23.0) · [전체 정리](https://ratatosk.io/ko/releases/opa/v1.23.0)

보안 3 · 호환성 변경 15 · 폐기 예정 1 · 중요 수정 18 · 기능·개선 14 · 의존성 갱신 21 · 기타 49

## 보안 (3)

### MySQL Compile API의 문자열 내장 함수 거부

- 영향 대상: MySQL을 대상으로 하는 Compile API에서 `startswith`, `endswith` 또는 `contains`를 사용하는 정책

생성된 `LIKE` 필터는 MySQL의 기본 collation이 대소문자와 악센트를 구분하지 않아 정책에서 허용하지 않은 행까지 일치시킬 수 있었습니다. 이제 이러한 정책은 필터를 생성하는 대신 컴파일에 실패합니다.

> ### Compile API: no `startswith`, `endswith` or `contains` for MySQL ([#9624](https://github.com/open-policy-agent/opa/issues/9624))
> Breaking change: the MySQL target rejects `startswith`, `endswith` and `contains`, as the SQLite target
> already did. They were translated to `LIKE`, which is case- and accent-insensitive in MySQL's default
> collations, so `startswith(input.fruits.name, "APP")` also matched `apple`. Policies using them now fail
> to compile for `application/vnd.opa.sql.mysql+json`, and for multitarget requests that include `mysql`.
> Reported by @kianwang0610, authored by @srenatus
> - Hardening of the MySQL Compile API target: use of `startswith`, `endswith` and `contains` built-in functions is rejected

### `units.parse`와 `units.parse_bytes`에 입력 크기 상한 추가

- 영향 대상: `units.parse` 또는 `units.parse_bytes`를 사용하는 정책이나 임시 쿼리

이번 릴리스 전에는 큰 크기의 입력을 처리할 때 다른 숫자 처리 경로에 적용되는 상한을 훨씬 넘는 값이 생성될 수 있었습니다. 이런 값이 정책이나 임시 쿼리에서 평가되면 평가 시간이 늘어났습니다. 이제 상한을 넘는 입력은 확장하기 전에 명확한 오류와 함께 거부됩니다.

> - topdown: Bound magnitude of units.parse/parse_bytes results ([#9404](https://github.com/open-policy-agent/opa/issues/9404)) reported and authored by @leandrocosta-git

### IPv4-mapped CIDR에서 발생하는 `net.cidr_merge` panic 수정

- 영향 대상: `net.cidr_merge`를 사용하는 정책 또는 쿼리

중복을 포함해 IPv4-mapped IPv6 CIDR을 두 개 이상 받으면 `net.cidr_merge`에서 panic이 발생해 프로세스 전체가 중단될 수 있었습니다. 이제 이런 입력을 일반 IPv4 CIDR로 병합합니다. 처음 보고된 예시는 `["10.0.0.0/7`]`을 반환합니다.

> - topdown: Fix net.cidr_merge panic on IPv4-mapped IPv6 CIDRs ([#9528](https://github.com/open-policy-agent/opa/issues/9528)) reported and authored by @nikpivkin

## 호환성 변경 (15)

### 번들 루트를 `.manifest` 위치 기준으로 변경

- 영향 대상: 번들 디렉터리, 디스크에서 로드하는 번들 tarball, 구버전 OPA로 서명하거나 검증한 번들
- 필요 조치: 디스크에서 로드하는 번들 tarball의 아카이브 루트에 `.manifest` 배치 필요; 구버전 OPA에서 `opa sign <dir>` 또는 `opa build -b <dir>`로 서명한 번들의 재서명 필요; `--exclude-files-verify` 패턴 업데이트 가능성
- 제거 시점: 미상

이전에는 로드 경로를 어떻게 입력했는지에 따라 번들 콘텐츠, 데이터 배치, 서명이 달라질 수 있었습니다. 이제 `.manifest`보다 상위 경로에 있는 파일은 제외되며, `opa build`와 `opa sign` 이외의 명령은 해당 파일을 경고 없이 제외할 수도 있습니다. 번들 플러그인이 HTTP나 OCI 레지스트리에서 다운로드한 번들과 저장된 복사본은 `.manifest`, `.signatures.json` 또는 `patch.json`의 위치가 잘못되어도 경고와 함께 계속 로드됩니다.

근거: “To avoid breaking existing deployments, bundles that the bundle plugin downloads over HTTP or from an OCI registry (and their persisted copies) are still loaded as before, and OPA logs a warning each time a bundle with a misplaced `.manifest`, `.signatures.json`, or `patch.json` is loaded.” https://github.com/open-policy-agent/opa/releases/tag/v1.23.0

> - Enforcement of bundle structure: now rooted at their `.manifest` file
> and signatures depend on how a path was typed.

### `.manifest` 디렉터리 기준으로 바뀐 번들 루트

- 영향 대상: 제공된 경로 아래에 `.manifest`가 중첩된 번들 디렉터리
- 필요 조치: 이전 OPA 버전의 `opa sign <dir>` 또는 `opa build -b <dir>`로 서명한 번들의 재서명 필요; `--exclude-files-verify` 패턴 업데이트 필요 가능성

이전에는 번들 콘텐츠와 데이터 배치가 번들을 불러오는 데 사용한 경로에 따라 달라질 수 있었습니다. 이제 `.manifest`가 들어 있는 디렉터리가 루트가 되며, 그 상위 경로에 있는 파일은 제외됩니다. 제외된 정책 및 데이터 파일에 대한 경고는 `opa build`와 `opa sign`에서만 표시됩니다.

> Breaking change: OPA now treats the directory containing a bundle's `.manifest` file as the bundle root, as the
> [bundle documentation](https://www.openpolicyagent.org/docs/management-bundles#bundle-file-format) describes.
> Previously, the root depended on the path a bundle was loaded from, which made bundle contents, data placement,
> - **Bundle directories** (`opa build -b`, `opa run -b`, `opa eval -b`, `opa sign --bundle`, ...) are rooted at
>   the directory containing `.manifest`, even when it is nested below the provided path. Files above it are not
>   part of the bundle. `opa build` and `opa sign` warn about policy and data files they leave out, but other
>   commands do not, so keep other `.manifest` files (e.g., test fixtures) out of directories loaded as bundles.

### 입력 plan과 wasm resolver를 대체하는 Plan·wasm 빌드

- 영향 대상: plan 또는 wasm resolver가 포함되어 있고 `opa build -t plan` 또는 `opa build -t wasm`에 사용되는 입력 번들

이전에는 입력 번들에 포함된 plan과 wasm resolver를 빌드에 추가했지만, 이제는 대체합니다. 해당 진입점을 빌드 결과에 유지하려면 빌드 시 `-e` 인수로 제공해야 합니다.

> - **`opa build -t plan` and `-t wasm`** replace any plan, or wasm resolvers that were carried in from the input bundles.

### 번들 리더의 `SlashRooted` 및 `Passthrough` 매니페스트 거부

- 영향 대상: Go API에서 `bundle.Reader`를 사용하면서 `SlashRooted` 또는 `Passthrough` 디렉터리 로더를 쓰는 설정, 또는 디렉터리 로더를 감싼 커스텀 래퍼

`Reader.WithBaseDir`를 사용하면 매니페스트가 있는 디렉터리가 모듈 경로에 포함됩니다. 디렉터리 로더는 해당 디렉터리를 `RootOffset() string`으로 반환합니다. 디렉터리 로더를 감싼 커스텀 래퍼는 `RootOffset`을 전달해야 합니다.

> Go API: the `bundle.Reader` expects bundle-relative descriptor paths, so directory loaders configured with the
> `SlashRooted` or `Passthrough` path formats now have their manifests rejected. When `Reader.WithBaseDir` is used,
> module paths include the manifest's directory, which directory loaders report through a `RootOffset() string`
> method. Custom loaders that wrap a directory loader should forward `RootOffset`.

### 인덱싱된 오브젝트 컴프리헨션 충돌, 조회 시 `eval_conflict_error` 발생

- 영향 대상: 인덱싱된 오브젝트 컴프리헨션을 사용하는 정책

이전에는 인덱싱된 오브젝트 컴프리헨션이 같은 키에 서로 다른 값을 만들면 캐시된 빌드가 마지막 값을 유지했습니다. 충돌은 해당 그룹을 조회할 때만 `eval_conflict_error`를 발생시키며, 조회하지 않은 충돌 그룹에서는 여전히 오류가 발생하지 않습니다.

근거: “The build now returns the groups with a conflict, the cache frame records them, and looking up one of those groups raises the error, so groups that are never looked up still don't.” https://github.com/open-policy-agent/opa/pull/9613

> - topdown: Report key conflicts in indexed object comprehensions ([#9613](https://github.com/open-policy-agent/opa/pull/9613)) authored by @srenatus

### 기본 규칙 위치 텍스트에 전체 문장 포함

- 영향 대상: 기본 규칙의 파싱된 AST 또는 `opa parse` JSON에서 위치 텍스트를 사용하는 경우 (추정)

이전에는 기본 규칙의 위치 텍스트에 `default`만 포함되고 규칙 헤드 내용은 빠져 있었습니다.

> - ast: Correct default rule location text ([#9516](https://github.com/open-policy-agent/opa/pull/9516)) authored by @charlieegan3

### 음수 AST 위치 텍스트에 전체 숫자 포함

- 영향 대상: 파싱된 음수 수치 항의 AST 위치 텍스트 (추정)

`x := -1000`처럼 음수 수치 항을 파싱하면 디코딩된 위치 텍스트에는 `-`만 기록됐습니다.

> - ast: Fix negative number location text (for issue #9531) ([#9531](https://github.com/open-policy-agent/opa/issues/9531)) authored by @devjoshi2005, reported by @anderseknert

### 함수 규칙 AST 위치가 전체 문장을 포함하도록 변경

- 영향 대상: 본문이나 값이 없는 함수 규칙의 파싱된 AST 위치

`f(1)` 같은 규칙에서 이전에는 `Location.Text`에 규칙 전체가 아니라 `f`만 들어 있었습니다.

> - ast: Give a function without a body the location of its whole statement ([#9579](https://github.com/open-policy-agent/opa/pull/9579)) authored by @srenatus

### `types.Unmarshal`의 정확한 필드명 검증 및 JSON 깊이 제한

- 영향 대상: Go에서 `types.Unmarshal`로 디코딩하는 타입 JSON

중첩된 타입 JSON을 매 단계에서 다시 디코딩해 중첩 깊이가 커질수록 디코딩 시간이 제곱에 비례해 늘어났고, 깊이가 매우 깊은 입력이 JSON 디코더의 최대 깊이 제한을 우회할 수도 있었습니다. 이제 디코딩은 중첩 깊이에 선형으로 진행됩니다. 제한을 초과한 입력에는 최대 깊이 오류를 반환하며, 오류 메시지도 달라집니다.

근거: “Field names now match exactly, where struct decoding matched them case-insensitively; otherwise only inputs past the max depth change outcome. Error messages differ.” https://github.com/open-policy-agent/opa/pull/9473

> - types: Decode type JSON in linear time ([#9473](https://github.com/open-policy-agent/opa/pull/9473)) authored by @srenatus

### 디스크에서 로드하는 번들 tarball에 루트 수준의 `.manifest` 필요

- 영향 대상: 디스크에서 번들 tarball을 로드하는 설정
- 필요 조치: 아카이브 루트에 `.manifest`가 있도록 `opa build`로 다시 빌드한 디스크 로드 번들 tarball

이전에는 `bundle/.manifest`와 `bundle/data.json`이 들어 있는 tarball도 로드되어 데이터가 `data.bundle` 아래에 배치되었습니다. 이번 릴리스에서는 로드 시점에 해당 tarball을 거부합니다.

> - **Bundle tarballs** loaded from disk must have `.manifest` at the root of the archive. `opa build` always writes
>   it there.
> For example, consider this tarball, built without `opa build`:
> 
> ```console
> $ tar tzf bundle.tar.gz
> bundle/.manifest
> bundle/data.json
> bundle/authz.rego
> ```
> Previously, `opa run -b bundle.tar.gz` loaded it with `bundle/data.json` placed under `data.bundle`. It is now
> rejected because `.manifest` is not at the root of the archive. Running `opa build -b bundle/` on the extracted
> directory produces a bundle rooted at `bundle/`, with `data.json` placed at the root of `data`.

### 번들 서명 경로에 번들 루트 기준 이름과 `/` 구분자 적용

- 영향 대상: `.signatures.json`을 사용하거나 이전 OPA 버전으로 생성한 서명 또는 `--exclude-files-verify` 패턴을 사용하는 설정
- 필요 조치: `opa sign <dir>` 또는 `opa build -b <dir>`로 이전 OPA 버전에서 서명한 번들은 다시 서명해야 합니다. `--exclude-files-verify` 패턴도 업데이트해야 할 수 있습니다.

이전 서명 경로는 이 규칙을 따르지 않았으므로, 이전 OPA 버전에서 생성한 서명은 이번 릴리스와 호환되지 않을 수 있습니다.

> - **Signatures**: file names in `.signatures.json` are relative to the bundle root, with `/` separators on every
>   platform. Bundles signed by `opa sign <dir>` or `opa build -b <dir>` with older OPA versions must be re-signed,
>   and `--exclude-files-verify` patterns may need updating.

### 여러 번들 빌드 및 서명 경로 변경

- 영향 대상: 여러 번들이나 번들 경로를 사용해 `opa build` 또는 `opa sign`을 실행하는 구성. 번들이 같은 경로를 차지하게 되는 병합도 포함

여러 번들을 처리할 때 `opa build`는 각 번들의 파일을 `-b`로 지정한 경로 아래에 둡니다. 경로 맨 앞의 `..` 세그먼트는 참조 대상 디렉터리 이름으로 바꾸고, 새 루트 `.manifest`를 씁니다. 두 번들이 같은 경로를 차지하게 되면 빌드에 실패합니다. `opa sign`은 각 번들의 경로를 기준으로 파일 이름을 기록하므로, 서로 다른 소스 번들의 서명은 병합된 빌드 출력에 대해 검증되지 않습니다.

> - **`opa build` with multiple bundles** places each bundle's files under the path it was given with `-b`, with a
>   new `.manifest` at the root. Leading `..` segments are replaced with the name of the directory they refer to.
>   Merging fails when two bundles would be placed under the same path. `opa sign` with multiple bundle paths
>   names files under each bundle's path, like `opa build` does when merging. A merged `opa build` output has its
>   own new `.manifest`, so signatures from multiple separate source bundles cannot be used to verify a merged build.

### 번들 메타데이터의 루트 위치 및 정확한 `.manifest` 명명

- 영향 대상: 루트 밖에 메타데이터가 있거나 매니페스트 파일명이 정확히 `.manifest`가 아닌 번들
- 필요 조치: 번들 메타데이터는 번들 루트에 있어야 하며 매니페스트 이름은 정확히 `.manifest`여야 합니다.

이전에는 번들의 어느 폴더에서든 `.manifest`로 끝나는 파일 하나를 매니페스트로 처리할 수 있었습니다. 이제 번들 루트에 있고 이름이 정확히 `.manifest`인 파일만 매니페스트로 처리됩니다.

> - `.manifest`, `.signatures.json`, and `patch.json` must be at the bundle root, and only files named exactly

### 버전 값 기반 CLI 호환성 플래그로 `--v2-compatible` 대체

- 영향 대상: 호환성 플래그를 사용하는 CLI 명령, 특히 v2 동작을 선택하는 명령 (추정)

이전에는 `--v2-compatible`로 v2 사용을 선택했습니다. 이제는 `--compatible=v2`를 사용합니다. `--compatible=v0`과 `--compatible=v1`은 각각 해당 모드를 선택하며, 그 외 값은 거부됩니다. 기존 `--v0-compatible`과 `--v1-compatible` 플래그는 변경되지 않습니다.

근거: “Adds a single --compatible flag accepting v0, v1 or v2 and rejecting other values, so future versions don't need a flag each. The existing --v0-compatible and --v1-compatible flags are unchanged.” https://github.com/open-policy-agent/opa/pull/9496

> - cmd: Add --v2-compatible flag ([#9251](https://github.com/open-policy-agent/opa/issues/9251)) authored by @sspaink, reported by @johanfylling
> - cmd: Replace --v2-compatible with --compatible=<version> ([#9496](https://github.com/open-policy-agent/opa/pull/9496)) authored by @sspaink

### v2 호환 모드에서 요청 크기 초과 시 HTTP 413 반환

- 영향 대상: v2 호환 모드를 활성화한 서버 및 Go 통합

설정된 본문 크기 제한을 초과한 요청은 이전에는 v2 호환 모드에서도 HTTP 400을 반환했습니다. 이제는 HTTP 413을 반환합니다. 기본 모드에서는 계속 HTTP 400을 반환하며, 오류 응답 본문은 변경되지 않았습니다.

근거: “This change makes the server return HTTP 413 (Content Too Large) in v2-compatible mode, while keeping the existing HTTP 400 behavior in default mode. The error response body remains unchanged.” https://github.com/open-policy-agent/opa/pull/9497

> - server: Fix oversized request body status in v2-compatible mode ([#9497](https://github.com/open-policy-agent/opa/pull/9497)) authored by @darshpatel1052

## 폐기 예정 (1)

### 잘못 배치된 번들 파일에 대한 로드 경고

- 영향 대상: 번들 플러그인이 HTTP 또는 OCI 레지스트리에서 다운로드한 번들과 그 영구 저장본 중 `.manifest`, `.signatures.json` 또는 `patch.json` 파일이 잘못 배치된 번들
- 제거 시점: 미상

이러한 번들은 v1.23.0에서 계속 로드되지만, 로드할 때마다 경고가 발생합니다. 향후 OPA 릴리스에서는 로드에 실패합니다.

> To avoid breaking existing deployments, bundles that the bundle plugin downloads over HTTP or from an OCI registry
> (and their persisted copies) are still loaded as before, and OPA logs a warning each time a bundle with a misplaced `.manifest`, `.signatures.json`,
> or `patch.json` is loaded. **These bundles will fail to load in a future OPA release.** Rebuild them with
> `opa build` to place the manifest at the root.

## 중요 수정 (18)

### [드러나지 않던 결함] 멤버가 혼합된 `in` 리터럴의 규칙 인덱싱 수정

- 영향 대상: 상수와 ref 또는 변수가 섞인 리터럴에 `in`을 사용하는 정책

일치하는 멤버가 ref 또는 변수이면 규칙 인덱서가 규칙을 누락시켜 본문이 실행되지 않을 수 있었습니다. `default`가 있으면 이 경우 기본값이 아무런 알림 없이 반환됐습니다.

> - ast: Keep a rule indexed as "anything" for `in` with a var member ([#9506](https://github.com/open-policy-agent/opa/issues/9506)) authored by @srenatus, reported by @kholia

### 표준 입력에서 `opa fmt --drop-v0-imports`의 import 제거 수정

- 영향 대상: 표준 입력에서 `opa fmt --drop-v0-imports`로 포맷하는 정책 (추정)

정책을 표준 입력에서 읽을 때는 `opa fmt --drop-v0-imports`가 플래그를 무시해 제거 대상 import를 남겼습니다. 이제 파일을 포맷할 때와 마찬가지로 옵션이 대상으로 삼는 import를 제거합니다.

> - cmd(fmt): Honor `--drop-v0-imports` when formatting stdin ([#9619](https://github.com/open-policy-agent/opa/pull/9619)) authored by @FayezBast

### `opa inspect -a`의 labels 메타데이터 표시 수정

- 영향 대상: labels 메타데이터가 어노테이션된 규칙이 있는 정책 (추정)

이러한 정책에 `opa inspect -a`를 실행하면 이전에는 결과에 labels가 표시되지 않았습니다. 이제 어노테이션이 지정된 규칙의 결과에 labels 메타데이터가 포함됩니다.

> - cmd/inspect: Show labels metadata with -a ([#9504](https://github.com/open-policy-agent/opa/issues/9504)) authored by @srenatus, reported by @humbertoc-silva

### [드러나지 않던 결함] `opa fmt`의 중첩 비교 괄호 보존

- 영향 대상: 괄호가 그룹화나 파싱에 영향을 주는 중첩 비교가 포함된 정책

`opa fmt`가 이러한 비교를 포맷할 때 괄호를 제거해 정책의 의미가 바뀌거나 컴파일에 실패할 수 있었습니다. 경우에 따라 결과가 `true`에서 `false`로 조용히 바뀌기도 했습니다. 이제 포맷 과정에서 필요한 괄호를 유지하므로 포맷된 정책은 원본과 같은 결과를 냅니다.

> - format: Preserve nested comparison grouping ([#9407](https://github.com/open-policy-agent/opa/issues/9407)) authored by @rudraa2005, reported by @alecthomas

### Wasm `with` 업서트의 객체가 아닌 값 대체 동작

- 영향 대상: 객체가 아닌 값을 업서트하는 `with` 표현식의 Wasm 평가 (추정)

입력이 `123`일 때 Wasm 평가에서는 `input.foo with input.foo as input`이 `undefined`를 반환했지만, Rego 평가에서는 `123`을 반환했습니다.

> - wasm: Replace non-object values when upserting for with ([#6304](https://github.com/open-policy-agent/opa/issues/6304)) authored by @sspaink, reported by @srenatus

### OPA 고정밀 십진수 비교 수정

- 영향 대상: `float64` 정밀도를 넘어서는 값을 포함한 십진수 비교 (추정)

유효 숫자가 15자리를 넘고 끝에 0이 붙은 서로 다른 십진수가 같은 `float64` 값으로 반올림될 수 있었습니다. 이로 인해 두 값이 같은 것으로 비교되고 순서 관계가 추이성을 만족하지 않을 수 있었습니다. 이제 값과 순서를 정확하게 비교합니다.

> - ast: Compare numbers beyond float64 precision exactly ([#9508](https://github.com/open-policy-agent/opa/pull/9508)) authored by @srenatus

### [드러나지 않던 결함] Rego v2의 인덱싱된 set 리터럴에서 `not` 파싱 수정

- 영향 대상: Rego v2에서 인덱싱된 set 리터럴과 함께 `not`을 사용하는 정책

이전에는 `not {"foo"}["bar"]`가 쿼리와 규칙 본문에서 서로 다른 결과를 내거나 파싱 오류를 일으킬 수 있었습니다. Rego v2에서는 이 구문을 set 리터럴에 대한 참조로 파싱합니다.

> - ast: Parse not {..}[..] as a ref on a set literal under v2 ([#9540](https://github.com/open-policy-agent/opa/issues/9540)) authored by @sspaink, reported by @anderseknert

### [드러나지 않던 결함] 음수 분수에 대한 `ceil` 및 `floor` 결과 수정

- 영향 대상: -1과 0 사이의 음수 분수에 `ceil` 또는 `floor`를 호출하는 정책이나 쿼리

이전에는 `ceil(-0.5)`가 0이 아닌 1을 반환했고, `floor(-0.5)`는 -1이 아닌 0을 반환했습니다. 이제 각각 0과 -1을 반환합니다.

> - topdown: Fix ceil and floor of negative fractions above -1 ([#9562](https://github.com/open-policy-agent/opa/issues/9562)) reported by @kroekle

### 플러그인 매니저가 교체된 Wasm 리졸버를 닫도록 수정

- 영향 대상: 번들 업데이트로 Wasm 리졸버를 교체하는 플러그인 매니저 사용 환경

이 변경 전에는 교체된 리졸버를 닫지 않아 사용할수록 메모리 사용량이 증가했습니다. 번들을 업데이트하면 새 리졸버 집합에 유지되는 리졸버를 제외하고 기존 리졸버를 닫습니다.

> - plugins: Close the Wasm resolvers a bundle update replaces ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### `Rego.Eval` 평가 후 Wasm 엔진 종료

- 영향 대상: Go API에서 Wasm 타깃을 사용하는 `Rego.Eval`

이전에는 평가 중 생성된 엔진을 닫지 않아 사용할수록 메모리가 늘었습니다.

> - rego: Close the Wasm engine after Rego.Eval ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### 준비된 쿼리에서 로드된 Wasm 리소스 닫기

- 영향 대상: Wasm을 사용하는 준비된 평가 쿼리를 사용하는 Go 통합 (추정)

준비된 쿼리에서 Wasm 리졸버를 로드한 뒤 열린 상태로 두면 사용할수록 메모리 사용량이 늘었습니다. 이제 준비된 쿼리를 닫으면 Wasm 엔진도 함께 닫힙니다.

> - rego: Close the Wasm resolvers a prepared query loaded ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### `opa test`에 엄격한 내장 함수 오류 보고 추가

- 영향 대상: `--strict-builtin-errors`를 사용해 실행하는 `opa test` (추정)

내장 함수 오류가 발생한 테스트는 문서에 명시된 결과가 `ERROR`였지만 일반 실패로 보고되었습니다.

> - tester: Add --strict-builtin-errors to opa test ([#6816](https://github.com/open-policy-agent/opa/issues/6816)) authored by @oleksii-udovychenko, reported by @selaux

### `opa test` 평가 후 Wasm 엔진 종료

- 영향 대상: Wasm 타깃을 사용하는 `opa test` 실행

이전에는 테스트에서 생성한 Wasm 엔진을 닫지 않아, 사용할수록 메모리 사용량이 증가했습니다.

> - tester: Close the Wasm engine after each test ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### `opa test` 벤치마크에 추가된 Wasm 엔진 정리

- 영향 대상: Wasm 타깃을 사용하는 `opa test` 벤치마크

이전에는 엔진이 열린 상태로 남아 사용량이 늘수록 메모리가 증가했습니다. 이제 벤치마크 실행기는 준비된 쿼리와 Wasm 엔진을 닫는 작업을 지연 실행합니다.

> - tester: Close the Wasm engine of a benchmark ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros

### Wasm 리졸버의 `result` 키 누락 패닉 수정

- 영향 대상: Wasm 리졸버 설정

키가 정확히 하나인 결과 오브젝트를 받았는데 그 키 이름이 `result`가 아니면, 리졸버는 형태 검사를 통과한 뒤 누락된 키를 읽으려다 패닉이 발생했습니다. 이제 잘못된 결과에 사용되는 `illegal result type` 오류를 반환합니다.

> - wasm: Return an error when the result has no "result" key ([#9541](https://github.com/open-policy-agent/opa/pull/9541)) authored by @jbpros

### OPA 타입 검사기에서 빈 컬렉션 순회 다시 허용

- 영향 대상: 빈 배열 또는 객체 리터럴을 직접 순회하거나 변수를 통해 순회하는 정책

v1.21.0부터 v1.22.1까지는 이러한 정책이 타입 오류로 거부됐지만, v1.20.2 및 이전 버전에서는 컴파일되고 평가됐습니다. 이제 타입 검사를 통과하고 평가되지만, 빈 컬렉션에서는 결과가 나오지 않습니다.

> - ast: Allow iterating empty collections in the type checker ([#9517](https://github.com/open-policy-agent/opa/issues/9517)) authored by @sspaink, reported by @kholia

### 위치 정보 없이 파싱한 모듈의 메타데이터 처리 수정

- 영향 대상: `ParserOptions.SkipLocations`로 파싱한 모듈

위치 정보를 건너뛰면 컴파일러는 메타데이터 블록과 규칙 어노테이션을 문장에 연결할 때 행 번호에 의존했지만, 이 경우 행 번호를 사용할 수 없었습니다. 이제 컴파일러가 위치 정보 없이도 메타데이터를 처리합니다. 원래 위치를 복원할 수 없으므로 포매팅과 `opa build`에서는 주석을 생략합니다.

> - ast: Parse modules without locations ([#9485](https://github.com/open-policy-agent/opa/pull/9485)) authored by @srenatus

### 번들 리더 모듈 파싱 동시성을 `GOMAXPROCS`로 제한

- 영향 대상: OPA의 번들 리더로 번들을 읽는 설정 (추정)

여러 모듈이 포함된 번들을 읽을 때 이전에는 모듈마다 고루틴을 하나씩 시작했습니다. 동시에 진행할 수 있는 모듈은 `GOMAXPROCS`개뿐인데도 거의 모든 모듈의 할당 메모리가 계속 유지될 수 있었습니다. `ReadManyModules-16` 벤치마크에서는 피크 힙 사용량이 3.98% 감소했고, `sec/op`에는 측정된 변화가 없었습니다.

> - bundle: Parse at most GOMAXPROCS modules at once ([#9484](https://github.com/open-policy-agent/opa/pull/9484)) authored by @srenatus

## 기능·개선 (14)

- Compile API의 Solr용 Lucene 쿼리 추가 (사용 조건: 요청 시 `Accept: application/vnd.opa.lucene.solr+json`으로 타깃 지정; 멀티타깃 요청에서 다른 타깃과 함께 사용 불가)
- 새 `json.pointer_escape` 내장 함수
- Compile API의 Solr Lucene 쿼리 생성 (사용 조건: `Accept: application/vnd.opa.lucene.solr+json`으로 Compile API 요청)
- 소스 위치가 없는 생성된 번들 정책 파싱 (사용 조건: 번들 매니페스트에서 `generated`를 `true`로 설정)
- 더 다양한 정책 형태에서 후보를 좁히는 규칙 인덱스
- JSON Pointer 토큰용 `json.pointer_escape` 추가
- 생성된 번들의 증분 활성화 (사용 조건: 번들 매니페스트에서 `"generated": true`로 해당 번들이 생성된 번들임을 표시해야 합니다.)
- OPA REPL의 암묵적 함수 본문 형식 지원
- `with`를 적용한 빈 컬렉션 규칙의 상수 키 참조
- 서로 겹치지 않는 참조 헤드에서 다른 종류의 규칙 컴파일
- AST JSON 언마샬링에서 `every` 표현식 지원
- AST JSON 언마샬링에서 `some` 선언 지원
- 소스 위치 없이 파싱되는 생성된 번들 정책 (사용 조건: 번들 매니페스트에서 정책을 `generated: true`로 표시)
- `types.Unmarshal`에서 `of` 없는 set 타입 지원

## 의존성 갱신 (21)

그 외 21건 · 보안 언급 없음

- `- build(go): Bump to 1.27.4 ([#9543](https://github.com/open-policy-agent/opa/pull/9543)) authored by @srenatus`
- `- build(deps): Bump github.com/agnivade/levenshtein from 1.2.1 to 1.2.2`
- `- build(deps): Bump github.com/foxcpp/go-mockdns from 1.2.0 to 1.3.0`
- `- build(deps): Bump github.com/gobwas/glob from 1.0.0 to 1.1.0`
- `- build(deps): Bump github.com/huandu/go-sqlbuilder from 1.43.0 to 1.44.1`
- `- build(deps): Bump github.com/klauspost/compress from 1.20.0 to 1.20.4`
- `- build(deps): Bump github.com/lestrrat-go/jwx/v3 from 3.3.0 to 3.4.0`
- `- build(deps): Bump github.com/prometheus/client_golang from 1.24.1 to 1.25.0`
- `- build(deps): Bump github.com/sergi/go-diff from 1.4.0 to 1.4.5`
- `- build(deps): Bump github.com/spf13/pflag from 1.0.10 to 1.1.0`
- `- build(deps): Bump github.com/vektah/gqlparser/v2 from 2.5.58 to 2.5.64`
- `- build(deps): bump go.opentelemetry.io deps from 1.46.0/0.71.0 to 1.47.0/0.72.0`
- `- build(deps): Bump go.opentelemetry.io/proto/otlp from 1.11.0 to 1.11.1`
- `- build(deps): Bump go.yaml.in/yaml/v3 from 3.0.5 to 3.0.6`
- `- build(deps): Bump golang.org/x/sync from 0.23.0 to 0.25.0`
- `- build(deps): Bump golang.org/x/term from 0.46.0 to 0.48.0`
- `- build(deps): Bump golang.org/x/text from 0.42.0 to 0.44.0`
- `- build(deps): Bump golang.org/x/net from v0.60.0 to v0.62.0 ([#9555](https://github.com/open-policy-agent/opa/pull/9555)) authored by @anderseknert`
- `- build(deps): Bump google.golang.org/grpc from 1.84.0 to 1.85.0`
- `- build(deps): Bump gopkg.in/ini.v1 from 1.67.3 to 1.68.0`
- `- build(deps): Bump oras.land/oras-go/v2 from 2.6.2 to 2.7.0`

## 기타 (49)

- 룰 인덱스의 후보 축소 대상 문장 확대
- 기본 데이터 컬렉션 조회에서 스토어 데이터 변환 반복 방지
- 번들 매니페스트 인식을 루트의 `.manifest` 파일로 제한
- 기본 데이터 컬렉션 조회에서 반복되는 데이터 변환 제거
- 인덱스 조건별 인덱스 사용·미사용 평가 비교 테스트
- 부분 평가에서 인덱스 기반 규칙 후보 검사
- 불필요한 규칙·컴프리헨션 인덱스를 `opa build`에서 생략
- `rego-target` 빌드 후 checking compiler 해제
- 콘솔 의사결정 로거의 JSON 형태 값 네이티브 복사
- 로그 플러그인이 요청 경로에서 크기 초과 청크를 디코딩하지 않도록 개선
- 기본 타깃의 `Close` 테스트 제거
- 컨텍스트 타임아웃 테스트에서 Wasm 컴파일 시간 제외
- 키 이름이 `result`가 아닌 Wasm resolver 결과 테스트 추가
- 메모리 내 `NonEmpty` 충돌 검사 속도 개선
- 닫힌 쿼리 평가 오류 테스트 커버리지
- 파서 term-cache 항목의 메모리 할당 감소
- 컴파일러 타입 트리, 필요할 때 자식 노드 할당
- Rego 컴파일러 작업량 및 메모리 할당 감소
- 캐시 적중 시 `lazyObj.Find` 성능 회귀 수정
- base-data 인덱스 조회 시 lazy-object 변환 방지
- OPA AST `Head` 구조체 크기 96바이트로 축소
- 템플릿 문자열 파서의 오류 중복 보고 방지
- 컴파일 규칙 재사용 제안 및 관련 API 제거
- 오류에 정적 배열의 범위를 벗어난 인덱스 표시
- 토큰별 `ScanOptions` 생성 방지
- 그래프 정렬 성공 후 규칙별 재귀 탐색 생략
- 참조 해석 중 중복 rule-global 매핑 추가 생략
- 내장 타입 환경의 함수별 `Ref` 할당 방지
- 컴파일러 재작성에서 표현식 복사 방지
- `every` 및 `evalTree` 평가의 메모리 할당 감소
- OPA 평가 호출 피연산자 풀링
- OPA 평가 풀링 및 충돌 검사 최적화
- OPA 충돌 검사에서 네임스페이스가 적용된 terms 사용
- OPA 풀링된 오브젝트 키 이터레이터 추가
- 취소 인식형 싱크 라이터의 성능 및 풀링 개선
- 할당 없이 빈 결과를 반환하는 `array.slice`
- OPA `walk` 경로 구성 시 메모리 할당 감소
- 빈 입력 및 정의되지 않은 입력에 대한 컴플라이언스 테스트 추가
- `replace` 및 `replace_n`의 메모리 할당 감소
- `regex.template_match`에서 미사용 정규식 컴파일 방지
- 추가 코퍼스 사례
- 서로 다른 타입 값의 순서 비교 테스트
- 작은 타임스탬프를 사용하는 시간 함수 테스트 커버리지
- 컴프리헨션 캐시 자식의 지연 할당
- 부분 오브젝트 충돌 검사 시간 복잡도 선형화
- 오래된 `sync.Pool` 주석 제거
- 베어 텀에 대한 풀링된 스텝 컨티뉴에이션 재사용
- `replace` 테스트의 YAML 케이스 사용
- 파일 생성 실패 후 `MakeTempFS` 정리

---

정리 내용은 AI가 작성하므로 틀릴 수 있으며, 보증 없이 제공합니다.
