From c7231bdd0b371328fc0a69857cc5c19df5586fe3 Mon Sep 17 00:00:00 2001 From: Charlie Egan Date: Fri, 17 Jul 2026 15:04:19 +0100 Subject: [PATCH] docs: Update regal and blog links (#8901) Updates to latest regal release and makes some changes to blog.openpolicyagent.org links too. --------- Signed-off-by: Charlie Egan --- docs/projects/regal/architecture.md | 10 +++++---- docs/projects/regal/index.md | 9 ++++---- docs/projects/regal/language-server.md | 21 ++++++++++++++++--- docs/projects/regal/pre-commit-hooks.md | 4 ++-- .../regal/rules/bugs/deprecated-builtin.md | 2 +- .../regal/rules/custom/disallow-rego-v1.md | 2 +- .../regal/rules/custom/one-liner-rule.md | 3 +++ .../idiomatic/prefer-set-or-object-rule.md | 3 ++- .../rules/imports/implicit-future-keywords.md | 2 +- .../rules/imports/import-shadows-import.md | 2 +- .../rules/performance/non-loop-expression.md | 2 +- .../regal/rules/style/double-negative.md | 1 + .../regal/rules/style/todo-comment.md | 2 +- .../rules/testing/metasyntactic-variable.md | 6 +++--- .../ecosystem/entries/envoy-authorization.md | 2 +- .../kubernetes-validating-admission.md | 2 +- .../data/ecosystem/entries/opa-playground.md | 4 ++-- .../ecosystem/entries/sql-datafiltering.md | 2 +- docs/src/data/ecosystem/entries/swift-opa.md | 2 +- .../data/surveys/events/2021/metadata.json | 2 +- .../data/surveys/events/2022/metadata.json | 2 +- 21 files changed, 53 insertions(+), 32 deletions(-) diff --git a/docs/projects/regal/architecture.md b/docs/projects/regal/architecture.md index d5d95261b8..6bad999901 100644 --- a/docs/projects/regal/architecture.md +++ b/docs/projects/regal/architecture.md @@ -11,9 +11,10 @@ sidebar_label: Architecture Or "How does Regal work?" -As you might have [read](https://web.archive.org/web/https://www.styra.com/blog/guarding-the-guardrails-introducing-regal-the-rego-linter/), Regal -[uses Rego for linting Rego](https://web.archive.org/web/https://www.styra.com/blog/linting-rego-with-rego/) — or rather, Rego policies turned into -a JSON representation of their abstract syntax tree (AST). +As you might have +[read](https://web.archive.org/web/https://www.styra.com/blog/guarding-the-guardrails-introducing-regal-the-rego-linter/), +Regal [uses Rego for linting Rego](https://web.archive.org/web/https://www.styra.com/blog/linting-rego-with-rego/) — or rather, +Rego policies turned into a JSON representation of their abstract syntax tree (AST). ## High-level Overview @@ -45,7 +46,8 @@ The main entrypoint for Rego rule evaluation is unsurprisingly found in rule from the [Go](https://github.com/open-policy-agent/regal/blob/main/pkg/linter/linter.go) application. The `report` rule in turn uses -[dynamic policy composition](https://web.archive.org/web/https://www.styra.com/blog/dynamic-policy-composition-for-opa/) to query all rules named +[dynamic policy composition](https://web.archive.org/web/https://www.styra.com/blog/dynamic-policy-composition-for-opa/) +to query all rules named `report` under `data.regal.rules[category][title]` for built-in rules, and `data.custom.regal.rules[category][title]` for custom rules. The violations reported from each rule is added to the `report` set and sent back to the application, which will compile a final report and present it to the user. diff --git a/docs/projects/regal/index.md b/docs/projects/regal/index.md index e264f55777..85afc50c29 100644 --- a/docs/projects/regal/index.md +++ b/docs/projects/regal/index.md @@ -286,11 +286,10 @@ Documentation: https://www.openpolicyagent.org/projects/regal/rules/style/prefer
-:::note -If you're running Regal on an existing policy library, you may want to disable the `style` category initially, as it -will likely generate a lot of violations. You can do this by passing the `--disable-category style` flag to -`regal lint`. -::: +> **Note** +> If you're running Regal on an existing policy library, you may want to disable the `style` category initially, as it +> will likely generate a lot of violations. You can do this by passing the `--disable-category style` flag to +> `regal lint`. ### Using Regal in Your Editor diff --git a/docs/projects/regal/language-server.md b/docs/projects/regal/language-server.md index 79dce5fec4..d4550ea835 100644 --- a/docs/projects/regal/language-server.md +++ b/docs/projects/regal/language-server.md @@ -142,9 +142,24 @@ be suggestions for: src={require('./assets/lsp/completion.png').default} alt="Screenshot of completion suggestions as displayed in Zed"/> -New completion providers are added continuously, so if you have a suggestion for -a new completion, please -[open an issue](https://github.com/open-policy-agent/regal/issues)! +New completion providers are added continuously, so if you have a suggestion for a new completion, please +[file an issue](https://github.com/open-policy-agent/regal/issues)! + +#### Editor support + +VS Code currently prevents (or severely limits) displaying suggestions from language servers like Regal whenever +GitHub Copilot's "ghost text suggestions" feature is enabled. Since this feature is typically enabled — possibly even by +default, many users risk missing out on code completions provided by language servers without even realizing it. Whether +overriding language server suggestions is intentional or not is currently unclear, as +[the issue](https://github.com/microsoft/vscode/issues/315257) has been reported but not yet addressed by the VS Code +maintainers. + +While AI-assisted suggestions occasionally can be helpful, they aren't based on the same deep understanding of the +language or the context as those provided by language servers. Unless you heavily rely on GitHub Copilot's suggestions, +**we recommend disabling the "ghost text suggestions" feature as long as Copilot is overriding language server +suggestions**. + +The toggle is easily accessible from the UI, so you can even turn it on and off as needed. ### Code actions diff --git a/docs/projects/regal/pre-commit-hooks.md b/docs/projects/regal/pre-commit-hooks.md index ee7e4e31a8..d80022dfc1 100644 --- a/docs/projects/regal/pre-commit-hooks.md +++ b/docs/projects/regal/pre-commit-hooks.md @@ -48,7 +48,7 @@ Runs Regal against all staged `.rego` files, aborting the commit if any fail. Runs Regal against all staged `.rego` files, aborting the commit if any fail. -- Downloads the latest `regal` binary from GitHub. +- Downloads the latest `regal` binary from Github. ### `regal-fix` @@ -77,4 +77,4 @@ Same as `regal-fix`, but uses the `regal` binary already on `$PATH`. Same as `regal-fix`, but downloads the latest `regal` binary from GitHub instead of building or relying on `$PATH`. -- Downloads the latest `regal` binary from GitHub. +- Downloads the latest `regal` binary from Github. diff --git a/docs/projects/regal/rules/bugs/deprecated-builtin.md b/docs/projects/regal/rules/bugs/deprecated-builtin.md index 981d6e08d2..6298c80d8b 100644 --- a/docs/projects/regal/rules/bugs/deprecated-builtin.md +++ b/docs/projects/regal/rules/bugs/deprecated-builtin.md @@ -1,6 +1,6 @@ # deprecated-builtin -**Summary**: Deprecated built-in function +**Summary**: Avoid using deprecated built-in functions **Category**: Bugs diff --git a/docs/projects/regal/rules/custom/disallow-rego-v1.md b/docs/projects/regal/rules/custom/disallow-rego-v1.md index 0834df66ab..49572f8054 100644 --- a/docs/projects/regal/rules/custom/disallow-rego-v1.md +++ b/docs/projects/regal/rules/custom/disallow-rego-v1.md @@ -1,6 +1,6 @@ # disallow-rego-v1 -**Summary**: Use of disallowed `import rego v1` +**Summary**: Use of disallowed `import rego.v1` **Category**: Custom diff --git a/docs/projects/regal/rules/custom/one-liner-rule.md b/docs/projects/regal/rules/custom/one-liner-rule.md index d007d767d7..0db8a01573 100644 --- a/docs/projects/regal/rules/custom/one-liner-rule.md +++ b/docs/projects/regal/rules/custom/one-liner-rule.md @@ -47,6 +47,9 @@ rules: # # one of "error", "warning", "ignore" level: error + # maximum line length for a rule to be suggested as a one-liner + # default: 120 + max-line-length: 120 ``` ## Related Resources diff --git a/docs/projects/regal/rules/idiomatic/prefer-set-or-object-rule.md b/docs/projects/regal/rules/idiomatic/prefer-set-or-object-rule.md index b0a1a5a109..8c64a39260 100644 --- a/docs/projects/regal/rules/idiomatic/prefer-set-or-object-rule.md +++ b/docs/projects/regal/rules/idiomatic/prefer-set-or-object-rule.md @@ -44,7 +44,8 @@ user_roles_mapping[user] := roles if { ## Rationale -Comprehensions are [awesome](https://web.archive.org/web/https://www.styra.com/blog/five-things-you-didnt-know-about-opa/), and should be part of +Comprehensions are [awesome](https://web.archive.org/web/https://www.styra.com/blog/five-things-you-didnt-know-about-opa/), +and should be part of any policy author's toolbox. Using comprehensions inside of rule bodies allow for a wide variety of elegant solutions to otherwise hard problems. However, when used as the value directly (and unconditionally) assigned to a rule, it is almost always better to use a rule that generates a set or object in the rule body rather than having a comprehension do so in diff --git a/docs/projects/regal/rules/imports/implicit-future-keywords.md b/docs/projects/regal/rules/imports/implicit-future-keywords.md index b823d21951..073dc81214 100644 --- a/docs/projects/regal/rules/imports/implicit-future-keywords.md +++ b/docs/projects/regal/rules/imports/implicit-future-keywords.md @@ -1,6 +1,6 @@ # implicit-future-keywords -**Summary**: Implicit future keywords +**Summary**: Avoid implicit future keyword imports **Category**: Imports diff --git a/docs/projects/regal/rules/imports/import-shadows-import.md b/docs/projects/regal/rules/imports/import-shadows-import.md index 9eedd1fae6..db15b255f2 100644 --- a/docs/projects/regal/rules/imports/import-shadows-import.md +++ b/docs/projects/regal/rules/imports/import-shadows-import.md @@ -1,6 +1,6 @@ # import-shadows-import -**Summary**: Import shadows import +**Summary**: Import shadows another import **Category**: Imports diff --git a/docs/projects/regal/rules/performance/non-loop-expression.md b/docs/projects/regal/rules/performance/non-loop-expression.md index 5fa4bae473..3d0df742df 100644 --- a/docs/projects/regal/rules/performance/non-loop-expression.md +++ b/docs/projects/regal/rules/performance/non-loop-expression.md @@ -1,6 +1,6 @@ # non-loop-expression -**Summary**: Non loop expression in loop +**Summary**: Non-loop expression in loop **Category**: Performance diff --git a/docs/projects/regal/rules/style/double-negative.md b/docs/projects/regal/rules/style/double-negative.md index 05bc3024af..9eda507b9f 100644 --- a/docs/projects/regal/rules/style/double-negative.md +++ b/docs/projects/regal/rules/style/double-negative.md @@ -39,6 +39,7 @@ considered OK, and the `double-negative` rule is limited to check for a limited - `not no_` - `not non_` - `not not_`, +- `not without_` ## Configuration Options diff --git a/docs/projects/regal/rules/style/todo-comment.md b/docs/projects/regal/rules/style/todo-comment.md index 37c4e92f5d..477a5fe382 100644 --- a/docs/projects/regal/rules/style/todo-comment.md +++ b/docs/projects/regal/rules/style/todo-comment.md @@ -1,6 +1,6 @@ # todo-comment -**Summary**: Avoid TODO Comments +**Summary**: Avoid TODO and FIXME comments **Category**: Style diff --git a/docs/projects/regal/rules/testing/metasyntactic-variable.md b/docs/projects/regal/rules/testing/metasyntactic-variable.md index 2df2c39bbd..0391e570c4 100644 --- a/docs/projects/regal/rules/testing/metasyntactic-variable.md +++ b/docs/projects/regal/rules/testing/metasyntactic-variable.md @@ -8,8 +8,8 @@ ```rego package policy -# Using metasyntactic names -foo := ["bar", "baz"] +# Using metasyntactic name +foo := ["developer", "admin"] # ... ``` @@ -18,7 +18,7 @@ foo := ["bar", "baz"] ```rego package policy -# Using names relevant to the context +# Using name relevant to the context roles := ["developer", "admin"] # ... diff --git a/docs/src/data/ecosystem/entries/envoy-authorization.md b/docs/src/data/ecosystem/entries/envoy-authorization.md index a040bc7ba3..2ced9e902b 100644 --- a/docs/src/data/ecosystem/entries/envoy-authorization.md +++ b/docs/src/data/ecosystem/entries/envoy-authorization.md @@ -15,7 +15,7 @@ code: inventors: - styra blogs: -- https://blog.openpolicyagent.org/envoy-external-authorization-with-opa-578213ed567c +- https://openpolicyagent.org/blog/envoy-external-authorization-with-opa-578213ed567c videos: - title: 'OPA at Scale: How Pinterest Manages Policy Distribution' speakers: diff --git a/docs/src/data/ecosystem/entries/kubernetes-validating-admission.md b/docs/src/data/ecosystem/entries/kubernetes-validating-admission.md index bb804cbdca..2516cf59e8 100644 --- a/docs/src/data/ecosystem/entries/kubernetes-validating-admission.md +++ b/docs/src/data/ecosystem/entries/kubernetes-validating-admission.md @@ -78,7 +78,7 @@ videos: blogs: - https://medium.com/@sbueringer/kubernetes-authorization-via-open-policy-agent-a9455d9d5ceb - https://medium.com/@jimmy.ray/policy-enabled-kubernetes-with-open-policy-agent-3b612b3f0203 -- https://blog.openpolicyagent.org/securing-the-kubernetes-api-with-open-policy-agent-ce93af0552c3 +- https://openpolicyagent.org/blog/securing-the-kubernetes-api-with-open-policy-agent-ce93af0552c3 - https://itnext.io/kubernetes-authorization-via-open-policy-agent-a9455d9d5ceb - https://medium.com/capital-one-tech/policy-enabled-kubernetes-with-open-policy-agent-3b612b3f0203 - https://www.redhat.com/en/blog/fine-grained-policy-enforcement-in-openshift-with-open-policy-agent diff --git a/docs/src/data/ecosystem/entries/opa-playground.md b/docs/src/data/ecosystem/entries/opa-playground.md index 87aa789420..293134d74f 100644 --- a/docs/src/data/ecosystem/entries/opa-playground.md +++ b/docs/src/data/ecosystem/entries/opa-playground.md @@ -10,8 +10,8 @@ labels: code: - https://play.openpolicyagent.org/ blogs: -- https://blog.openpolicyagent.org/the-rego-playground-977566855cec -- https://blog.openpolicyagent.org/rego-playground-new-features-ec0345a73b9e +- https://openpolicyagent.org/blog/the-rego-playground-977566855cec +- https://openpolicyagent.org/blog/rego-playground-new-features-ec0345a73b9e docs_features: learning-rego: note: | diff --git a/docs/src/data/ecosystem/entries/sql-datafiltering.md b/docs/src/data/ecosystem/entries/sql-datafiltering.md index 67041ea42a..58001625ca 100644 --- a/docs/src/data/ecosystem/entries/sql-datafiltering.md +++ b/docs/src/data/ecosystem/entries/sql-datafiltering.md @@ -8,7 +8,7 @@ software: code: - https://github.com/open-policy-agent/contrib/tree/main/data_filter_example blogs: -- https://blog.openpolicyagent.org/write-policy-in-opa-enforce-policy-in-sql-d9d24db93bf4 +- https://openpolicyagent.org/blog/write-policy-in-opa-enforce-policy-in-sql-d9d24db93bf4 inventors: - styra --- diff --git a/docs/src/data/ecosystem/entries/swift-opa.md b/docs/src/data/ecosystem/entries/swift-opa.md index 95b32a318c..9fed7d70cc 100644 --- a/docs/src/data/ecosystem/entries/swift-opa.md +++ b/docs/src/data/ecosystem/entries/swift-opa.md @@ -8,7 +8,7 @@ labels: inventors: - Apple blogs: -- "https://blog.openpolicyagent.org/introducing-swift-opa-native-policy-evaluation-for-swift-d5136c8a662e" +- "https://openpolicyagent.org/blog/introducing-swift-opa-native-policy-evaluation-for-swift-d5136c8a662e" code: - "https://github.com/open-policy-agent/swift-opa" tutorials: diff --git a/docs/src/data/surveys/events/2021/metadata.json b/docs/src/data/surveys/events/2021/metadata.json index 65a6ca91c3..3bf769ca0c 100644 --- a/docs/src/data/surveys/events/2021/metadata.json +++ b/docs/src/data/surveys/events/2021/metadata.json @@ -2,7 +2,7 @@ "slug": "2021", "title": "2021 OPA Community Survey", "year": 2021, - "blog": "https://blog.openpolicyagent.org/open-policy-agent-2021-survey-summary-e749bbd7b824", + "blog": "/blog/open-policy-agent-2021-survey-summary-e749bbd7b824", "intro": "This page presents selected results from the 2021 OPA Community Survey for comparison across years. For the full survey results and detailed analysis, please see the blog post.", "sections": [ { diff --git a/docs/src/data/surveys/events/2022/metadata.json b/docs/src/data/surveys/events/2022/metadata.json index 4e47d1e03d..dbae778184 100644 --- a/docs/src/data/surveys/events/2022/metadata.json +++ b/docs/src/data/surveys/events/2022/metadata.json @@ -2,7 +2,7 @@ "slug": "2022", "title": "2022 OPA Community Survey", "year": 2022, - "blog": "https://blog.openpolicyagent.org/open-policy-agent-2022-user-survey-summary-370cf0243bb7", + "blog": "/blog/open-policy-agent-2022-user-survey-summary-370cf0243bb7", "intro": "This page presents selected results from the 2022 OPA Community Survey for comparison across years. For the full survey results and detailed analysis, please see the blog post.", "sections": [ {