Skip to content

Commit 9a84a8b

Browse files
committed
add id/title to the top and not on the bottom
1 parent 8c78fb1 commit 9a84a8b

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

data-new/BuildAndDeployment/PatchManagement/1/APatchPolicyIsDefined.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
title: A patch policy is defined
3+
id: APatchPolicyIsDefined
24
risk: Vulnerabilities in running containers stay for long and might get exploited.
35
measure: A patch policy for all artifacts (e.g. in images) is defined. How often is
46
an image rebuilt?
@@ -12,6 +14,4 @@ iso27001-2017:
1214
- 12.6.1
1315
- 12.5.1
1416
- 14.2.5
15-
title: A patch policy is defined
16-
id: APatchPolicyIsDefined
1717
...

newFolder-Migration-2021.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ function readYaml($file)
3333
unset($element['level']); // level from folder
3434
$idWithSpace=mb_convert_case($elementName, MB_CASE_TITLE);
3535
$idSanitized = str_replace("/", "Or", $idWithSpace);
36-
$element['title'] = $elementName;
36+
3737
$id = str_replace(" ", "", $idSanitized);
3838
$filePath = $folder . $id . ".yaml";
39+
$element = array('id' => $id) + array('title' => $elementName) + $element; // Add properties to the top
3940
$element['id'] = $id;
4041
$yamlContent = yaml_emit ( $element );
4142

0 commit comments

Comments
 (0)