From 19ce08be6766d09018c697b976a3d78bfd638d44 Mon Sep 17 00:00:00 2001 From: Philip Hayton Date: Tue, 25 Jun 2024 11:31:48 +0100 Subject: [PATCH] chore: update version check endpoint url (#1642) --- api/config.go | 2 +- e2e/flags/.snapshots/TestMetadataFlags-help-scan | 2 +- e2e/flags/.snapshots/TestMetadataFlags-scan-help | 2 +- .../TestReportFlagsShouldFail-invalid-context-flag | 2 +- .../TestReportFlagsShouldFail-invalid-format-flag-privacy | 2 +- .../TestReportFlagsShouldFail-invalid-format-flag-security | 2 +- .../TestReportFlagsShouldFail-invalid-report-flag | 2 +- pkg/flag/general_flags.go | 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/config.go b/api/config.go index 78f430dba..c59e1854b 100644 --- a/api/config.go +++ b/api/config.go @@ -19,6 +19,6 @@ type APIEndpoints struct { var Endpoints = APIEndpoints{ Version: Endpoint{ HttpMethod: "GET", - Route: "/r/version", + Route: "/api/v1/bearerpublic/version", }, } diff --git a/e2e/flags/.snapshots/TestMetadataFlags-help-scan b/e2e/flags/.snapshots/TestMetadataFlags-help-scan index ef57a9ca6..60c9e9879 100644 --- a/e2e/flags/.snapshots/TestMetadataFlags-help-scan +++ b/e2e/flags/.snapshots/TestMetadataFlags-help-scan @@ -39,7 +39,7 @@ Scan Flags --skip-test Disable automatic skipping of test files (default true) General Flags - --api-key string Use your Bearer API Key to send the report to Bearer. + --api-key string Legacy. --config-file string Load configuration from the specified path. (default "bearer.yml") --debug Enable debug logs. Equivalent to --log-level=debug --disable-version-check Disable Bearer version checking diff --git a/e2e/flags/.snapshots/TestMetadataFlags-scan-help b/e2e/flags/.snapshots/TestMetadataFlags-scan-help index ef57a9ca6..60c9e9879 100644 --- a/e2e/flags/.snapshots/TestMetadataFlags-scan-help +++ b/e2e/flags/.snapshots/TestMetadataFlags-scan-help @@ -39,7 +39,7 @@ Scan Flags --skip-test Disable automatic skipping of test files (default true) General Flags - --api-key string Use your Bearer API Key to send the report to Bearer. + --api-key string Legacy. --config-file string Load configuration from the specified path. (default "bearer.yml") --debug Enable debug logs. Equivalent to --log-level=debug --disable-version-check Disable Bearer version checking diff --git a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-context-flag b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-context-flag index 8a77f3218..c4ff40b92 100644 --- a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-context-flag +++ b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-context-flag @@ -40,7 +40,7 @@ Scan Flags --skip-test Disable automatic skipping of test files (default true) General Flags - --api-key string Use your Bearer API Key to send the report to Bearer. + --api-key string Legacy. --config-file string Load configuration from the specified path. (default "bearer.yml") --debug Enable debug logs. Equivalent to --log-level=debug --disable-version-check Disable Bearer version checking diff --git a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-privacy b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-privacy index 31f37ac8b..7d47f66d6 100644 --- a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-privacy +++ b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-privacy @@ -40,7 +40,7 @@ Scan Flags --skip-test Disable automatic skipping of test files (default true) General Flags - --api-key string Use your Bearer API Key to send the report to Bearer. + --api-key string Legacy. --config-file string Load configuration from the specified path. (default "bearer.yml") --debug Enable debug logs. Equivalent to --log-level=debug --disable-version-check Disable Bearer version checking diff --git a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-security b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-security index 4d864af34..18469cd8f 100644 --- a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-security +++ b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag-security @@ -40,7 +40,7 @@ Scan Flags --skip-test Disable automatic skipping of test files (default true) General Flags - --api-key string Use your Bearer API Key to send the report to Bearer. + --api-key string Legacy. --config-file string Load configuration from the specified path. (default "bearer.yml") --debug Enable debug logs. Equivalent to --log-level=debug --disable-version-check Disable Bearer version checking diff --git a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-report-flag b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-report-flag index 05b623e36..af73f7837 100644 --- a/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-report-flag +++ b/e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-report-flag @@ -40,7 +40,7 @@ Scan Flags --skip-test Disable automatic skipping of test files (default true) General Flags - --api-key string Use your Bearer API Key to send the report to Bearer. + --api-key string Legacy. --config-file string Load configuration from the specified path. (default "bearer.yml") --debug Enable debug logs. Equivalent to --log-level=debug --disable-version-check Disable Bearer version checking diff --git a/pkg/flag/general_flags.go b/pkg/flag/general_flags.go index bd5a7ec60..e5ba5b6ee 100644 --- a/pkg/flag/general_flags.go +++ b/pkg/flag/general_flags.go @@ -22,8 +22,8 @@ var ( HostFlag = GeneralFlagGroup.add(flagtypes.Flag{ Name: "host", ConfigName: "host", - Value: "my.bearer.sh", - Usage: "Specify the Host for sending the report.", + Value: "api.cycode.com", + Usage: "Version check hostname.", DisableInConfig: true, Hide: true, }) @@ -32,7 +32,7 @@ var ( Name: "api-key", ConfigName: "api-key", Value: "", - Usage: "Use your Bearer API Key to send the report to Bearer.", + Usage: "Legacy.", DisableInConfig: true, })