Skip to content

Commit 8abd069

Browse files
authored
Change hints in tutorials (#717)
Hints were being used with syntax {{< hint info >}} rather than {{% hint info %}} which prevents markdown from being rendered within the block. Changing so that markdown renders correctly
1 parent 9761c36 commit 8abd069

4 files changed

Lines changed: 28 additions & 28 deletions

File tree

docs.kosli.com/content/tutorials/attest_snyk.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Snyk scans analyze your source code, docker images and IaC source for security i
1313

1414
In this tutorial, we will see how you can run and attest different types of Snyk scans to Kosli. We will run the scans on the [Kosli CLI git repo](https://github.com/kosli-dev/cli).
1515

16-
{{<hint info>}}
16+
{{% hint info %}}
1717
While snyk attestations can be bound to a trail or an artifact in a trail, this tutorial
1818
demonstrates it only on trails for simplicity.
19-
{{</hint>}}
19+
{{% /hint %}}
2020

2121
## Getting ready
2222

@@ -46,9 +46,9 @@ We will start by creating a flow in Kosli to contain Trails and Artifacts for th
4646
kosli create flow snyk-demo --use-empty-template
4747
```
4848

49-
{{<hint info>}}
49+
{{% hint info %}}
5050
`--use-empty-template` indicates that this flow does not have a predefined set of required attestations.
51-
{{</hint>}}
51+
{{% /hint %}}
5252

5353
Then, we can start a trail to bind our snyk attestations to.
5454

@@ -58,10 +58,10 @@ kosli begin trail test-1 --flow snyk-demo
5858

5959
Now we can start running Snyk scans and attest them to this trail.
6060

61-
{{<hint info>}}
61+
{{% hint info %}}
6262
After each attestation in the sections below, you can navigate to:
6363
**https://app.kosli.com/\<your-personal-org-name\>/flows/snyk-demo/trails/test-1** to view the status of the trail in Kosli.
64-
{{</hint>}}
64+
{{% /hint %}}
6565

6666
## Snyk Open source scan
6767

@@ -74,9 +74,9 @@ snyk test --sarif-file-output=os.json
7474
kosli attest snyk --flow snyk-demo --trail test-1 --name open-source-scan --scan-results os.json --commit HEAD
7575
```
7676

77-
{{<hint info>}}
77+
{{% hint info %}}
7878
`--commit` allows you to relate the attestation to a specific git commit.
79-
{{</hint>}}
79+
{{% /hint %}}
8080

8181

8282
## Snyk Code scan

docs.kosli.com/content/tutorials/cli_and_http_proxy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ This tutorial shows how you can setup an HTTP proxy and use it when communicatin
1616
If you already have an HTTP proxy, [start using it with Kosli CLI](#use-the-http-proxy-with-kosli-cli)
1717

1818

19-
{{<hint info>}}
19+
{{% hint info %}}
2020
In this tutorial, we will setup Tinyproxy (in docker) as an HTTP proxy on a Mac machine.
2121
The same steps apply for different HTTP proxies and machines, but commands will differ.
22-
{{</hint>}}
22+
{{% /hint %}}
2323

2424

2525
## Start the HTTP proxy

docs.kosli.com/content/tutorials/evaluate_trails_with_opa.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ To follow this tutorial, you need to:
2323
export KOSLI_API_TOKEN=<your-api-token>
2424
```
2525

26-
{{<hint info>}}
26+
{{% hint info %}}
2727
You don't need OPA installed — the Kosli CLI has a built-in Rego evaluator. You just need to write a `.rego` policy file.
28-
{{</hint>}}
28+
{{% /hint %}}
2929

3030
## Step 2: Write a policy
3131

@@ -58,13 +58,13 @@ Let's break down what this policy does:
5858
* **`violations`** — a set of messages describing why the policy failed. The rule iterates over trails, then over pull requests within the `pull-request` attestation, looking for PRs where `approvers` is empty.
5959
* **`allow`** — trails are allowed only when there are no violations.
6060

61-
{{<hint info>}}
61+
{{% hint info %}}
6262
**Policy contract** — these are Kosli-specific conventions, not OPA built-ins:
6363

6464
* **`package policy`** — required. Kosli queries `data.policy.*` to find your rules.
6565
* **`allow`** — required. Must evaluate to a **boolean**. Kosli exits with code 0 when `true`, code 1 when `false`.
6666
* **`violations`** — optional but recommended. Must be a **set of strings**, where each string is a human-readable reason the policy failed. Kosli displays these when `allow` is `false`.
67-
{{</hint>}}
67+
{{% /hint %}}
6868

6969
## Step 3: Evaluate multiple trails
7070

@@ -153,9 +153,9 @@ RESULT: ALLOWED
153153

154154
The trail has zero high-severity vulnerabilities, so the policy allows it.
155155

156-
{{<hint info>}}
156+
{{% hint info %}}
157157
When writing a policy for `kosli evaluate trail`, reference `input.trail` (a single object). For `kosli evaluate trails`, reference `input.trails` (an array). The data shapes differ, so use separate policies for each command.
158-
{{</hint>}}
158+
{{% /hint %}}
159159

160160
## Step 5: Explore the policy input with --show-input
161161

@@ -196,9 +196,9 @@ kosli evaluate trail \
196196
]
197197
```
198198

199-
{{<hint info>}}
199+
{{% hint info %}}
200200
Use the `--attestations` flag to limit which attestations are enriched with full detail. The flag filters by **attestation name** (not type). For example, `--attestations pull-request` fetches only details for attestations named `pull-request`, which speeds up evaluation and reduces noise when exploring the input.
201-
{{</hint>}}
201+
{{% /hint %}}
202202

203203
## Step 6: Use in CI/CD
204204

@@ -268,9 +268,9 @@ This creates a generic attestation on the trail with:
268268
* **`--user-data`** containing the violations, which appear in the Kosli UI as
269269
structured metadata on the attestation
270270

271-
{{<hint warning>}}
271+
{{% hint warning %}}
272272
Use `--compliant=value` (with `=`) not `--compliant value` (with a space). Boolean
273273
flags in Kosli CLI require the `=` syntax when passing `false` — otherwise `false`
274274
is interpreted as a positional argument. See the
275275
[boolean flags FAQ](/faq/#boolean-flags).
276-
{{</hint>}}
276+
{{% /hint %}}

docs.kosli.com/content/tutorials/unauthorized_iac_changes.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ kosli create flow tf-tutorial --use-empty-template
4545

4646
## Making and tracking an authorized change
4747

48-
{{<hint info>}}
48+
{{% hint info %}}
4949
In production, an authorized change will normally go though CI.
5050
In this tutorial, however, we run the commands that you would otherwise do in CI locally for simplicity.
51-
{{</hint>}}
51+
{{% /hint %}}
5252

5353
Let's create a trail to represent a single instance of making an authorized change. We will call it `authorized-1`.
5454

@@ -74,13 +74,13 @@ Finally, we apply the terraform plan, and attest the produced terraform state fi
7474
This will calculate a SHA256 fingerprint for the state file based on its contents. The fingerprint will later be used to determine if a change is
7575
authorized or not.
7676

77-
{{<hint info>}}
77+
{{% hint info %}}
7878
In this tutorial, we use a simple setup where the terraform state file is stored locally.
7979
In production cases, however, the state file would be stored in some cloud storage (e.g. AWS S3).
8080
In such cases, you would need to download the state file from the remote backend after it was updated by the authorized change.
8181

8282
Note that we set both `--build-url` and `--commit-url` to fake URLs. These are normally defaulted in CI.
83-
{{</hint>}}
83+
{{% /hint %}}
8484

8585
```shell {.command}
8686
terraform apply -auto-approve tf.plan
@@ -102,11 +102,11 @@ kosli create env terraform-state --type=server
102102

103103
We can report the state file to the environment we created:
104104

105-
{{<hint info>}}
105+
{{% hint info %}}
106106
In this tutorial, we run the environment reporting manually.
107107
In production, you would configure the environment reporting to run periodically or on changes.
108108
See [reporting AWS environments](../report_aws_envs) if you are using S3 as a backend for your state files.
109-
{{</hint>}}
109+
{{% /hint %}}
110110

111111
```shell {.command}
112112
kosli snapshot path terraform-state --name=tf-state --path=terraform.tfstate
@@ -140,10 +140,10 @@ terraform apply --auto-approve
140140

141141
This updates the state file. Let's report the updated state file to the Kosli environment.
142142

143-
{{<hint info>}}
143+
{{% hint info %}}
144144
In production, this step won't be necessary because you would have configured environment reporting to happen
145145
automatically (either on state file change or periodically).
146-
{{</hint>}}
146+
{{% /hint %}}
147147

148148
```shell {.command}
149149
kosli snapshot path terraform-state --name=tf-state --path=terraform.tfstate

0 commit comments

Comments
 (0)