From d564e5c7df4e8da4ace5d848d315810d3ea9e005 Mon Sep 17 00:00:00 2001 From: Samreet Singh Date: Fri, 3 Jan 2025 19:46:59 +0100 Subject: [PATCH 1/2] Update semgrep and test file Since version v1.96.0 directory names like test,tests,testsuite are ignored Changing the directory name in the integration test will solve this issue Signed-off-by: Samreet Singh --- scanners/semgrep/Chart.yaml | 2 +- .../semgrep/integration-tests/semgrep.test.js | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/scanners/semgrep/Chart.yaml b/scanners/semgrep/Chart.yaml index adb865b55b..c5d4ef7723 100644 --- a/scanners/semgrep/Chart.yaml +++ b/scanners/semgrep/Chart.yaml @@ -22,7 +22,7 @@ version: "v3.1.0-alpha1" # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.95.0" +appVersion: "1.101.0" annotations: versionApi: https://api.github.com/repos/returntocorp/semgrep/releases/latest supported-platforms: linux/amd64 diff --git a/scanners/semgrep/integration-tests/semgrep.test.js b/scanners/semgrep/integration-tests/semgrep.test.js index e5420cf448..14c8d47d49 100644 --- a/scanners/semgrep/integration-tests/semgrep.test.js +++ b/scanners/semgrep/integration-tests/semgrep.test.js @@ -15,19 +15,23 @@ test( [ "-c", "r/python.django.security.injection.command.command-injection-os-system.command-injection-os-system", - "/test/", + "/test-semgrep/", ], 90, // volumes - [{ - "name": "test-dir", - "configMap": {"name": "semgrep-test-file"} - }], + [ + { + name: "test-dir", + configMap: { name: "semgrep-test-file" }, + }, + ], // volumeMounts - [{ - "mountPath": "/test/", - "name": "test-dir" - }], + [ + { + mountPath: "/test-semgrep/", + name: "test-dir", + }, + ], ); expect(count).toBe(3); From 21e5bb901df97f23c5133e9c27e6eb9e6dec29e4 Mon Sep 17 00:00:00 2001 From: Samreet Singh Date: Fri, 3 Jan 2025 19:54:57 +0100 Subject: [PATCH 2/2] Update all references of the old semgrep repository name to new one Signed-off-by: Samreet Singh --- .../docs/architecture/09_architecture_decisions/adr_0009.md | 2 +- scanners/semgrep/.helm-docs.gotmpl | 2 +- scanners/semgrep/Chart.yaml | 2 +- scanners/semgrep/README.md | 4 ++-- scanners/semgrep/docs/README.ArtifactHub.md | 2 +- scanners/semgrep/tests/__snapshot__/scanner_test.yaml.snap | 2 +- scanners/semgrep/values.yaml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/documentation/docs/architecture/09_architecture_decisions/adr_0009.md b/documentation/docs/architecture/09_architecture_decisions/adr_0009.md index 2169fd2d77..402006e216 100644 --- a/documentation/docs/architecture/09_architecture_decisions/adr_0009.md +++ b/documentation/docs/architecture/09_architecture_decisions/adr_0009.md @@ -240,4 +240,4 @@ The possibility of using init containers adds a large number of new possible fea [initc]: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ [initcvolumes]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container [gitleaks]: https://www.securecodebox.io/docs/scanners/gitleaks/ -[semgrep]: https://github.com/returntocorp/semgrep +[semgrep]: https://github.com/semgrep/semgrep diff --git a/scanners/semgrep/.helm-docs.gotmpl b/scanners/semgrep/.helm-docs.gotmpl index fbef18e20f..3f7bd06aef 100644 --- a/scanners/semgrep/.helm-docs.gotmpl +++ b/scanners/semgrep/.helm-docs.gotmpl @@ -14,7 +14,7 @@ appVersion: "{{ template "chart.appVersion" . }}" usecase: "Static Code Analysis" --- -![Semgrep logo](https://raw.githubusercontent.com/returntocorp/semgrep-docs/main/static/img/semgrep-icon-text-horizontal.svg) +![Semgrep logo](https://raw.githubusercontent.com/semgrep/semgrep-docs/main/static/img/semgrep-icon-text-horizontal.svg) {{- end }} diff --git a/scanners/semgrep/Chart.yaml b/scanners/semgrep/Chart.yaml index c5d4ef7723..b7a332f727 100644 --- a/scanners/semgrep/Chart.yaml +++ b/scanners/semgrep/Chart.yaml @@ -24,7 +24,7 @@ version: "v3.1.0-alpha1" # It is recommended to use it with quotes. appVersion: "1.101.0" annotations: - versionApi: https://api.github.com/repos/returntocorp/semgrep/releases/latest + versionApi: https://api.github.com/repos/semgrep/semgrep/releases/latest supported-platforms: linux/amd64 kubeVersion: ">=v1.11.0-0" home: https://www.securecodebox.io/docs/scanners/semgrep diff --git a/scanners/semgrep/README.md b/scanners/semgrep/README.md index 5a75c591b6..1d1a1f94cd 100644 --- a/scanners/semgrep/README.md +++ b/scanners/semgrep/README.md @@ -7,7 +7,7 @@ appVersion: "1.95.0" usecase: "Static Code Analysis" --- -![Semgrep logo](https://raw.githubusercontent.com/returntocorp/semgrep-docs/main/static/img/semgrep-icon-text-horizontal.svg) +![Semgrep logo](https://raw.githubusercontent.com/semgrep/semgrep-docs/main/static/img/semgrep-icon-text-horizontal.svg)