Skip to content

Commit 4e7b419

Browse files
authored
Merge pull request #462 from kosli-dev/minor-cli-reference-tidying
cli reference text fixing and tidying
2 parents 2c008ed + 40a87ca commit 4e7b419

File tree

6 files changed

+22
-21
lines changed

6 files changed

+22
-21
lines changed

cmd/kosli/attestCustom.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ const attestCustomShortDesc = `Report a custom attestation to an artifact or a t
2626

2727
const attestCustomLongDesc = attestCustomShortDesc + `
2828
The name of the custom attestation type is specified using the ^--type^ flag.
29-
` + attestationBindingDesc + commitDescription
29+
The path to the JSON file the custom type will evaluate is specified using the ^--attestation-data^ flag.
30+
` + attestationBindingDesc + `
31+
32+
` + commitDescription
3033

3134
const attestCustomExample = `
3235
# report a custom attestation about a pre-built container image artifact (kosli finds the fingerprint):
3336
kosli attest custom yourDockerImageName \
3437
--artifact-type oci \
3538
--type customTypeName \
3639
--name yourAttestationName \
37-
--data yourCustomData \
40+
--attestation-data yourJsonFilePath \
3841
--flow yourFlowName \
3942
--trail yourTrailName \
4043
--api-token yourAPIToken \
@@ -45,7 +48,7 @@ kosli attest custom \
4548
--fingerprint yourDockerImageFingerprint \
4649
--type customTypeName \
4750
--name yourAttestationName \
48-
--data yourCustomData \
51+
--attestation-data yourJsonFilePath \
4952
--flow yourFlowName \
5053
--trail yourTrailName \
5154
--api-token yourAPIToken \
@@ -55,7 +58,7 @@ kosli attest custom \
5558
kosli attest custom \
5659
--type customTypeName \
5760
--name yourAttestationName \
58-
--data yourCustomData \
61+
--attestation-data yourJsonFilePath \
5962
--flow yourFlowName \
6063
--trail yourTrailName \
6164
--api-token yourAPIToken \
@@ -65,7 +68,7 @@ kosli attest custom \
6568
kosli attest custom \
6669
--type customTypeName \
6770
--name yourTemplateArtifactName.yourAttestationName \
68-
--data yourCustomData \
71+
--attestation-data yourJsonFilePath \
6972
--flow yourFlowName \
7073
--trail yourTrailName \
7174
--commit yourArtifactGitCommit \
@@ -76,7 +79,7 @@ kosli attest custom \
7679
kosli attest custom \
7780
--type customTypeName \
7881
--name yourAttestationName \
79-
--data yourCustomData \
82+
--attestation-data yourJsonFilePath \
8083
--flow yourFlowName \
8184
--trail yourTrailName \
8285
--attachments yourAttachmentPathName \

cmd/kosli/attestation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"github.com/kosli-dev/cli/internal/requests"
1010
)
1111

12-
const commitDescription = `You can optionally associate the attestation to a git commit using ^--commit^ (requires access to a git repo). And you
13-
can optionally redact some of the git commit data sent to Kosli using ^--redact-commit-info^.
14-
Note that when the attestation is reported for an artifact that does not yet exist in Kosli, ^--commit^ becomes required to facilitate
12+
const commitDescription = `You can optionally associate the attestation to a git commit using ^--commit^ (requires access to a git repo).
13+
You can optionally redact some of the git commit data sent to Kosli using ^--redact-commit-info^.
14+
Note that when the attestation is reported for an artifact that does not yet exist in Kosli, ^--commit^ is required to facilitate
1515
binding the attestation to the right artifact.`
1616

1717
type URLInfo struct {

cmd/kosli/root.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ images in registries or "docker" for local docker images.
5151

5252
attestationBindingDesc = `
5353
54-
The attestation can be bound to a trail using the trail name.
55-
56-
If the attestation is for an artifact, the attestation can be bound to the artifact using one of two ways:
54+
The attestation can be bound to a *trail* using the trail name.
55+
The attestation can be bound to an *artifact* in two ways:
5756
- using the artifact's SHA256 fingerprint which is calculated (based on the ^--artifact-type^ flag and the artifact name/path argument) or can be provided directly (with the ^--fingerprint^ flag).
5857
- using the artifact's name in the flow yaml template and the git commit from which the artifact is/will be created. Useful when reporting an attestation before creating/reporting the artifact.`
5958
awsAuthDesc = `
@@ -77,7 +76,7 @@ The service principal needs to have the following permissions:
7776
`
7877
kosliIgnoreDesc = `To specify paths in a directory artifact that should always be excluded from the SHA256 calculation, you can add a ^.kosli_ignore^ file to the root of the artifact.
7978
Each line should specify a relative path or path glob to be ignored. You can include comments in this file, using ^#^.
80-
The ^.kosli_ignore^ will be treated as part of the artifact like any other file,unless it is explicitly ignored itself.`
79+
The ^.kosli_ignore^ will be treated as part of the artifact like any other file, unless it is explicitly ignored itself.`
8180

8281
// flags
8382
apiTokenFlag = "The Kosli API token."

cmd/kosli/snapshotPath.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const snapshotPathShortDesc = `Report a snapshot of a single artifact running in
2020
const snapshotPathLongDesc = snapshotPathShortDesc + `
2121
You can report a directory or file artifact. For reporting multiple artifacts in one go, use "kosli snapshot paths".
2222
You can exclude certain paths or patterns from the artifact fingerprint using ^--exclude^.
23-
The supported glob pattern syntax is what is documented here: https://pkg.go.dev/path/filepath#Match ,
23+
The supported glob pattern syntax is documented here: https://pkg.go.dev/path/filepath#Match ,
2424
plus the ability to use recursive globs "**"
2525
2626
` + kosliIgnoreDesc

cmd/kosli/snapshotPaths.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const pathSpecFileDesc = `Paths files can be in YAML, JSON or TOML formats.
1919
They specify a list of artifacts to fingerprint. For each artifact, the file specifies a base path to look for the artifact in
2020
and (optionally) a list of paths to exclude. Excluded paths are relative to the artifact path(s) and can be literal paths or
2121
glob patterns.
22-
The supported glob pattern syntax is what is documented here: https://pkg.go.dev/path/filepath#Match ,
22+
The supported glob pattern syntax is documented here: https://pkg.go.dev/path/filepath#Match ,
2323
plus the ability to use recursive globs "**"
2424
2525
` + kosliIgnoreDesc + `

cmd/kosli/testdata/output/docs/snyk.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ By default, the `--scan-results` .json file is also uploaded to Kosli's evidence
1919
You can disable that by setting `--upload-results=false`
2020

2121

22-
The attestation can be bound to a trail using the trail name.
23-
24-
If the attestation is for an artifact, the attestation can be bound to the artifact using one of two ways:
22+
The attestation can be bound to a *trail* using the trail name.
23+
The attestation can be bound to an *artifact* in two ways:
2524
- using the artifact's SHA256 fingerprint which is calculated (based on the `--artifact-type` flag and the artifact name/path argument) or can be provided directly (with the `--fingerprint` flag).
2625
- using the artifact's name in the flow yaml template and the git commit from which the artifact is/will be created. Useful when reporting an attestation before creating/reporting the artifact.
2726

28-
You can optionally associate the attestation to a git commit using `--commit` (requires access to a git repo). And you
29-
can optionally redact some of the git commit data sent to Kosli using `--redact-commit-info`.
30-
Note that when the attestation is reported for an artifact that does not yet exist in Kosli, `--commit` becomes required to facilitate
27+
You can optionally associate the attestation to a git commit using `--commit` (requires access to a git repo).
28+
You can optionally redact some of the git commit data sent to Kosli using `--redact-commit-info`.
29+
Note that when the attestation is reported for an artifact that does not yet exist in Kosli, `--commit` is required to facilitate
3130
binding the attestation to the right artifact.
3231

3332
```shell

0 commit comments

Comments
 (0)