Skip to content

Commit

Permalink
Merge branch 'develop' into fix/improper-indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AleJo2995 authored Sep 13, 2023
2 parents 641e7d1 + dd9e3bc commit 546d0d9
Show file tree
Hide file tree
Showing 28 changed files with 535 additions and 76 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@

<!--next-version-placeholder-->

## v2.3.0 (2023-09-06)
### Feature
* Extend multiple templates validation to trestle author folders ([#1430](https://github.com/IBM/compliance-trestle/issues/1430)) ([`c7bef58`](https://github.com/IBM/compliance-trestle/commit/c7bef589a6e671b96170e93feb88c6436a094da6))
* Adds agile authoring functionality to public API in repository.py ([#1432](https://github.com/IBM/compliance-trestle/issues/1432)) ([`08b2559`](https://github.com/IBM/compliance-trestle/commit/08b255902efb911c99422d49920c5ddaea98ef32))
* Support validation component_type for task csv-to-oscal-cd ([#1431](https://github.com/IBM/compliance-trestle/issues/1431)) ([`80aaa72`](https://github.com/IBM/compliance-trestle/commit/80aaa72fe96217d1c7dd93e4c1d5bd9c34cb012b))

### Fix
* Correcting typo ([`1810007`](https://github.com/IBM/compliance-trestle/commit/181000731ada7af1348219581994bd58f2285329))
* Correcting python semantice release version ([`a8cb9b9`](https://github.com/IBM/compliance-trestle/commit/a8cb9b9f1f11485ac70fa2f35a3e52b917b7a783))
* Moving watch config a level up ([#1447](https://github.com/IBM/compliance-trestle/issues/1447)) ([`ea5607f`](https://github.com/IBM/compliance-trestle/commit/ea5607f9f404f38da1abf1c40f907196ea79c567))
* Xccdf parameter type ([#1440](https://github.com/IBM/compliance-trestle/issues/1440)) ([`431670c`](https://github.com/IBM/compliance-trestle/commit/431670cd468693ca4581ec43d8de5d32413ec113))
* Headings levels validation is not working properly ([#1436](https://github.com/IBM/compliance-trestle/issues/1436)) ([`22b65a9`](https://github.com/IBM/compliance-trestle/commit/22b65a9b84af36d8c12c32c6e5c0dae88208ea49))
* Default set-parameter values as list ([#1438](https://github.com/IBM/compliance-trestle/issues/1438)) ([`419025d`](https://github.com/IBM/compliance-trestle/commit/419025dfad47cf9f61b5e20a35a9683a84ed26e8))
* Expected nist profile missing ([#1435](https://github.com/IBM/compliance-trestle/issues/1435)) ([`c96f9ce`](https://github.com/IBM/compliance-trestle/commit/c96f9ce82e453c83a07d9d4c1061833f38c7f104))
* Provide description and meaning to parameters in markdown ([#1423](https://github.com/IBM/compliance-trestle/issues/1423)) ([`266f67b`](https://github.com/IBM/compliance-trestle/commit/266f67bd220e15922caacb4de0e702f4d0927ceb))

## v2.2.1 (2023-07-05)

### Fix
Expand Down
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
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dev =
setuptools
wheel
yapf
python-semantic-release
python-semantic-release==7.33.2
pep8-naming
pytest-random-order
python-dateutil
Expand All @@ -76,8 +76,8 @@ dev =
types-requests
types-setuptools
# # Docs website
mkdocs
mkdocstrings[python-legacy]>=0.19.0
mkdocs==1.5.0
mkdocstrings[python-legacy]==0.19.0
mkdocs-material
markdown-include
pymdown-extensions
Expand Down
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,13 @@
---
authors: tmp
owner: tmp
valid:
from: null
to: null
x-trestle-template-type: architecture
---
# System architecture

## Overview

## Security model
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
authors: tmp
owner: tmp
valid:
from:
to:
x-trestle-template-type: network
---

# Network architecture

## External interconnections

## Corporate interconnections

## Out of scope interconnections
Loading

0 comments on commit 546d0d9

Please sign in to comment.