forked from devsecopsmaturitymodel/DevSecOps-MaturityModel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport-samm.php
46 lines (40 loc) · 1.54 KB
/
report-samm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
include_once "head.php";
?>
<body>
<?php
include_once "navi.php";
?>
<?php
include_once "data.php";
include_once "detail.php";
foreach ($dimensions as $dimension => $subdimensions) {
echo "<h1>Dimension $dimension</h1>";
foreach ($subdimensions as $subdimension => $element) {
echo "<h2>Sub-Dimension $subdimension</h2>";
echo "<h3 style='color:green;'>With SAMM2 Mapping</h3>";
for ($i = 1; $i <= 4; $i++) {
$tableContent .= "<td><ul>";
foreach ($element as $elementName => $content) {
if(array_key_exists("samm2", $content) && !preg_match("/TODO/i", $content["samm2"])) {
$content = getContentForLevelFromSubdimensions($i, $content, $elementName);
if ($content != "") {
printDetail($dimension, $subdimension, $elementName, $dimensions, true);
}
}
}
}
echo "<h3 style='color:red;'>Without SAMM2 Mapping</h3>";
for ($i = 1; $i <= 4; $i++) {
$tableContent .= "<td><ul>";
foreach ($element as $elementName => $content) {
if(!array_key_exists("samm2", $content) || preg_match("/TODO/i", $content["samm2"])) {
$content = getContentForLevelFromSubdimensions($i, $content, $elementName);
if ($content != "") {
printDetail($dimension, $subdimension, $elementName, $dimensions, true);
}
}
}
}
}
}