Skip to content

Commit

Permalink
Merge pull request #1445 from IBM/develop
Browse files Browse the repository at this point in the history
chore: Trestle release
  • Loading branch information
AleJo2995 authored Sep 6, 2023
2 parents 0260db2 + ea5607f commit 73e125d
Show file tree
Hide file tree
Showing 31 changed files with 1,239 additions and 230 deletions.
55 changes: 55 additions & 0 deletions docs/trestle_author.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,61 @@ Running `trestle author docs validate -tn docs_task -gh="Governed section"` will
- If `--template-version 1.0.0` (`-tv`) is passed the header field `x-trestle-template-version` will be ignored and document will be forcefully validated against template of version `1.0.0`.
Use this for testing purposes _only_ when you need to validate the document against a specific template. By default the template version will be determined based on `x-trestle-template-version` in the document.

### Validating the documents against different templates

Validation against multiple templates as stated before can be done, but there is another scenario that you can leverage on trestle to have multiple documents in the task folder corresponding to a single template.

For that to happen you will need to provide your template with the following parameter at the yaml header level, matching the type of template to be implemented so the validation can occur:

> x-trestle-template-type: insert_template_type_here
Please, take into consideration that for the validation to happen you will also need to provide each instance document in the task folder a field called `x-trestle-template-type: insert_template_type_here` in the yaml header matching with the template name.

```yaml
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: insert_template_type_here
---
```

With that, you will be able to create more than 1 instance document per template and give the instance the desired name.

For instance, let´s consider the next folder structure:

```text
trestle_root
┣ .trestle
┃ ┣ author
┃ ┃ ┣ my_task_2
┃ ┃ ┃ ┣ 0.0.1
┃ ┃ ┃ ┃ ┣ a_template.md
┃ ┃ ┃ ┃ ┣ another_template.md
┃ ┃ ┃ ┃ ┗ arhitecture.drawio
┃ ┗ config.ini
trestle_root
┣ .trestle
┣ my_task_2
┃ ┣ sample_folder_0
┃ ┃ ┣ a_template_1.md
┃ ┃ ┣ a_template_2.md
┃ ┃ ┣ arhitecture_1.drawio
┃ ┃ ┗ another_template_123.md
```

If you noticed, names are no longer needed to match with exact template names, and that´s because validation will run through `x-trestle-template-type` field defined at the instance header, not through the name.

To validate the documents against their respective templates using `x-trestle-template-type`, run:

> trestle author folders validate -tn my_task_name -vtt
Now, `-vtt` stands for validate template type. Validate template type option will provide you the ability to have more than 1 instance per template validated.

</details>

<details markdown>
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ dev =
types-setuptools
# # Docs website
mkdocs
mkdocstrings[python-legacy]>=0.19.0
mkdocstrings[python-legacy]==0.19.0
mkdocs-material
markdown-include
pymdown-extensions
Expand Down
23 changes: 0 additions & 23 deletions tests/data/author/0.0.1/test_1_md_format/bad_instance_reordered.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
x-trestle-template-type: architecture
---

# System architecture

Here is some content

## Overview

And some more

## Security model

And even more
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
x-trestle-template-type: architecture
---

# System architecture

Here is some content

## Overview

And some more

## Security model

And even more
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
x-trestle-template-type: network
---

# Network architecture

Lots of stuff about the network overall including some diagrams.

## External interconnections

Here I put a table which describes the connections beyond my audit boundary with 3rd parties.

## Corporate interconnections

Here I describe interconnections into corporate systems.

## Out of scope interconnections

Here I describe interconnections that are out of scope because they occur outside of the current audit boundary.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
x-trestle-template-type: network
---

# Network architecture

Lots of stuff about the network overall including some diagrams.

## External interconnections

Here I put a table which describes the connections beyond my audit boundary with 3rd parties.

## Corporate interconnections

Here I describe interconnections into corporate systems.

## Out of scope interconnections

Here I describe interconnections that are out of scope because they occur outside of the current audit boundary.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
---

# System architecture

Here is some content

## Overview

And some more

## Security model

And even more
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
---

# System architecture

Here is some content

## Overview

And some more

## Security model

And even more
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
---

# Network architecture

Lots of stuff about the network overall including some diagrams.

## External interconnections

Here I put a table which describes the connections beyond my audit boundary with 3rd parties.

## Corporate interconnections

Here I describe interconnections into corporate systems.

## Out of scope interconnections

Here I describe interconnections that are out of scope because they occur outside of the current audit boundary.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
---

# Network architecture

Lots of stuff about the network overall including some diagrams.

## External interconnections

Here I put a table which describes the connections beyond my audit boundary with 3rd parties.

## Corporate interconnections

Here I describe interconnections into corporate systems.

## Out of scope interconnections

Here I describe interconnections that are out of scope because they occur outside of the current audit boundary.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
---

# Vulnerability Management (VULN) Defect Checks
## 0. Vulnerability Management Workflow
### 0.1 Data Sources
### 0.2 Fetchers
### 0.3 Data Store
### 0.4 Policy Engine
### 0.5 Ticketing System
## 1. Facts Data Model
### 1.1 Devices
#### Server
#### KubernetesCluster
#### ContainerImage
### 1.2 Vulnerabilities
#### ResourceScan
#### ResourceScanFinding
#### ResourceScanResult
### 1.3 Thresholds
#### CISOOverride
#### CISAKEV
### 1.4 Risks
#### VulnDeviations
### 1.5 Scanner Definition
#### ScannerConfiguration
## 2. Defect Checks
### Sub-capability: Reduce Software/ Firmware Vulnerabilities
#### Vulnerable Software/ Firmware
##### Purpose
##### Assessment Criteria
###### Inputs
###### Rules
####### vuln_prod_os_scan_duedate_check
######## Type
######## Rationale Statement
######## Impact Statement
######## Implementation Description
######## Audit Procedure(s)
######## Remediation Procedure(s)
######## Parameters
####### vuln_prod_os_scan_warning_duedate_check_warning
######## Type
######## Rationale Statement
######## Impact Statement
######## Implementation Description
######## Audit Procedure(s)
######## Remediation Procedure(s)
######## Parameters
###### Additional Outputs
##### Assessment Objectives
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
authors:
- Tim
- Jane
- Sally
owner: Joe
valid:
from: 2020-01-01
to: 2099-12-31
---

# { Security Capability Name } Defect Checks
## 1. Facts Data Model
### Sub-Capability: { _insert name of subcapability_}
## 2. Defect Checks
### Sub-capability: { _insert sub-capability name_}
#### { _insert defect check name_}
##### Assessment Criteria
###### Inputs
###### Rules
####### { Rule Name}
######## Type
######## Rationale Statement
######## Impact Statement
######## Implementation Description
######## Audit Procedure(s)
######## Remediation Procedure(s)
######## Parameters
###### Additional Outputs
##### Assessment Objectives
Loading

0 comments on commit 73e125d

Please sign in to comment.