Skip to content

Commit e5d4af7

Browse files
authored
Merge branch 'main' into token_eddsa
2 parents ade66c6 + 5ac3104 commit e5d4af7

File tree

18 files changed

+161
-84
lines changed

18 files changed

+161
-84
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
# Initializes the CodeQL tools for scanning.
5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
52+
uses: github/codeql-action/init@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.8
5353
with:
5454
languages: ${{ matrix.language }}
5555
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -65,4 +65,4 @@ jobs:
6565
make build
6666
6767
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
68+
uses: github/codeql-action/analyze@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.8

.github/workflows/nightly.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
# Equivalent to:
9494
# $ trivy image openpolicyagent/opa:edge-static
9595
- name: Run Trivy scan on image
96-
uses: aquasecurity/trivy-action@76071ef0d7ec797419534a183b498b4d6366cf37 # 0.31.0
96+
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # 0.32.0
9797
with:
9898
image-ref: 'openpolicyagent/opa:edge-static'
9999
format: table
@@ -123,7 +123,7 @@ jobs:
123123
# Equivalent to:
124124
# $ trivy fs .
125125
- name: Run Trivy scan on repo
126-
uses: aquasecurity/trivy-action@76071ef0d7ec797419534a183b498b4d6366cf37 # 0.31.0
126+
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # 0.32.0
127127
with:
128128
scan-type: fs
129129
format: table

.github/workflows/post-merge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168
timeout-minutes: 60
169169

170170
- name: Download release binaries
171-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
171+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
172172
with:
173173
pattern: binaries-*
174174
merge-multiple: true

.github/workflows/post-tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
109109

110110
- name: Download release binaries
111-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
111+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
112112
with:
113113
pattern: binaries-*
114114
merge-multiple: true

.github/workflows/pull-request.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
if: matrix.os == 'darwin'
174174

175175
- name: Download generated artifacts
176-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
176+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
177177
with:
178178
name: generated
179179

@@ -224,7 +224,7 @@ jobs:
224224
go-version: ${{ steps.go_version.outputs.go_version }}
225225

226226
- name: Download generated artifacts
227-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
227+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
228228
with:
229229
name: generated
230230

@@ -270,7 +270,7 @@ jobs:
270270
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
271271

272272
- name: Download generated artifacts
273-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
273+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
274274
with:
275275
name: generated
276276

@@ -294,7 +294,7 @@ jobs:
294294
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
295295

296296
- name: Download generated artifacts
297-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
297+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
298298
with:
299299
name: generated
300300

@@ -314,7 +314,7 @@ jobs:
314314
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
315315

316316
- name: Download generated artifacts
317-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
317+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
318318
with:
319319
name: generated
320320

@@ -338,7 +338,7 @@ jobs:
338338
platforms: arm64
339339

340340
- name: Download release binaries
341-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
341+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
342342
with:
343343
pattern: binaries-*
344344
merge-multiple: true
@@ -388,7 +388,7 @@ jobs:
388388
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
389389

390390
- name: Download release binaries
391-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
391+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
392392
with:
393393
name: binaries-${{ matrix.os }}-${{ matrix.arch }}
394394
path: _release
@@ -413,7 +413,7 @@ jobs:
413413
steps:
414414
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
415415
- name: Download generated artifacts
416-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
416+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
417417
with:
418418
name: generated
419419
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ jobs:
6464
# Upload the results to GitHub's code scanning dashboard (optional).
6565
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
6666
- name: "Upload to code-scanning"
67-
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
67+
uses: github/codeql-action/upload-sarif@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.8
6868
with:
6969
sarif_file: results.sarif

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.24.4
1+
1.24.6

cmd/exec_test.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"errors"
88
"fmt"
99
"maps"
10+
"net/http"
1011
"os"
1112
"path/filepath"
1213
"regexp"
@@ -1460,13 +1461,14 @@ func TestExecWithInvalidInputOptions(t *testing.T) {
14601461

14611462
func TestExecTimeoutWithMalformedRemoteBundle(t *testing.T) {
14621463
test.WithTempFS(map[string]string{}, func(dir string) {
1464+
bundlePath := "/bundles/bundle.tar.gz"
14631465
// Note(philipc): We add the "raw bundles" flag so that we can stuff a
14641466
// malformed bundle into the mock bundle server. Otherwise, the server
14651467
// will just return 503 errors forever, because it won't be able to
14661468
// build the bundle on its end.
14671469
s := sdk_test.MustNewServer(
14681470
sdk_test.RawBundles(true),
1469-
sdk_test.MockBundle("/bundles/bundle.tar.gz", map[string]string{
1471+
sdk_test.MockBundle(bundlePath, map[string]string{
14701472
"example.rego": `
14711473
package example
14721474
@@ -1476,12 +1478,22 @@ func TestExecTimeoutWithMalformedRemoteBundle(t *testing.T) {
14761478

14771479
defer s.Stop()
14781480

1481+
// Wait for the bundle server to be ready before running exec
1482+
bundleURL := s.URL() + bundlePath
1483+
test.EventuallyOrFatal(t, 1*time.Second, func() bool {
1484+
resp, err := http.Get(bundleURL)
1485+
if resp != nil {
1486+
defer resp.Body.Close()
1487+
}
1488+
return err == nil && resp.StatusCode == 200
1489+
})
1490+
14791491
var buf bytes.Buffer
14801492
params := exec.NewParams(&buf)
14811493
_ = params.OutputFormat.Set("json")
14821494
params.ConfigOverrides = []string{
14831495
"services.test.url=" + s.URL(),
1484-
"bundles.test.resource=/bundles/bundle.tar.gz",
1496+
"bundles.test.resource=" + bundlePath,
14851497
}
14861498

14871499
// Note(philipc): We can set this timeout almost arbitrarily high or

docs/docs/policy-language.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,12 @@ apps_not_in_prod contains name if {
13221322

13231323
<RunSnippet files="#example_data.rego" command="data.negation.apps_not_in_prod"/>
13241324

1325+
:::info
1326+
Logical OR/AND in Rego is structured differently from other languages you might
1327+
be familiar with. See the notes here on [Logical OR](../docs/#logical-or) or
1328+
here for [Logical AND](../docs/#basic-syntax) for more details.
1329+
:::
1330+
13251331
## Universal Quantification (FOR ALL)
13261332

13271333
Rego allows for several ways to express universal quantification.
@@ -2454,19 +2460,19 @@ comment block containing the YAML document is finished
24542460

24552461
### Annotations
24562462

2457-
| Name | Type | Description |
2458-
| ----------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
2459-
| scope | string; one of `package`, `rule`, `document`, `subpackages` | The scope for which the metadata applies. Read more [here](./#scope). |
2460-
| title | string | A human-readable name for the annotation target. Read more [here](#title). |
2461-
| description | string | A description of the annotation target. Read more [here](#description). |
2462-
| related_resources | list of URLs | A list of URLs pointing to related resources/documentation. Read more [here](#related-resources). |
2463-
| authors | list of strings | A list of authors for the annotation target. Read more [here](#authors). |
2464-
| organizations | list of strings | A list of organizations related to the annotation target. Read more [here](#organizations). |
2465-
| schemas | list of object | A list of associations between value paths and schema definitions. Read more [here](#schemas). |
2466-
| entrypoint | boolean | Whether or not the annotation target is to be used as a policy entrypoint. Read more [here](#entrypoint). |
2467-
| custom | mapping of arbitrary data | A custom mapping of named parameters holding arbitrary data. Read more [here](#custom). |
2468-
2469-
### Scope
2463+
| Name | Type | Description |
2464+
| ----------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
2465+
| scope | string; one of `package`, `rule`, `document`, `subpackages` | The scope for which the metadata applies. Read more [here](#metadata-scope). |
2466+
| title | string | A human-readable name for the annotation target. Read more [here](#metadata-title). |
2467+
| description | string | A description of the annotation target. Read more [here](#metadata-description). |
2468+
| related_resources | list of URLs | A list of URLs pointing to related resources/documentation. Read more [here](#metadata-related_resources). |
2469+
| authors | list of strings | A list of authors for the annotation target. Read more [here](#metadata-authors). |
2470+
| organizations | list of strings | A list of organizations related to the annotation target. Read more [here](#metadata-organizations). |
2471+
| schemas | list of object | A list of associations between value paths and schema definitions. Read more [here](#metadata-schemas). |
2472+
| entrypoint | boolean | Whether or not the annotation target is to be used as a policy entrypoint. Read more [here](#metadata-entrypoint). |
2473+
| custom | mapping of arbitrary data | A custom mapping of named parameters holding arbitrary data. Read more [here](#metadata-custom). |
2474+
2475+
### Metadata `Scope`
24702476

24712477
Annotations can be defined at the rule or package level. The `scope` annotation in
24722478
a metadata block determines how that metadata block will be applied. If the

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/open-policy-agent/opa
22

3-
go 1.23.8
3+
go 1.23.12
44

5-
toolchain go1.24.3
5+
toolchain go1.24.6
66

77
require (
88
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2

0 commit comments

Comments
 (0)