File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
src/views/portfolio/vulnerabilities Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change 6464
6565 <div v-if =" vulnerability.cwe" >
6666 <b-card :title =" this.$t('message.weakness')" >
67- <b-card-text >
68- <a :href =" cweLink" >{{ cweLabel }}</a >
67+ <b-card-text v-for = " cwe in vulnerability.cwe " :key = " cwe.cweId " >
68+ <a :href =" cweLink(cwe) " >{{ cweLabel(cwe) }}</a >
6969 </b-card-text >
7070 </b-card >
7171 </div >
137137 cvssExploitScore () {
138138 return common .valueWithDefault (((this .vulnerability .cvssV3ExploitabilitySubScore ) ? this .vulnerability .cvssV3ExploitabilitySubScore : this .vulnerability .cvssV2ExploitabilitySubScore ), 0 );
139139 },
140- cweLabel () {
141- if (this .vulnerability .cwe ) {
142- return ` CWE-${ this .vulnerability .cwe .cweId } : ${ this .vulnerability .cwe .name } ` ;
143- } else {
144- return null ;
145- }
146- },
147- cweLink () {
148- if (this .vulnerability .cwe ) {
149- return ` https://cwe.mitre.org/data/definitions/${ this .vulnerability .cwe .cweId } ` ;
150- } else {
151- return null ;
152- }
153- },
154140 sourceLabel () {
155141 switch (this .vulnerability .source ) {
156142 case ' NVD' :
224210 },
225211 syncProjectFields : function (vulnerability ) {
226212 // todo future - when internal vulnerability editing is implemented
213+ },
214+ cweLabel : function (cwe ) {
215+ return ` CWE-${ cwe .cweId } : ${ cwe .name } ` ;
216+ },
217+ cweLink : function (cwe ) {
218+ return ` https://cwe.mitre.org/data/definitions/${ cwe .cweId } ` ;
227219 }
228220 },
229221 beforeMount () {
You can’t perform that action at this time.
0 commit comments