From 02794ccc3003ba0cb4c7eaa3248f7d0393c6baae Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 10 Apr 2024 16:24:01 +0300 Subject: [PATCH 1/2] docs: fix links to OPA docs --- docs/docs/scanner/misconfiguration/custom/index.md | 2 +- docs/docs/scanner/misconfiguration/custom/schema.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/scanner/misconfiguration/custom/index.md b/docs/docs/scanner/misconfiguration/custom/index.md index b1c16219e8f8..c944018b960b 100644 --- a/docs/docs/scanner/misconfiguration/custom/index.md +++ b/docs/docs/scanner/misconfiguration/custom/index.md @@ -103,7 +103,7 @@ Any package prefixes such as `main` and `user` are allowed. ### Metadata Metadata helps enrich Trivy's scan results with useful information. -The annotation format is described in the [OPA documentation](https://www.openpolicyagent.org/docs/latest/annotations/). +The annotation format is described in the [OPA documentation](https://www.openpolicyagent.org/docs/latest/policy-language/#annotations). Trivy supports extra fields in the `custom` section as described below. diff --git a/docs/docs/scanner/misconfiguration/custom/schema.md b/docs/docs/scanner/misconfiguration/custom/schema.md index 8791d1a22752..17c4859cbfaf 100644 --- a/docs/docs/scanner/misconfiguration/custom/schema.md +++ b/docs/docs/scanner/misconfiguration/custom/schema.md @@ -89,4 +89,4 @@ To use such a policy with Trivy, use the `--config-policy` flag that points to t $ trivy --config-policy=/Users/user/my-custom-policies ``` -For more details on how to define schemas within Rego policies, please see the [OPA guide](https://www.openpolicyagent.org/docs/latest/schemas/#schema-annotations) that describes it in more detail. \ No newline at end of file +For more details on how to define schemas within Rego policies, please see the [OPA guide](https://www.openpolicyagent.org/docs/latest/policy-language/#schema-annotations) that describes it in more detail. \ No newline at end of file From 0757a4ffd66bfac238861b5c758caed39c963d7b Mon Sep 17 00:00:00 2001 From: Nikita Date: Fri, 12 Apr 2024 17:39:28 +0300 Subject: [PATCH 2/2] update docs --- docs/docs/advanced/air-gap.md | 2 +- docs/docs/scanner/misconfiguration/custom/index.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/docs/advanced/air-gap.md b/docs/docs/advanced/air-gap.md index 8793defbb5c5..3cb7eff65c9f 100644 --- a/docs/docs/advanced/air-gap.md +++ b/docs/docs/advanced/air-gap.md @@ -137,6 +137,6 @@ $ trivy conf --skip-policy-update /path/to/conf ``` [allowlist]: ../references/troubleshooting.md -[oras]: https://oras.land/cli/ +[oras]: https://oras.land/docs/installation [^1]: This is only required to scan `jar` files. More information about `Java index db` [here](../coverage/language/java.md) diff --git a/docs/docs/scanner/misconfiguration/custom/index.md b/docs/docs/scanner/misconfiguration/custom/index.md index c944018b960b..8b08c5e41292 100644 --- a/docs/docs/scanner/misconfiguration/custom/index.md +++ b/docs/docs/scanner/misconfiguration/custom/index.md @@ -101,9 +101,8 @@ In this case, `user.*` will be evaluated. Any package prefixes such as `main` and `user` are allowed. ### Metadata -Metadata helps enrich Trivy's scan results with useful information. -The annotation format is described in the [OPA documentation](https://www.openpolicyagent.org/docs/latest/policy-language/#annotations). +The check must contain a [Rego Metadata](https://www.openpolicyagent.org/docs/latest/policy-language/#metadata) section. Trivy uses standard rego metadata to define the new policy and general information about it. Trivy supports extra fields in the `custom` section as described below.