From 31d27bcaa006a135ecc62095c0eef1c9b9083c6c Mon Sep 17 00:00:00 2001
From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com>
Date: Tue, 1 Dec 2026 07:09:32 +0000
Subject: [PATCH 1/2] docs: explain --no-commit-info for cross-repository
attestations
---
getting_started/attestations.md | 2 +-
integrations/ci_cd.md | 25 ++++++++++++++++++++++++-
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/getting_started/attestations.md b/getting_started/attestations.md
index 69a565ad..0102f2bb 100644
--- a/getting_started/attestations.md
+++ b/getting_started/attestations.md
@@ -92,7 +92,7 @@ The following sections show how to make each of the four attestations defined in
In this case the Kosli CLI will calculate the fingerprint of the docker image called `my_company/backend:latest` and attest it as the `backend` artifact `name` in the trail.
- In all attestation commands the Kosli CLI automatically gathers the git commit and other information from the current git repository and the [CI environment](/integrations/ci_cd). This is how the git commit is used to match attestations to artifacts.
+ In all attestation commands the Kosli CLI automatically gathers the git commit and other information from the current git repository and the [CI environment](/integrations/ci_cd). This is how the git commit is used to match attestations to artifacts. If the job that attests runs in a different repository from the trail's, see [Attest to a trail from another repository](/integrations/ci_cd#attest-to-a-trail-from-another-repository).
diff --git a/integrations/ci_cd.md b/integrations/ci_cd.md
index adb1b449..c3abf2e3 100644
--- a/integrations/ci_cd.md
+++ b/integrations/ci_cd.md
@@ -195,4 +195,27 @@ description: Use Kosli in CI Systems like GitHub Actions, GitLab CI, and more.
Where `` are Teamcity predefined variables. See [here](https://www.jetbrains.com/help/teamcity/predefined-build-parameters.html) for more details.
-
\ No newline at end of file
+
+
+## Attest to a trail from another repository
+
+Sometimes the job that attests runs in a different repository from the one the trail belongs to. For example, a security scan pipeline in its own repository attests to the trails of your application builds. With the defaults above, the attestation records the commit and repository of the scanning job, not those of the trail's build.
+
+Pass `--no-commit-info` to send the attestation without git commit info and without the repository info defaulted from the CI environment:
+
+```shell
+kosli attest generic \
+ --flow backend-ci \
+ --trail "$TRAIL_NAME" \
+ --name security-scan \
+ --compliant=true \
+ --no-commit-info
+```
+
+- Repository flags that you pass explicitly (`--repository`, `--repo-url`, `--repo-id`, `--repo-provider`, or their `KOSLI_` environment variables) are still sent. Use them to name the repository the trail belongs to.
+- The origin URL still points to the CI run that sent the attestation.
+- `--no-commit-info` can't be combined with `--commit`, whether you pass it as a flag or set it through `KOSLI_COMMIT` or the config file.
+- Pull request and Jira attestations need the commit, so they fail with `--no-commit-info`.
+- Without a commit, Kosli can't bind an attestation to an artifact that doesn't exist yet. Report the artifact first, or pass `--fingerprint`.
+
+See [`kosli attest generic`](/client_reference/kosli_attest_generic) for the full flag reference.
From 2570286aa22a9510a0b4d391ea516931a5ec2be1 Mon Sep 17 00:00:00 2001
From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com>
Date: Tue, 1 Dec 2026 07:15:41 +0000
Subject: [PATCH 2/2] docs: clarify repository flags and supported commands for
--no-commit-info
---
integrations/ci_cd.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/integrations/ci_cd.md b/integrations/ci_cd.md
index c3abf2e3..4eb4d69e 100644
--- a/integrations/ci_cd.md
+++ b/integrations/ci_cd.md
@@ -201,7 +201,7 @@ description: Use Kosli in CI Systems like GitHub Actions, GitLab CI, and more.
Sometimes the job that attests runs in a different repository from the one the trail belongs to. For example, a security scan pipeline in its own repository attests to the trails of your application builds. With the defaults above, the attestation records the commit and repository of the scanning job, not those of the trail's build.
-Pass `--no-commit-info` to send the attestation without git commit info and without the repository info defaulted from the CI environment:
+Pass `--no-commit-info` to send the attestation without git commit info and without the repository info defaulted from the CI environment. The flag is available on the attestation commands that attach evidence to a trail, such as `kosli attest generic`, `junit`, `snyk` and `custom`. `kosli attest artifact` and `kosli attest in-toto` don't support it.
```shell
kosli attest generic \
@@ -212,7 +212,7 @@ kosli attest generic \
--no-commit-info
```
-- Repository flags that you pass explicitly (`--repository`, `--repo-url`, `--repo-id`, `--repo-provider`, or their `KOSLI_` environment variables) are still sent. Use them to name the repository the trail belongs to.
+- Repository flags that you pass explicitly, or set through their `KOSLI_` environment variables, are still sent. To name the repository the trail belongs to, set all three of `--repository`, `--repo-url` and `--repo-id`. `--repo-provider` is optional.
- The origin URL still points to the CI run that sent the attestation.
- `--no-commit-info` can't be combined with `--commit`, whether you pass it as a flag or set it through `KOSLI_COMMIT` or the config file.
- Pull request and Jira attestations need the commit, so they fail with `--no-commit-info`.