From abf8262ff24e7efcd5991e6fba06793f51e4a6e5 Mon Sep 17 00:00:00 2001 From: Boris Shek Date: Sun, 4 Feb 2024 22:53:10 +0100 Subject: [PATCH 1/2] #1963 Convert relative links to absolute in .gotmpl for docs Make changes only in corresponding files within the 'scanners' and 'hooks' directories because only they are referred to in ArtifactHub and DockerHub. Signed-off-by: Boris Shek --- hooks/finding-post-processing/.helm-docs.gotmpl | 2 +- hooks/notification/.helm-docs.gotmpl | 4 ++-- scanners/git-repo-scanner/.helm-docs.gotmpl | 2 +- scanners/semgrep/.helm-docs.gotmpl | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hooks/finding-post-processing/.helm-docs.gotmpl b/hooks/finding-post-processing/.helm-docs.gotmpl index c7bed905aa..63b93ed66c 100644 --- a/hooks/finding-post-processing/.helm-docs.gotmpl +++ b/hooks/finding-post-processing/.helm-docs.gotmpl @@ -33,7 +33,7 @@ which can be used to add or update fields from your findings meeting specified c ### Rule Configuration The _rules_ can be defined in the `values` of the HelmChart. -The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](/docs/api/crds/cascading-rule)) +The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](https://www.securecodebox.io/docs/api/crds/cascading-rule)) To define rules you will have to provide the `rules` field with one or more `matches` elements. Each `machtes` defines one Rule. diff --git a/hooks/notification/.helm-docs.gotmpl b/hooks/notification/.helm-docs.gotmpl index aa05e75cd3..5bf4f31c0a 100644 --- a/hooks/notification/.helm-docs.gotmpl +++ b/hooks/notification/.helm-docs.gotmpl @@ -106,7 +106,7 @@ This means that you can define key-value pairs as well as providing envs via sec #### Rule Configuration The rules can be defined in the values of the Chart. -The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](/docs/api/crds/cascading-rule)) +The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](https://www.securecodebox.io/docs/api/crds/cascading-rule)) To define Rules you will have to provide the `rules` field with one or more `matches` elements. Each `matches` defines one Rule. For example: @@ -449,4 +449,4 @@ To fill your template with data we provide the following objects. {{- end }} {{- define "extra.scannerLinksSection" -}} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/scanners/git-repo-scanner/.helm-docs.gotmpl b/scanners/git-repo-scanner/.helm-docs.gotmpl index b8334da901..430ba846e5 100644 --- a/scanners/git-repo-scanner/.helm-docs.gotmpl +++ b/scanners/git-repo-scanner/.helm-docs.gotmpl @@ -26,7 +26,7 @@ usecase: "Discover Git repositories" ## What is Git-Repo-Scanner? Git-Repo-Scanner is a small Python script which discovers repositories on GitHub or GitLab. The main purpose of this scanner -is to provide a cascading input for the [gitleaks](/docs/scanners/gitleaks) and [semgrep](/docs/scanners/semgrep) scanners. +is to provide a cascading input for the [gitleaks](https://www.securecodebox.io/docs/scanners/gitleaks) and [semgrep](https://www.securecodebox.io/docs/scanners/semgrep) scanners. {{- end }} {{- define "extra.scannerConfigurationSection" -}} diff --git a/scanners/semgrep/.helm-docs.gotmpl b/scanners/semgrep/.helm-docs.gotmpl index 1f78db296b..fbef18e20f 100644 --- a/scanners/semgrep/.helm-docs.gotmpl +++ b/scanners/semgrep/.helm-docs.gotmpl @@ -89,8 +89,8 @@ Due to the large variety of options, we do not provide documentation for all of Refer to the linked documentation for details on the different methods, and remember to use [Kubernetes secrets](https://kubernetes.io/docs/concepts/configuration/secret/) to manage keys and tokens. ## Cascading Rules -By default, the semgrep scanner does not install any [cascading rules](/docs/hooks/cascading-scans), as some aspects of the semgrep scan (like the used ruleset) should be customized. -However, you can easily create your own cascading rule, for example to run semgrep on the output of [git-repo-scanner](/docs/scanners/git-repo-scanner). +By default, the semgrep scanner does not install any [cascading rules](https://www.securecodebox.io/docs/hooks/cascading-scans), as some aspects of the semgrep scan (like the used ruleset) should be customized. +However, you can easily create your own cascading rule, for example to run semgrep on the output of [git-repo-scanner](https://www.securecodebox.io/docs/scanners/git-repo-scanner). As a starting point, consider the following cascading rule to scan all public GitHub repositories found by git-repo-scanner using the p/ci ruleset of semgrep: ```yaml From 887771a6d748721802345f16c9fba3398e31007d Mon Sep 17 00:00:00 2001 From: Boris Shek Date: Sun, 4 Feb 2024 23:01:45 +0100 Subject: [PATCH 2/2] #1963 Regenerate docs with updated .gotmpl files for absolute links Update the documentation by regenerating it from the updated .helm-docs.gotmpl files, ensuring that the latest template changes, specifically the conversion to absolute links, are applied. Signed-off-by: Boris Shek --- hooks/finding-post-processing/docs/README.ArtifactHub.md | 2 +- hooks/notification/docs/README.ArtifactHub.md | 2 +- scanners/git-repo-scanner/docs/README.ArtifactHub.md | 2 +- scanners/git-repo-scanner/docs/README.DockerHub-Parser.md | 2 +- scanners/git-repo-scanner/docs/README.DockerHub-Scanner.md | 2 +- scanners/semgrep/docs/README.ArtifactHub.md | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hooks/finding-post-processing/docs/README.ArtifactHub.md b/hooks/finding-post-processing/docs/README.ArtifactHub.md index 984aefeedd..567f4756ec 100644 --- a/hooks/finding-post-processing/docs/README.ArtifactHub.md +++ b/hooks/finding-post-processing/docs/README.ArtifactHub.md @@ -60,7 +60,7 @@ Kubernetes: `>=v1.11.0-0` ### Rule Configuration The _rules_ can be defined in the `values` of the HelmChart. -The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](/docs/api/crds/cascading-rule)) +The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](https://www.securecodebox.io/docs/api/crds/cascading-rule)) To define rules you will have to provide the `rules` field with one or more `matches` elements. Each `machtes` defines one Rule. diff --git a/hooks/notification/docs/README.ArtifactHub.md b/hooks/notification/docs/README.ArtifactHub.md index f73e0de32c..e2110f6967 100644 --- a/hooks/notification/docs/README.ArtifactHub.md +++ b/hooks/notification/docs/README.ArtifactHub.md @@ -133,7 +133,7 @@ This means that you can define key-value pairs as well as providing envs via sec #### Rule Configuration The rules can be defined in the values of the Chart. -The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](/docs/api/crds/cascading-rule)) +The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](https://www.securecodebox.io/docs/api/crds/cascading-rule)) To define Rules you will have to provide the `rules` field with one or more `matches` elements. Each `matches` defines one Rule. For example: diff --git a/scanners/git-repo-scanner/docs/README.ArtifactHub.md b/scanners/git-repo-scanner/docs/README.ArtifactHub.md index 644818082a..ba0f307ea9 100644 --- a/scanners/git-repo-scanner/docs/README.ArtifactHub.md +++ b/scanners/git-repo-scanner/docs/README.ArtifactHub.md @@ -43,7 +43,7 @@ You can find resources to help you get started on our [documentation website](ht ## What is Git-Repo-Scanner? Git-Repo-Scanner is a small Python script which discovers repositories on GitHub or GitLab. The main purpose of this scanner -is to provide a cascading input for the [gitleaks](/docs/scanners/gitleaks) and [semgrep](/docs/scanners/semgrep) scanners. +is to provide a cascading input for the [gitleaks](https://www.securecodebox.io/docs/scanners/gitleaks) and [semgrep](https://www.securecodebox.io/docs/scanners/semgrep) scanners. ## Deployment The git-repo-scanner chart can be deployed via helm: diff --git a/scanners/git-repo-scanner/docs/README.DockerHub-Parser.md b/scanners/git-repo-scanner/docs/README.DockerHub-Parser.md index e967428d97..95a1fdba9c 100644 --- a/scanners/git-repo-scanner/docs/README.DockerHub-Parser.md +++ b/scanners/git-repo-scanner/docs/README.DockerHub-Parser.md @@ -54,7 +54,7 @@ docker pull securecodebox/parser-git-repo-scanner ## What is Git-Repo-Scanner? Git-Repo-Scanner is a small Python script which discovers repositories on GitHub or GitLab. The main purpose of this scanner -is to provide a cascading input for the [gitleaks](/docs/scanners/gitleaks) and [semgrep](/docs/scanners/semgrep) scanners. +is to provide a cascading input for the [gitleaks](https://www.securecodebox.io/docs/scanners/gitleaks) and [semgrep](https://www.securecodebox.io/docs/scanners/semgrep) scanners. ## Community diff --git a/scanners/git-repo-scanner/docs/README.DockerHub-Scanner.md b/scanners/git-repo-scanner/docs/README.DockerHub-Scanner.md index 4ceba598eb..d3be7463d1 100644 --- a/scanners/git-repo-scanner/docs/README.DockerHub-Scanner.md +++ b/scanners/git-repo-scanner/docs/README.DockerHub-Scanner.md @@ -54,7 +54,7 @@ docker pull securecodebox/scanner-git-repo-scanner ## What is Git-Repo-Scanner? Git-Repo-Scanner is a small Python script which discovers repositories on GitHub or GitLab. The main purpose of this scanner -is to provide a cascading input for the [gitleaks](/docs/scanners/gitleaks) and [semgrep](/docs/scanners/semgrep) scanners. +is to provide a cascading input for the [gitleaks](https://www.securecodebox.io/docs/scanners/gitleaks) and [semgrep](https://www.securecodebox.io/docs/scanners/semgrep) scanners. ## Scanner Configuration diff --git a/scanners/semgrep/docs/README.ArtifactHub.md b/scanners/semgrep/docs/README.ArtifactHub.md index 9781ae70c0..85a80b41cf 100644 --- a/scanners/semgrep/docs/README.ArtifactHub.md +++ b/scanners/semgrep/docs/README.ArtifactHub.md @@ -108,8 +108,8 @@ Due to the large variety of options, we do not provide documentation for all of Refer to the linked documentation for details on the different methods, and remember to use [Kubernetes secrets](https://kubernetes.io/docs/concepts/configuration/secret/) to manage keys and tokens. ## Cascading Rules -By default, the semgrep scanner does not install any [cascading rules](/docs/hooks/cascading-scans), as some aspects of the semgrep scan (like the used ruleset) should be customized. -However, you can easily create your own cascading rule, for example to run semgrep on the output of [git-repo-scanner](/docs/scanners/git-repo-scanner). +By default, the semgrep scanner does not install any [cascading rules](https://www.securecodebox.io/docs/hooks/cascading-scans), as some aspects of the semgrep scan (like the used ruleset) should be customized. +However, you can easily create your own cascading rule, for example to run semgrep on the output of [git-repo-scanner](https://www.securecodebox.io/docs/scanners/git-repo-scanner). As a starting point, consider the following cascading rule to scan all public GitHub repositories found by git-repo-scanner using the p/ci ruleset of semgrep: ```yaml