Skip to content

Commit 7ac6bec

Browse files
committed
risk can be a list.
1 parent 72e6203 commit 7ac6bec

4 files changed

Lines changed: 26 additions & 19 deletions

File tree

data.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ function isAssoc(array $arr)
172172
return array_keys($arr) !== range(0, count($arr) - 1);
173173
}
174174

175+
176+
function render_risk($risk) {
177+
178+
if (is_array($risk)) {
179+
return implode("\ ", $risk);
180+
}
181+
return $risk;
182+
}
175183
function build_table_tooltip($array, $headerWeight = 2)
176184
{
177185
$mapKnowLedge = array("Very Low (one discipline)", "Low (one discipline)", "Medium (two disciplines)", "High (two disciplines)", "Very High (three or more disciplines)");
@@ -187,7 +195,7 @@ function build_table_tooltip($array, $headerWeight = 2)
187195

188196
$html = "";
189197
$html .= "<h" . $headerWeight . ">Risk and Opportunity</h$headerWeight>";
190-
$html .= "<div><b>" . "Risk" . ":</b> " . $array['risk'] . "</div>";
198+
$html .= "<div><b>" . "Risk" . ":</b> " . render_risk($array['risk']) . "</div>";
191199
$html .= "<div><b>" . "Opportunity" . ":</b> " . $array['measure'] . "</div>";
192200
if (IS_SHOW_EVIDENCE_TODO || $evidenceContent != "TODO")
193201
$html .= "<div><b>" . "Evidence" . ":</b> " . $evidenceContent . "</div>";

data/BuildandDeployment.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
sub-dimensions:
33
Build:
44
Building and testing of artifacts in virtual environments:
5-
risk: While building and testing artifacts, third party systems, application frameworks
6-
and 3rd party libraries are used. These might be malicious as a result of vulnerable
7-
libraries or because they are altered during the delivery phase.
5+
risk:
6+
- While building and testing artifacts, third party systems, application frameworks
7+
and 3rd party libraries are used. These might be malicious as a result of vulnerable
8+
libraries or because they are altered during the delivery phase.
89
measure: Each step during within the build and testing phase is performed in a separate virtual
910
environments, which is destroyed afterward.
1011
meta:
@@ -22,8 +23,9 @@ sub-dimensions:
2223
iso27001-2017:
2324
- 14.2.6
2425
Defined build process:
25-
risk: Performing builds without a defined process is error prone.
26-
For example, as a result of incorrect security related configuration.
26+
risk:
27+
- Performing builds without a defined process is error prone;
28+
for example, as a result of incorrect security related configuration.
2729
measure: A well defined build process lowers the possibility of errors during the build
2830
process.
2931
evidence: The build process is defined in <a href="REPLACE-ME">REPLACE-ME Pipeline</a> in the folder <i>vars</>. Projects are using a <i>Jenkinsfile</i> to use the defined process.
@@ -149,9 +151,11 @@ sub-dimensions:
149151
- 9.4.5
150152
- 14.2.6
151153
Handover of confidential parameters:
152-
risk: Attackers who compromise a system can see confidential access information
153-
like database credentials. Parameters are often used to set credentials, for
154-
example by starting containers or applications. These parameters can often be
154+
risk:
155+
- Attackers who compromise a system can see confidential access information
156+
like database credentials.
157+
- Parameters are often used to set credentials, for
158+
example by starting containers or applications; these parameters can often be
155159
seen by any one listing running processes on the target system.
156160
measure: By using encryption, it is harder to read credentials , e.g.
157161
from the file system. Also, the usage of a credential management system can help

data/strings.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ strings:
66
en: &en
77
labels: ["Very Low", "Low", "Medium", "High", "Very High"]
88
hardness: ["Very soft", "Soft", "Medium", "High", "Very high"]
9+
maturity_levels: ["Level 1: Basic understanding of security practices" ,
10+
"Level 2: Adoption of basic security practices",
11+
"Level 3: High adoption of security practices",
12+
"Level 4: Advanced deployment of security practices at scale"]
913
de:
1014
<<: *en
1115
hardness: ["Sehr gering", "Gering", "Mittel", "Hoch", "Sehr hoch"]

detail.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,7 @@ function printDetail($dimension, $subdimension, $activityName, $dimensions, $rep
4747
echo "<h" . ($headerWeight + 1) . ">Additional Information</h" . ($headerWeight + 1) . ">";
4848
if (array_key_exists("dependsOn", $element)) {
4949
$dependsOn = $element['dependsOn'];
50-
$dependencies = "";
51-
$first = true;
52-
foreach ($dependsOn as $dimensionElement) {
53-
if (!$first) {
54-
$dependencies .= ", ";
55-
}
56-
$dependencies .= $dimensionElement;
57-
$first = false;
58-
}
59-
50+
$dependencies = implode(", ", $dependsOn);
6051
echo "<div><b>Dependencies:</b> $dependencies</div>";
6152
}
6253
echo getElementContentAndCheckExistence($element, "meta");

0 commit comments

Comments
 (0)