Skip to content

Commit 50374d0

Browse files
Merge pull request #4671 from harness/sto-onboarding-tweaks-sto-6833
STO tutorial tweaks STO-6833
2 parents cfc9bc9 + 08a975b commit 50374d0

File tree

11 files changed

+108
-52
lines changed

11 files changed

+108
-52
lines changed

docs/security-testing-orchestration/get-started/key-concepts/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"label": "Key concepts in STO",
3-
"position": 3,
3+
"position": 40,
44
"collapsible": "true",
55
"collapsed": "true",
66
"className": "red",

docs/security-testing-orchestration/get-started/onboarding-guide.md

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ redirect_from:
1111
---
1212

1313
```mdx-code-block
14-
import set_up_harness_19 from './static/set-up-harness-for-sto-19.png'
1514
import set_up_harness_20 from './static/set-up-harness-for-sto-20.png'
16-
import set_up_harness_20_NEW from './static/setup-tutorial-create-base-pipeline-select-module.png'
15+
import set_up_harness_20_NEW from './static/set_up_harness_20_NEW.png'
1716
import set_up_harness_21 from './static/set-up-harness-for-sto-21.png'
1817
import set_up_harness_22 from './static/set-up-harness-for-sto-22.png'
1918
import set_up_harness_23 from './static/set-up-harness-for-sto-23.png'
@@ -92,16 +91,25 @@ You need Administrative privileges at the Account level (Account Admin role) to
9291

9392
You need a Harness build infrastructure to run scans in STO. First, review the supported build infrastructures in [What's supported in Harness STO](/docs/security-testing-orchestration/whats-supported). Then select the infrastructure you want to use:
9493

95-
- [Harness Cloud build infrastructure](#use-harness-cloud-build-infrastructure-for-sto) This is the simplest option. No initial setup is required.
96-
- [Local Kubernetes build infrastructure](#install-a-kubernetes-delegate-for-sto) Recommended when you want to run ephemeral builds-at-scale in your own infrastructure.
97-
- [Local Docker build infrastructure](#install-a-local-docker-delegate-for-sto) Recommended for small, limited builds, such as a one-off build on your local machine.
94+
- [Harness Cloud](/docs/continuous-integration/use-ci/set-up-build-infrastructure/use-harness-cloud-build-infrastructure)
9895

99-
#### Use Harness Cloud build infrastructure for STO
96+
This is the simplest option. Not initial setup is required. Run your pipelines on Harness-hosted VMs preconfigured with tools, packages, and settings commonly used in CI pipelines.
10097

101-
With Harness Cloud, you can run builds in isolation on Harness-hosted VMs that are preconfigured with tools, packages, and settings commonly used in CI pipelines. Harness hosts, maintains, and upgrades these machines so that you can focus on building software instead of maintaining build infrastructure. No initial setup is required.
98+
- [Local Kubernetes build infrastructure](docs/continuous-integration/use-ci/set-up-build-infrastructure/k8s-build-infrastructure/set-up-a-kubernetes-cluster-build-infrastructure/)
10299

103-
For more information, go to [Use Harness Cloud build infrastructure](/docs/continuous-integration/use-ci/set-up-build-infrastructure/use-harness-cloud-build-infrastructure).
100+
Recommended when you want to run ephemeral builds-at-scale in your own infrastructure.
104101

102+
- [Local Docker build infrastructure](/docs/continuous-integration/use-ci/set-up-build-infrastructure/define-a-docker-build-infrastructure)
103+
104+
Recommended for small, limited builds, such as a one-off build on your local machine.
105+
106+
:::note
107+
108+
Kubernetes and Docker infrastructures might also require a Docker-in-Docker background step in your pipeline. For more information, go to [Docker-in-Docker requirements for STO](/docs/security-testing-orchestration/sto-techref-category/security-step-settings-reference#docker-in-docker-requirements-for-sto).
109+
110+
:::
111+
112+
<!--
105113
106114
#### Install a Kubernetes delegate for STO
107115
@@ -165,6 +173,8 @@ A local runner build infrastructure is recommended for small, limited builds, su
165173
166174
For more information, go to [Set up a local runner build infrastructure](/docs/continuous-integration/use-ci/set-up-build-infrastructure/define-a-docker-build-infrastructure) in the CI documentation.
167175
176+
-->
177+
168178

169179
### Create secrets for your Git and DockerHub access credentials
170180

@@ -251,35 +261,37 @@ To do the STO tutorials, point the connector at the following repo: <https://git
251261

252262
</details>
253263

254-
## Create a base pipeline for STO
264+
## Next steps
255265

256-
The following procedure creates a pipeline with the STO functionality required to run scans on your repos, images, and instances. Once you set up this pipeline, you can clone it to a new pipeline and update the pipeline to set up your scans.
266+
Now that you've set up Harness, you're ready to start using STO.
257267

258-
This workflow is covered in [Your first STO pipeline](/tutorials/security-tests/your-first-sto-pipeline).
268+
A good next step is to go through [Your first STO pipeline](/tutorials/security-tests/your-first-sto-pipeline). This tutorial covers the basic concepts of STO. You'll set up a standalone pipeline with one scanner, run scans, analyze the results, and learn how to investigate and fix detected vulnerabilities.
259269

260-
### Add a Security Test stage
270+
The [STO tutorials](/tutorials/security-tests) also include a set of quickstarts and end-to-end workflows that show you how to create pipelines that you can apply to a wide variety of security-related use cases.
261271

262-
1. In the Pipeline Studio, select **Home** > **Projects** and choose the project where you want to create the pipeline.
272+
Happy scanning!
263273

264-
<!-- import set-up-harness-19 from './static/set-up-harness-for-sto-19.png' -->
274+
<!--
265275
266-
```mdx-code-block
267-
<img src={set_up_harness_19} alt="Choose the project" height="50%" width="75%" />
268-
```
276+
## Create a base pipeline for STO
277+
278+
The following procedure creates a pipeline with the STO functionality required to run scans on your repos, images, and instances. This pipeline uses [Bandit](https://github.com/PyCQA/bandit), an open-source tool designed to find common security issues in Python code. Once you set up this pipeline, you can clone it to a new pipeline and update the pipeline to set up your scans.
279+
280+
This workflow is covered in [Your first STO pipeline](/tutorials/security-tests/your-first-sto-pipeline).
281+
282+
### Add a Security Test stage
269283
270-
<!-- ![](./static/set-up-harness-for-sto-19.png) -->
284+
1. In the Pipeline Studio, go to the project where you want to create the pipeline.
271285
272-
2. Select **Select Modules** (left menu) and then select **Security Tests**.
286+
2. Select **Security Testing Orchestration** (top left) > **Pipelines** > **Create a Pipeline**.
273287
274-
<!--
275288
```mdx-code-block
276289
<img src={set_up_harness_20_NEW} alt="Choose the STO module" height="50%" width="50%" />
277290
```
278-
-->
291+
279292
280293
3. In Create New Pipeline:
281-
1. Select **Pipelines** > **Create a Pipeline**.
282-
2. In Create new Pipeline > Name, enter **sto-pipeline-base**.
294+
1. For Name, enter **sto-pipeline-base**.
283295
3. Select **Start**.
284296
285297
```mdx-code-block
@@ -289,8 +301,10 @@ This workflow is covered in [Your first STO pipeline](/tutorials/security-tests/
289301
4. In About your Stage:
290302
1. Select **Add Stage** and then **Security Tests**.
291303
2. Stage Name = **securityTestStage**
292-
3. Connector = The connector you created in [Create a Codebase Connector](#create-a-codebase-connector).
293-
4. Select **Set Up Stage**.
304+
3. Configure Codebase:
305+
1. Select **Third-party Git provider** (if this option is available)
306+
2. Connector = The connector you created in [Create a Codebase Connector](#create-a-codebase-connector)
307+
3. Repository Name = **dvpwa**
294308
295309
```mdx-code-block
296310
<img src={set_up_harness_22} alt="Set up the stage" height="50%" width="50%" />
@@ -326,7 +340,7 @@ In the **Execution** tab, do the following:
326340
```mdx-code-block
327341
<img src={set_up_harness_25} alt="Configure the background step" height="75%" width="75%" />
328342
```
329-
-->
343+
330344
331345
### Add a Bandit scanner step
332346
@@ -336,7 +350,7 @@ import set_up_harness_26 from './static/configure-bandit-step.png'
336350
```
337351
338352
339-
1. In the Execution tab, select **Add Step** and then **Bandit**.
353+
1. In the Execution tab, select **Add Step** > **Security Tests** > **Bandit**.
340354
2. Configure the step as follows:
341355
1. Scan Mode = **`Orchestration`**
342356
2. Target Name = `**dvpwa**`
@@ -361,8 +375,12 @@ import set_up_harness_26 from './static/configure-bandit-step.png'
361375
2. Select Git Branch, enter **master** for the branch name, and then select **Run Pipeline**.
362376
3. When the pipeline finishes, select the **Security Tests** tab to see the dashboard.
363377
378+
379+
364380
# Congratulations!
365381
366382
You now have the build infrastructure, connectors, and pipeline required to build a pipeline and run security scans. You can simply clone the pipeline you just created and configure new pipelines based on your security requirements.
367383
368384
![](./static/set-up-harness-for-sto-27.png)
385+
386+
-->
8.92 KB
Loading
42.1 KB
Loading
-27.2 KB
Binary file not shown.
Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
---
22
title: STO Tutorials
33
description: Get started with STO
4-
sidebar_position: 4
4+
sidebar_position: 30
55
redirect_from:
66
- /docs/security-testing-orchestration/onboard-sto/sto-tutorials
77
---
88

99

10-
The following workflows and [tutorials](/tutorials/security-tests) are available. Harness recommends you do them in this order.
10+
The following workflows and [tutorials](/tutorials/security-tests) are available.
1111

12-
1. [Set up Harness for STO](/docs/security-testing-orchestration/get-started/onboarding-guide) This is a good primer if you're new to Harness. It guides you through the process of setting up your connectors, delegate, and build infrastructure. Then it guides you through the process of setting up a simple standalone STO pipeline.
12+
- Getting started:
13+
14+
- [Set up Harness for STO](/docs/security-testing-orchestration/get-started/onboarding-guide) This is a good primer if you're new to Harness. It guides you through the process of setting up the connectors, delegate, and infrastructure needed to run STO scans.
1315

14-
2. [Your first STO pipeline](/tutorials/security-tests/your-first-sto-pipeline) This tutorial covers the basic concepts of STO. You'll set up a standalone pipeline with one scanner, run scans, analyze the results, and learn how to investigate and fix detected vulnerabilities.
16+
- [Your first STO pipeline](/tutorials/security-tests/your-first-sto-pipeline) This tutorial covers the basic concepts of STO. You'll set up a standalone pipeline with one scanner, run scans, analyze the results, and learn how to investigate and fix detected vulnerabilities.
17+
18+
- Quickstarts:
19+
20+
- [SAST code scans using Semgrep](/tutorials/security-tests/sast-scan-semgrep) This "quick-start" tutorial shows you how to scan your codebases using [Semgrep](https://semgrep.dev), which can scan a [wide variety of languages](https://semgrep.dev/docs/supported-languages/) and includes a [free version](https://semgrep.dev/pricing/).
21+
22+
- [Container image scans with Aqua Trivy](/tutorials/security-tests/container-scan-aqua-trivy) This "quick-start" tutorial shows you how to scan your container images using [Aqua Trivy](https://www.aquasec.com/products/trivy/), a popular open-source scanning tool.
23+
24+
- [Trigger automated scans using GitLab merge requests](/tutorials/security-tests/gitlab-ci-integration) This tutorial shows how you can set up a STO pipeline that runs a build and scans a code repository automatically in response to a Git event.
25+
26+
- Integrated end-to-end workflows:
1527

16-
3. [SAST code scans using Semgrep](/tutorials/security-tests/sast-scan-semgrep) This "quick-start" tutorial shows you how to scan your codebases using [Semgrep](https://semgrep.dev), which can scan a [wide variety of languages](https://semgrep.dev/docs/supported-languages/) and includes a [free version](https://semgrep.dev/pricing/).
28+
- [Create a build-scan-push pipeline (STO only)](/tutorials/security-tests/build-scan-push-sto-only) Set up an end-to-end STO pipeline that scans your codebase. Then it builds an image and scans it. If the image scan detects no critical issues, the pipeline pushes the image to your registry.
1729

18-
4. [Container image scans with Aqua Trivy](/tutorials/security-tests/container-scan-aqua-trivy) This "quick-start" tutorial shows you how to scan your container images using [Aqua Trivy](https://www.aquasec.com/products/trivy/), a popular open-source scanning tool.
30+
- [Create a build-scan-push pipeline (STO and CI)](/tutorials/security-tests/build-scan-push-sto-ci) Set up an end-to-end STO/CI pipeline that scans your codebase, builds/pushes a test image, and then scans it. If there are no critical issues, the pipeline builds/pushes a prod image.
1931

20-
5. [Trigger automated scans using GitLab merge requests](/tutorials/security-tests/gitlab-ci-integration) This tutorial shows how you can set up a STO pipeline that runs a build and scans a code repository automatically in response to a Git event.
32+

src/components/LandingPage/data/securityTestingOrchestrationData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const STOList: CardItem[] = [
109109
module: MODULES.sto,
110110
icon: "img/icon_sto.svg",
111111
description: (
112-
<>Set up an end-to-end STO/CI pipeline that scans your codebase, builds/pushes a test image, and then scans it. If there are no critical issues, the pipeline builds a prod image and pushes it to your registry. </>
112+
<>Set up an end-to-end STO/CI pipeline that scans your codebase, builds/pushes a test image, and then scans it. If there are no critical issues, the pipeline builds/pushes a prod image. </>
113113
),
114114
newDoc: true,
115115
type: [docType.Documentation],

tutorials/security-tests/build-scan-push-sto-ci.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,23 @@ Do the following:
106106

107107
6. In the Pipeline Editor, go to **Infrastructure** and select **Cloud**, **Linux**, and **AMD64** for the infrastructure, OS, and architecture.
108108

109-
You can also use a [Kubernetes](/docs/category/set-up-kubernetes-cluster-build-infrastructures) or [Docker](/docs/continuous-integration/use-ci/set-up-build-infrastructure/define-a-docker-build-infrastructure) infrastructure, but these require additional work to set up.
109+
You can also use a Kubernetes or Docker build infrastructure, but these require additional work to set up. For more information, go to [Set up a build infrastructure for STO](/docs/security-testing-orchestration/get-started/onboarding-guide#set-up-a-build-infrastructure-for-sto).
110+
111+
:::note
112+
113+
The following step is required for Kubernetes or Docker infrastructures only. If you're using Harness Cloud, go to [Scan the code](#scan-the-code).
114+
115+
:::
116+
117+
118+
### Add a Docker-in-Docker background step
119+
120+
```mdx-code-block
121+
import StoDinDRequirements from '/docs/security-testing-orchestration/sto-techref-category/shared/dind-bg-step.md';
122+
```
123+
124+
<StoDinDRequirements />
125+
110126

111127
## Scan the code
112128

tutorials/security-tests/build-scan-push-sto-only.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,22 @@ Do the following:
102102

103103
6. In the Pipeline Editor, go to **Infrastructure** and select **Cloud**, **Linux**, and **AMD64** for the infrastructure, OS, and architecture.
104104

105-
You can also use a [Kubernetes](/docs/category/set-up-kubernetes-cluster-build-infrastructures) or [Docker](/docs/continuous-integration/use-ci/set-up-build-infrastructure/define-a-docker-build-infrastructure) infrastructure, but these require additional work to set up.
105+
You can also use a Kubernetes or Docker build infrastructure, but these require additional work to set up. For more information, go to [Set up a build infrastructure for STO](/docs/security-testing-orchestration/get-started/onboarding-guide#set-up-a-build-infrastructure-for-sto).
106+
107+
:::note
108+
109+
The following step is required for Kubernetes or Docker infrastructures only. If you're using Harness Cloud, go to [Add the codebase scan step](#add-the-codebase-scan-step).
110+
111+
:::
112+
113+
### Add a Docker-in-Docker background step
114+
115+
```mdx-code-block
116+
import StoDinDRequirements from '/docs/security-testing-orchestration/sto-techref-category/shared/dind-bg-step.md';
117+
```
118+
119+
<StoDinDRequirements />
120+
106121

107122
## Add the codebase scan step
108123

tutorials/security-tests/container-scan-aqua-trivy.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,16 @@ Do the following:
4747

4848
3. In the Pipeline Editor, go to **Infrastructure** and select **Cloud**, **Linux**, and **AMD64** for the infrastructure, OS, and architecture.
4949

50-
You can also use a [Kubernetes](/docs/category/set-up-kubernetes-cluster-build-infrastructures) or [Docker](/docs/continuous-integration/use-ci/set-up-build-infrastructure/define-a-docker-build-infrastructure) infrastructure, but these require additional work to set up.
50+
You can also use a Kubernetes or Docker build infrastructure, but these require additional work to set up. For more information, go to [Set up a build infrastructure for STO](/docs/security-testing-orchestration/get-started/onboarding-guide#set-up-a-build-infrastructure-for-sto).
5151

52-
<!--
53-
4. Set up your codebase:
52+
:::note
5453

55-
1. Select **Codebase** (right menu).
56-
57-
2. Select your codebase connector.
58-
59-
3. Select **Runtime Input** as the value type for the repository name. You will specify the repo when you run the pipeline.
60-
61-
![](./static/sast-semgrep-tutorial/codebase-repo-type-input.png)
62-
63-
-->
54+
The following step is required only for Kubernetes or Docker infrastructures. If you're using Harness Cloud, go to [Add the Aqua-Trivy scan step](#add-the-aqua-trivy-scan-step).
6455

56+
:::
6557

66-
### Add the Docker-in-Docker background step
6758

59+
### Add a Docker-in-Docker background step
6860

6961
```mdx-code-block
7062
import StoDinDRequirements from '/docs/security-testing-orchestration/sto-techref-category/shared/dind-bg-step.md';
@@ -73,6 +65,8 @@ import StoDinDRequirements from '/docs/security-testing-orchestration/sto-techre
7365
<StoDinDRequirements />
7466

7567

68+
69+
7670
### Add the Aqua-Trivy scan step
7771

7872
```mdx-code-block

0 commit comments

Comments
 (0)