Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client_reference/kosli_assert_artifact.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ non-zero code if non-compliant status.
<Tab title="GitHub">
View an example of the `kosli assert artifact` command in GitHub.

In [this YAML file](https://github.com/cyber-dojo/differ/blob/ce4cbdd20524e0cd53e25098435bc5d30b8190b7/.github/workflows/main.yml#L271)
In [this YAML file](https://github.com/cyber-dojo/differ/blob/a9cdf63c5ed2288935a77a46ccd4a35b2bfb2300/.github/workflows/main.yml#L271)
</Tab>
<Tab title="GitLab">
View an example of the `kosli assert artifact` command in GitLab.
Expand Down
2 changes: 1 addition & 1 deletion client_reference/kosli_attest_artifact.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ In other CI systems, set them explicitly to capture repository metadata.
<Tab title="GitHub">
View an example of the `kosli attest artifact` command in GitHub.

In [this YAML file](https://github.com/cyber-dojo/reusable-actions-workflows/blob/1bdb27adc1d20509a8b8a67f15adbae517d4cb4c/.github/workflows/secure-docker-build.yml#L222), which created [this Kosli Event](https://app.kosli.com/cyber-dojo/flows/differ-ci/trails/26dcd06257a4bb00d594dbb5de05eefbb7b20379?attestation_id=494ad51d-feff-4795-9fec-f2a8b953).
In [this YAML file](https://github.com/cyber-dojo/reusable-actions-workflows/blob/10a0ea436537939e27118c9d5a33400a6049b0e9/.github/workflows/secure-docker-build.yml#L228), which created [this Kosli Event](https://app.kosli.com/cyber-dojo/flows/differ-ci/trails/26dcd06257a4bb00d594dbb5de05eefbb7b20379?attestation_id=494ad51d-feff-4795-9fec-f2a8b953).
</Tab>
<Tab title="GitLab">
View an example of the `kosli attest artifact` command in GitLab.
Expand Down
2 changes: 1 addition & 1 deletion client_reference/kosli_create_attestation-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ All rules must return `true` for the evaluation to pass and the attestation to b
<Tab title="GitHub">
View an example of the `kosli create attestation-type` command in GitHub.

In [this YAML file](https://github.com/cyber-dojo/kosli-attestation-types/blob/88584f3616dd7f6250cd36a8430e8c9235bfcb6f/.github/workflows/main.yml#L30)
In [this YAML file](https://github.com/cyber-dojo/kosli-attestation-types/blob/e64e96a8bdac8490c348742d83f15bff4ffa435c/.github/workflows/main.yml#L30)
</Tab>
</Tabs>

Expand Down
12 changes: 6 additions & 6 deletions client_reference/kosli_diff_snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ kosli diff snapshots aws-beta aws-prod --output=json
```json
{
"snappish1": {
"snapshot_id": "aws-beta#7609",
"snapshot_id": "aws-beta#7619",
"artifacts": [
{
"fingerprint": "1a699e33bfd10607ba32dfd4189c4a3a33b552575ae7907554a7066add925ead",
Expand All @@ -85,17 +85,17 @@ kosli diff snapshots aws-beta aws-prod --output=json
"instance_count": 1
},
{
"fingerprint": "9cd4a6c3fb096cf92e1c50c6b6f37e412830918594f9aca5c49030798345ac08",
"name": "244531986313.dkr.ecr.eu-central-1.amazonaws.com/differ:ce4cbdd@sha256:9cd4a6c3fb096cf92e1c50c6b6f37e412830918594f9aca5c49030798345ac08",
"most_recent_timestamp": 1783329537,
"fingerprint": "aca3fd625101b9d14b879e7ef0612b82d69bf1c1f7626e4d9074b2ac2d2f3c0e",
"name": "244531986313.dkr.ecr.eu-central-1.amazonaws.com/differ:a9cdf63@sha256:aca3fd625101b9d14b879e7ef0612b82d69bf1c1f7626e4d9074b2ac2d2f3c0e",
"most_recent_timestamp": 1783417896,
"flow": "differ-ci",
"commit_url": "https://github.com/cyber-dojo/differ/commit/ce4cbdd20524e0cd53e25098435bc5d30b8190b7",
"commit_url": "https://github.com/cyber-dojo/differ/commit/a9cdf63c5ed2288935a77a46ccd4a35b2bfb2300",
"instance_count": 1
}
]
},
"snappish2": {
"snapshot_id": "aws-prod#4960",
"snapshot_id": "aws-prod#4969",
"artifacts": [
{
"fingerprint": "4d1ba1622515a86443d2ec4b76df41daa7b98daabeb557a134607f6e200e8ebc",
Expand Down
6 changes: 3 additions & 3 deletions client_reference/kosli_get_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ kosli get environment aws-prod --output=json
"name": "aws-prod",
"type": "ECS",
"description": "The ECS cluster for production cyber-dojo",
"last_modified_at": 1783351678.4168556,
"last_reported_at": 1783351678.4168556,
"last_changed_at": 1783329958.5858161,
"last_modified_at": 1783528258.5511878,
"last_reported_at": 1783528258.5511878,
"last_changed_at": 1783486618.5418699,
"state": true,
"include_scaling": false,
"tags": {
Expand Down
66 changes: 66 additions & 0 deletions client_reference/kosli_get_repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "kosli get repo"
description: "Get a repo for an org."
---

## Synopsis

```shell
kosli get repo [REPO-NAME] [flags]
```

Get a repo for an org.
The repo is identified either by its name, specified as an argument
(e.g. "my-org/my-repo"), or unambiguously by its internal ID via --repo-id.
The output includes the repo's internal ID, which is the identifier used
to tag the repo (see: kosli tag).
Use --provider to disambiguate when multiple repos share the same name
across VCS providers.

## Flags
| Flag | Description |
| :--- | :--- |
| `-h`, `--help` | help for repo |
| `-o`, `--output` string | [defaulted] The format of the output. Valid formats are: [table, json]. (default "table") |
| `--provider` string | [optional] The VCS provider of the repo (e.g. github, gitlab). Required when multiple repos share the same name across providers. |
| `--repo-id` string | [optional] The repo's internal ID (as shown in the repo output). Identifies the repo unambiguously; cannot be combined with the REPO-NAME argument. |


## Flags inherited from parent commands
| Flag | Description |
| :--- | :--- |
| `-a`, `--api-token` string | The Kosli API token. |
| `-c`, `--config-file` string | [optional] The Kosli config file path. (default "kosli") |
| `--debug` | [optional] Print debug logs to stdout. |
| `-H`, `--host` string | [defaulted] The Kosli endpoint. (default "https://app.kosli.com") |
| `--http-proxy` string | [optional] The HTTP proxy URL including protocol and port number. e.g. `http://proxy-server-ip:proxy-port` |
| `-r`, `--max-api-retries` int | [defaulted] How many times should API calls be retried when the API host is not reachable. (default 3) |
| `--org` string | The Kosli organization. |
| `-q`, `--quiet` | [optional] Suppress non-critical warning messages. Errors and normal output are not affected. If both `--quiet` and `--debug` are set, `--debug` wins. |


## Examples Use Cases

These examples all assume that the flags `--api-token`, `--org`, `--host`, (and `--flow`, `--trail` when required), are [set/provided](/getting_started/install/#assigning-flags-via-environment-variables).

<AccordionGroup>
<Accordion title="get a repo">
```shell
kosli get repo my-org/my-repo

```
</Accordion>
<Accordion title="get a repo whose name exists across multiple VCS providers">
```shell
kosli get repo my-org/my-repo
--provider github

```
</Accordion>
<Accordion title="get a repo by its internal ID">
```shell
kosli get repo --repo-id yourRepoID
```
</Accordion>
</AccordionGroup>

Loading