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 cmd/kosli/createEnvironment.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ kosli create environment yourEnvironmentName
--api-token yourAPIToken \
--org yourOrgName


# create a Kosli logical environment:
kosli create environment yourLogicalEnvironmentName
--type logical \
--included-environments realEnv1,realEnv2,realEnv3
Expand Down
2 changes: 1 addition & 1 deletion cmd/kosli/detachPolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const detachPolicyShortDesc = `Detach a policy from one or more Kosli environmen
const detachPolicyLongDesc = `If the environment has no more policies attached to it, then its snapshots' status will become "unknown".`

const detachPolicyExample = `
# detach policy from multiple environment:
# detach policy from multiple environments:
kosli detach-policy yourPolicyName \
--environment yourFirstEnvironmentName \
--environment yourSecondEnvironmentName \
Expand Down
2 changes: 1 addition & 1 deletion cmd/kosli/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func KosliGenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(st
// Some titles have a trailing colon, some don't
title := strings.Trim(exampleLines[0], ":")
if len(title) > 0 {
buf.WriteString(fmt.Sprintf("**%s**\n\n", strings.TrimSpace(title[1:])))
buf.WriteString(fmt.Sprintf("##### %s\n\n", strings.TrimSpace(title[1:])))
buf.WriteString(fmt.Sprintf("```shell\n%s\n```\n\n", strings.Join(exampleLines[1:], "\n")))
}
}
Expand Down
10 changes: 6 additions & 4 deletions cmd/kosli/fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ kosli fingerprint --artifact-type file file.txt
# fingerprint a dir
kosli fingerprint --artifact-type dir mydir

# fingerprint a dir while excluding paths ^mydir/logs^ and ^mydir/*exe^
# fingerprint a dir while excluding paths ` + "`" + `mydir/logs` + "`" + ` and ` + "`" + `mydir/*.exe` + "`" + `
kosli fingerprint --artifact-type dir --exclude logs --exclude *.exe mydir

# fingerprint a dir while excluding all ^.pyc^ files
# fingerprint a dir while excluding all ` + "`" + `.pyc` + "`" + ` files
kosli fingerprint --artifact-type dir --exclude **/*.pyc mydir

# fingerprint a dir while excluding paths in .kosli_ignore file
# fingerprint a dir while excluding paths in ` + "`" + `.kosli_ignore` + "`" + ` file
echo bar/file.txt > mydir/.kosli_ignore
kosli fingerprint --artifact-type dir mydir

Expand All @@ -66,7 +66,9 @@ kosli fingerprint --artifact-type docker nginx:latest
kosli fingerprint --artifact-type oci nginx:latest

# fingerprint a private image from a remote registry
kosli fingerprint --artifact-type oci private:latest --registry-username YourUsername --registry-password YourPassword
kosli fingerprint --artifact-type oci private:latest \\
--registry-username YourUsername \\
--registry-password YourPassword
`

type fingerprintOptions struct {
Expand Down
12 changes: 6 additions & 6 deletions cmd/kosli/testdata/output/docs/snyk.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ binding the attestation to the right artifact.

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

**report a snyk attestation about a pre-built docker artifact (kosli calculates the fingerprint)**
##### report a snyk attestation about a pre-built docker artifact (kosli calculates the fingerprint)

```shell
kosli attest snyk yourDockerImageName
Expand All @@ -74,7 +74,7 @@ kosli attest snyk yourDockerImageName

```

**report a snyk attestation about a pre-built docker artifact (you provide the fingerprint)**
##### report a snyk attestation about a pre-built docker artifact (you provide the fingerprint)

```shell
kosli attest snyk
Expand All @@ -84,7 +84,7 @@ kosli attest snyk

```

**report a snyk attestation about a trail**
##### report a snyk attestation about a trail

```shell
kosli attest snyk
Expand All @@ -93,7 +93,7 @@ kosli attest snyk

```

**report a snyk attestation about an artifact which has not been reported yet in a trail**
##### report a snyk attestation about an artifact which has not been reported yet in a trail

```shell
kosli attest snyk
Expand All @@ -103,7 +103,7 @@ kosli attest snyk

```

**report a snyk attestation about a trail with an attachment**
##### report a snyk attestation about a trail with an attachment

```shell
kosli attest snyk
Expand All @@ -113,7 +113,7 @@ kosli attest snyk

```

**report a snyk attestation about a trail without uploading the snyk results file**
##### report a snyk attestation about a trail without uploading the snyk results file

```shell
kosli attest snyk
Expand Down