From 5af7bc2476725c8bb0e874a61b4e1993ff41c5a7 Mon Sep 17 00:00:00 2001 From: Marko Bevc Date: Sun, 30 Aug 2026 18:56:35 +0100 Subject: [PATCH 1/2] fix(docs): help typos --- cmd/kosli/attestSonar.go | 4 ++-- cmd/kosli/root.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/kosli/attestSonar.go b/cmd/kosli/attestSonar.go index db5e35c07..37e308e77 100644 --- a/cmd/kosli/attestSonar.go +++ b/cmd/kosli/attestSonar.go @@ -39,7 +39,7 @@ Both branch scans and pull request scans are supported. The scan to be retrieved can be specified in three ways: 1. (Default) Using metadata created by the Sonar scanner. By default this is located within a temporary ^.scannerwork^ folder in the repo base directory. -If you have overriden the location of this folder by passing parameters to the Sonar scanner, or are running Kosli's CLI locally outside the repo's base directory, +If you have overridden the location of this folder by passing parameters to the Sonar scanner, or are running Kosli's CLI locally outside the repo's base directory, you can provide the correct path using the ^--sonar-working-dir^ flag. This metadata is generated by a specific scan, allowing Kosli to retrieve the results of that scan. If there are delays in the scan processing (either because the scanned project is very large, or because SonarQube is experiencing processing delays), it may happen that the scan results are not available by the time the attest sonar command is executed. In this case you can use the ^--max-wait^ flag to retry the command while waiting for the scan to be processed. @@ -48,7 +48,7 @@ exponential backoff between retries. Once the results are available they are att 2. Providing the Sonar project key and either the revision or the pull-request ID of the scan (plus the SonarQube server URL if relevant). For branch scans: if running the Kosli CLI in some CI/CD pipeline, the revision is defaulted to the commit SHA. If you are running the command locally, -or have overriden the revision in SonarQube via parameters to the Sonar scanner, you can provide the correct revision using the ^--sonar-revision^ flag. +or have overridden the revision in SonarQube via parameters to the Sonar scanner, you can provide the correct revision using the ^--sonar-revision^ flag. If the scan ran on a branch other than the project's main branch in SonarQube, also provide the branch name using the ^--sonar-branch^ flag. SonarQube only searches the project's main branch unless told otherwise, so without this flag the scan cannot be found. For pull request scans: provide the pull-request ID using the ^--pull-request^ flag instead of the revision. diff --git a/cmd/kosli/root.go b/cmd/kosli/root.go index f8efa6e7d..95309464f 100644 --- a/cmd/kosli/root.go +++ b/cmd/kosli/root.go @@ -297,7 +297,7 @@ The ^.kosli_ignore^ will be treated as part of the artifact like any other file, attachPolicyEnvFlag = "the list of environment names to attach the policy to" detachPolicyEnvFlag = "the list of environment names to detach the policy from" sonarAPITokenFlag = "[required] SonarQube API token." - sonarWorkingDirFlag = "[conditional] The base directory of the repo scanned by SonarQube. Only required if you have overriden the default in the sonar scanner or you are running the CLI locally in a separate folder from the repo." + sonarWorkingDirFlag = "[conditional] The base directory of the repo scanned by SonarQube. Only required if you have overridden the default in the sonar scanner or you are running the CLI locally in a separate folder from the repo." sonarProjectKeyFlag = "[conditional] The project key of the SonarQube project. Only required if you want to use the project key/revision/pull-request to get the scan results rather than using Sonar's metadata file." sonarServerURLFlag = "[conditional] The URL of your SonarQube server. Only required if you are using SonarQube Server and not using SonarQube's metadata file to get scan results." sonarRevisionFlag = "[conditional] The revision of the SonarQube project. Only required if you want to use the project key/revision to get the scan results rather than using Sonar's metadata file and you have overridden the default revision, or you aren't using a CI. Defaults to the value of the git commit flag. Cannot be used with --pull-request." From 8fe6ffffaf669ffc6a67c96695e7c2997c4e4fc4 Mon Sep 17 00:00:00 2001 From: Marko Bevc Date: Sun, 30 Aug 2026 19:09:31 +0100 Subject: [PATCH 2/2] fix: Update cmd/kosli/root.go Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- cmd/kosli/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kosli/root.go b/cmd/kosli/root.go index 95309464f..786c3529b 100644 --- a/cmd/kosli/root.go +++ b/cmd/kosli/root.go @@ -297,7 +297,7 @@ The ^.kosli_ignore^ will be treated as part of the artifact like any other file, attachPolicyEnvFlag = "the list of environment names to attach the policy to" detachPolicyEnvFlag = "the list of environment names to detach the policy from" sonarAPITokenFlag = "[required] SonarQube API token." - sonarWorkingDirFlag = "[conditional] The base directory of the repo scanned by SonarQube. Only required if you have overridden the default in the sonar scanner or you are running the CLI locally in a separate folder from the repo." + sonarWorkingDirFlag = "[conditional] The base directory of the repo scanned by SonarQube. Only required if you have overridden the default in the Sonar scanner or you are running the CLI locally in a separate folder from the repo." sonarProjectKeyFlag = "[conditional] The project key of the SonarQube project. Only required if you want to use the project key/revision/pull-request to get the scan results rather than using Sonar's metadata file." sonarServerURLFlag = "[conditional] The URL of your SonarQube server. Only required if you are using SonarQube Server and not using SonarQube's metadata file to get scan results." sonarRevisionFlag = "[conditional] The revision of the SonarQube project. Only required if you want to use the project key/revision to get the scan results rather than using Sonar's metadata file and you have overridden the default revision, or you aren't using a CI. Defaults to the value of the git commit flag. Cannot be used with --pull-request."