Skip to content

Commit 98eec60

Browse files
authored
Added links to API docs for every IAM action in the findings (#153)
* Python code now outputs JSON that contains the links to the action names in findings. Just need to fit the sampleData and javascript so that it displays this info in the report * Updated the sampleData.js file; added new script to generate the data JSON and update the sampleData.js directory; need to update the JavaScript so it shows the links for each action * Fixed Privilege Escalation format issue. Need to fix the action links * Action links now show up in the standard finding details so the results are more actionable. * Fix tests * Update mkdocs * Make pylint happy * Fix pytests
1 parent 239d2af commit 98eec60

27 files changed

+10179
-1144
lines changed

cloudsplaining/output/dist/js/index.js

+115-115
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudsplaining/output/src/components/finding/PrivilegeEscalationDetails.vue

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<div class="panel-collapse collapse"
1010
ref="PrivilegeEscalationDetailsDiv"
1111
v-bind:id="inlineOrManaged.toLowerCase() + '-policy' + '-' + policyId + '-' +'privilege-escalation'">
12-
<!--TODO: Format the Privilege Escalation stuff-->
1312
<div class="card-body">
1413
<!--What should I do?-->
1514
<b-button squared variant="link" v-b-modal="`${inlineOrManaged.toLowerCase()}-policy-${policyId}-privilege-escalation-what-should-i-do`">What should I do?</b-button>

cloudsplaining/output/src/components/finding/PrivilegeEscalationFormat.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<ol>
3-
<li v-bind:key="someFinding" v-for="someFinding in privilegeEscalationFinding">
3+
<li v-bind:key="someFinding.type" v-for="someFinding in privilegeEscalationFinding">
44
<a v-bind:href="`https://cloudsplaining.readthedocs.io/en/latest/glossary/privilege-escalation/#${someFinding.type}`" >{{ someFinding.type }}</a>
5-
(<span v-bind:key="action" v-for="(action, index) in someFinding.actions">
5+
(<span v-bind:key="someAction" v-for="(someAction, index) in someFinding.actions">
66
<span v-if="index !== 0">, </span>
7-
<span><code>{{action}}</code></span>
7+
<span><code>{{someAction}}</code></span>
88
</span>)
99
<br>
1010
<br>
@@ -17,7 +17,7 @@
1717
name: "PrivilegeEscalationFormat",
1818
props: {
1919
privilegeEscalationFinding: {
20-
type: Object
20+
type: Array
2121
}
2222
}
2323
}

cloudsplaining/output/src/components/finding/StandardRiskDetails.vue

+16-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,20 @@
3939
<br>
4040
<span v-html="getRiskDescription(risk.risk_type)"></span>
4141
<span>Actions/services:</span>
42+
<!--If the type is ServiceWildcard, that does not list specific IAM actions, it just lists service names.-->
43+
<span v-if="risk.risk_type === 'ServiceWildcard'">
4244
<pre><code>
4345
{{ JSON.parse(JSON.stringify(findings(policyId, risk.risk_type), undefined, '\t')) }}
4446
</code></pre>
47+
</span>
48+
<!--If the finding type is not ServiceWildcard or Privilege Escalation, it will list IAM action names-->
49+
<span v-else>
50+
<ul>
51+
<li v-bind:key="someAction" v-for="(someActionLink, someAction) in getActionLinks(policyId, risk.risk_type)">
52+
<a v-bind:href="`${someActionLink}`">{{ someAction }}</a>
53+
</li>
54+
</ul>
55+
</span>
4556
</div>
4657
</div>
4758
</template>
@@ -162,7 +173,11 @@
162173
else {
163174
return ""
164175
}
165-
}
176+
},
177+
getActionLinks: function (policyId, risk_type) {
178+
let actionList = this.findings(policyId, risk_type)
179+
return otherUtil.getActionLinks(this.iam_data, actionList)
180+
},
166181
},
167182
watch: {
168183
toggleData: {

0 commit comments

Comments
 (0)