import * as React from 'react';
import * as classNames from 'classnames';
import { Link } from 'react-router';
-import { translate, translateWithParameters } from '../../../helpers/l10n';
+import { translate } from '../../../helpers/l10n';
import { SecurityHotspot, Component, BranchLike, IssueType } from '../../../app/types';
import Rating from '../../../components/ui/Rating';
import { getComponentIssuesUrl, getRulesUrl } from '../../../helpers/urls';
);
};
- getName(finding: SecurityHotspot, type: StandardType, activeRules: number, totalRules: number) {
+ getName(finding: SecurityHotspot, type: StandardType) {
const category = finding.category || finding.cwe || 'unknown';
const renderers = {
owaspTop10: renderOwaspTop10Category,
overlay={this.renderOverlay(this.state.standards[type][category].description)}
/>
)}
- {activeRules === 0 &&
- totalRules > 0 &&
+ {finding.activeRules === 0 &&
+ finding.totalRules > 0 &&
+ category !== 'cwe' &&
category !== 'unknown' && (
<HelpTooltip
className="spacer-left"
- overlay={this.renderMoreRulesOverlay(totalRules, type, category)}>
+ overlay={this.renderMoreRulesOverlay(type, category)}>
<PlusCircleIcon className="vertical-middle" fill={theme.blue} size={12} />
</HelpTooltip>
)}
// We redirect the user to the rules page, using languages, types, keywords and tags filters
// to display the correct list of rules
- renderMoreRulesOverlay = (totalRules: number, type: StandardType, category: string) => {
+ renderMoreRulesOverlay = (type: StandardType, category: string) => {
const languages = this.props.component.qualityProfiles
? this.props.component.qualityProfiles.map(qp => qp.language).join(',')
: '';
- let tags;
- let q;
- if (type === 'cwe') {
- q = `${STANDARDS_TAGS[type]}:${category.toLowerCase()}`;
- tags = 'cwe';
- } else {
- tags = `${STANDARDS_TAGS[type]}-${category.toLowerCase()}`;
- }
+ const sansTopCategoryTags: { [key: string]: string } = {
+ 'insecure-interaction': 'insecure',
+ 'porous-defenses': 'porous',
+ 'risky-resource': 'risky'
+ };
+ const tags = `${STANDARDS_TAGS[type]}-${
+ type === 'sansTop25' ? sansTopCategoryTags[category.toLowerCase()] : category.toLowerCase()
+ }`;
return (
<>
<p>{translate('security_reports.activate_rules')}</p>
<Link
className="spacer-left link-no-underline"
to={getRulesUrl(
- { languages, tags, q, types: `${IssueType.Hotspot},${IssueType.Vulnerability}` },
+ { languages, tags, types: [IssueType.Hotspot, IssueType.Vulnerability].join() },
isSonarCloud() ? this.props.component.organization : undefined
)}>
- {translateWithParameters('security_reports.activate_rules.link', totalRules)}
+ {translate('security_reports.activate_rules.link')}
</Link>
</>
);
);
};
+ renderComponentIssuesLink = (
+ activeRules: number,
+ query: { [x: string]: string | undefined },
+ value: number,
+ tooltip?: JSX.Element
+ ) => {
+ if (activeRules === 0) {
+ return '-';
+ }
+ return value === 0 ? (
+ <>
+ {value}
+ {tooltip}
+ </>
+ ) : (
+ <>
+ <Link to={getComponentIssuesUrl(this.props.component.key, query)}>{value}</Link>
+ {tooltip}
+ </>
+ );
+ };
+
renderFinding(
finding: SecurityHotspot,
isCWE?: boolean,
: null;
const title = getRatingTooltip('security_rating', finding.vulnerabilityRating || 1);
- const hasActiveRules = finding.activeRules > 0;
return (
<React.Fragment key={finding.category || finding.cwe}>
<tr>
<td className={classNames({ 'cwe-title-cell': isCWE })}>
- {this.getName(finding, isCWE ? 'cwe' : type, finding.activeRules, finding.totalRules)}
+ {this.getName(finding, isCWE ? 'cwe' : type)}
</td>
<td className="text-right">
- {!hasActiveRules && '-'}
- {hasActiveRules && (
- <div className="display-inline-flex-center">
- <Link
- to={getComponentIssuesUrl(component.key, {
- ...params,
- types: IssueType.Vulnerability,
- resolved: 'false'
- })}>
- {finding.vulnerabilities}
- </Link>
+ <div className="display-inline-flex-center">
+ {this.renderComponentIssuesLink(
+ finding.activeRules,
+ {
+ ...params,
+ types: IssueType.Vulnerability,
+ resolved: 'false'
+ },
+ finding.vulnerabilities,
<Tooltip overlay={title}>
<Link
className="link-no-underline spacer-left"
<Rating value={finding.vulnerabilityRating || 1} />
</Link>
</Tooltip>
- </div>
- )}
+ )}
+ </div>
</td>
<td className="text-right security-column-separator">
- {!hasActiveRules && '-'}
- {hasActiveRules && (
- <Link
- to={getComponentIssuesUrl(component.key, {
- ...params,
- types: IssueType.Hotspot,
- resolved: 'false',
- statuses: 'OPEN,REOPENED'
- })}>
- {finding.openSecurityHotspots}
- </Link>
+ {this.renderComponentIssuesLink(
+ finding.activeRules,
+ {
+ ...params,
+ types: IssueType.Hotspot,
+ resolved: 'false',
+ statuses: 'OPEN,REOPENED'
+ },
+ finding.openSecurityHotspots
)}
</td>
<td className="text-right">
- {!hasActiveRules && '-'}
- {hasActiveRules && (
- <Link
- to={getComponentIssuesUrl(component.key, {
- ...params,
- types: IssueType.Hotspot,
- resolutions: 'FIXED',
- statuses: 'RESOLVED'
- })}>
- {finding.toReviewSecurityHotspots}
- </Link>
+ {this.renderComponentIssuesLink(
+ finding.activeRules,
+ {
+ ...params,
+ types: IssueType.Hotspot,
+ resolutions: 'FIXED',
+ statuses: 'RESOLVED'
+ },
+ finding.toReviewSecurityHotspots
)}
</td>
<td className="text-right">
- {!hasActiveRules && '-'}
- {hasActiveRules && (
- <Link
- to={getComponentIssuesUrl(component.key, {
- ...params,
- types: IssueType.Hotspot,
- resolutions: 'WONTFIX',
- statuses: 'RESOLVED'
- })}>
- {finding.wontFixSecurityHotspots}
- </Link>
+ {this.renderComponentIssuesLink(
+ finding.activeRules,
+ {
+ ...params,
+ types: IssueType.Hotspot,
+ resolutions: 'WONTFIX',
+ statuses: 'RESOLVED'
+ },
+ finding.wontFixSecurityHotspots
)}
</td>
</tr>
<div
className="display-inline-flex-center"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- 2
- </Link>
- <Tooltip
- overlay="metric.security_rating.tooltip.E"
- >
+ <React.Fragment>
<Link
- className="link-no-underline spacer-left"
onlyActiveOnIndex={false}
style={Object {}}
to={
}
}
>
- <Rating
- value={5}
- />
+ 2
</Link>
- </Tooltip>
+ <Tooltip
+ overlay="metric.security_rating.tooltip.E"
+ >
+ <Link
+ className="link-no-underline spacer-left"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ <Rating
+ value={5}
+ />
+ </Link>
+ </Tooltip>
+ </React.Fragment>
</div>
</td>
<td
className="text-right security-column-separator"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolved": "false",
- "statuses": "OPEN,REOPENED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolved": "false",
+ "statuses": "OPEN,REOPENED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 10
- </Link>
+ >
+ 10
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolutions": "FIXED",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolutions": "FIXED",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 2
- </Link>
+ >
+ 2
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
+ <React.Fragment>
0
- </Link>
+ </React.Fragment>
</td>
</tr>
</React.Fragment>
<div
className="display-inline-flex-center"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- 2
- </Link>
- <Tooltip
- overlay="metric.security_rating.tooltip.E"
- >
+ <React.Fragment>
<Link
- className="link-no-underline spacer-left"
onlyActiveOnIndex={false}
style={Object {}}
to={
}
}
>
- <Rating
- value={5}
- />
+ 2
</Link>
- </Tooltip>
+ <Tooltip
+ overlay="metric.security_rating.tooltip.E"
+ >
+ <Link
+ className="link-no-underline spacer-left"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a2",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ <Rating
+ value={5}
+ />
+ </Link>
+ </Tooltip>
+ </React.Fragment>
</div>
</td>
<td
className="text-right security-column-separator"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolved": "false",
- "statuses": "OPEN,REOPENED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a2",
+ "resolved": "false",
+ "statuses": "OPEN,REOPENED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 10
- </Link>
+ >
+ 10
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolutions": "FIXED",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a2",
+ "resolutions": "FIXED",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 2
- </Link>
+ >
+ 2
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
+ <React.Fragment>
0
- </Link>
+ </React.Fragment>
</td>
</tr>
</React.Fragment>
"pathname": "/coding_rules",
"query": Object {
"languages": "",
- "q": undefined,
"tags": "owasp-a3",
"types": "SECURITY_HOTSPOT,VULNERABILITY",
},
}
}
>
- security_reports.activate_rules.link.1
+ security_reports.activate_rules.link
</Link>
</React.Fragment>
}
<td
className="text-right"
>
- -
+ <div
+ className="display-inline-flex-center"
+ >
+ -
+ </div>
</td>
<td
className="text-right security-column-separator"
<div
className="display-inline-flex-center"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- 3
- </Link>
- <Tooltip
- overlay="metric.security_rating.tooltip.C"
- >
+ <React.Fragment>
<Link
- className="link-no-underline spacer-left"
onlyActiveOnIndex={false}
style={Object {}}
to={
}
}
>
- <Rating
- value={3}
- />
+ 3
</Link>
- </Tooltip>
+ <Tooltip
+ overlay="metric.security_rating.tooltip.C"
+ >
+ <Link
+ className="link-no-underline spacer-left"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "unknown",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ <Rating
+ value={3}
+ />
+ </Link>
+ </Tooltip>
+ </React.Fragment>
</div>
</td>
<td
className="text-right security-column-separator"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolved": "false",
- "statuses": "OPEN,REOPENED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "unknown",
+ "resolved": "false",
+ "statuses": "OPEN,REOPENED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 100
- </Link>
+ >
+ 100
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolutions": "FIXED",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "unknown",
+ "resolutions": "FIXED",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 8
- </Link>
+ >
+ 8
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 10
- </Link>
- </td>
- </tr>
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "unknown",
+ "resolutions": "WONTFIX",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
+ }
+ >
+ 10
+ </Link>
+ </React.Fragment>
+ </td>
+ </tr>
</React.Fragment>
</tbody>
</table>
<div
className="display-inline-flex-center"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- 2
- </Link>
- <Tooltip
- overlay="metric.security_rating.tooltip.E"
- >
+ <React.Fragment>
<Link
- className="link-no-underline spacer-left"
onlyActiveOnIndex={false}
style={Object {}}
to={
}
}
>
- <Rating
- value={5}
- />
+ 2
</Link>
- </Tooltip>
+ <Tooltip
+ overlay="metric.security_rating.tooltip.E"
+ >
+ <Link
+ className="link-no-underline spacer-left"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ <Rating
+ value={5}
+ />
+ </Link>
+ </Tooltip>
+ </React.Fragment>
</div>
</td>
<td
className="text-right security-column-separator"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolved": "false",
- "statuses": "OPEN,REOPENED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolved": "false",
+ "statuses": "OPEN,REOPENED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 10
- </Link>
+ >
+ 10
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolutions": "FIXED",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolutions": "FIXED",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 2
- </Link>
+ >
+ 2
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a1",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
+ <React.Fragment>
0
- </Link>
+ </React.Fragment>
</td>
</tr>
<React.Fragment
<div
className="display-inline-flex-center"
>
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ 1
+ </Link>
+ <Tooltip
+ overlay="metric.security_rating.tooltip.A"
+ >
+ <Link
+ className="link-no-underline spacer-left"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ <Rating
+ value={1}
+ />
+ </Link>
+ </Tooltip>
+ </React.Fragment>
+ </div>
+ </td>
+ <td
+ className="text-right security-column-separator"
+ >
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a1",
+ "resolved": "false",
+ "statuses": "OPEN,REOPENED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
+ }
+ >
+ 10
+ </Link>
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <React.Fragment>
<Link
onlyActiveOnIndex={false}
style={Object {}}
"cwe": "42",
"id": "foo",
"owaspTop10": "a1",
+ "resolutions": "FIXED",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
+ }
+ >
+ 2
+ </Link>
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <React.Fragment>
+ 0
+ </React.Fragment>
+ </td>
+ </tr>
+ </React.Fragment>
+ </React.Fragment>
+ <React.Fragment
+ key="a2"
+ >
+ <tr>
+ <td
+ className=""
+ >
+ <React.Fragment>
+ A2
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <div
+ className="display-inline-flex-center"
+ >
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "a2",
"resolved": "false",
"types": "VULNERABILITY",
},
}
}
>
- 1
+ 2
</Link>
<Tooltip
- overlay="metric.security_rating.tooltip.A"
+ overlay="metric.security_rating.tooltip.E"
>
<Link
className="link-no-underline spacer-left"
Object {
"pathname": "/project/issues",
"query": Object {
- "cwe": "42",
"id": "foo",
- "owaspTop10": "a1",
+ "owaspTop10": "a2",
"resolved": "false",
"types": "VULNERABILITY",
},
}
>
<Rating
- value={1}
+ value={5}
/>
</Link>
</Tooltip>
- </div>
- </td>
- <td
- className="text-right security-column-separator"
- >
+ </React.Fragment>
+ </div>
+ </td>
+ <td
+ className="text-right security-column-separator"
+ >
+ <React.Fragment>
<Link
onlyActiveOnIndex={false}
style={Object {}}
Object {
"pathname": "/project/issues",
"query": Object {
- "cwe": "42",
"id": "foo",
- "owaspTop10": "a1",
+ "owaspTop10": "a2",
"resolved": "false",
"statuses": "OPEN,REOPENED",
"types": "SECURITY_HOTSPOT",
>
10
</Link>
- </td>
- <td
- className="text-right"
- >
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <React.Fragment>
<Link
onlyActiveOnIndex={false}
style={Object {}}
Object {
"pathname": "/project/issues",
"query": Object {
- "cwe": "42",
"id": "foo",
- "owaspTop10": "a1",
+ "owaspTop10": "a2",
"resolutions": "FIXED",
"statuses": "RESOLVED",
"types": "SECURITY_HOTSPOT",
>
2
</Link>
- </td>
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <React.Fragment>
+ 0
+ </React.Fragment>
+ </td>
+ </tr>
+ <React.Fragment
+ key="42"
+ >
+ <tr>
<td
- className="text-right"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "cwe": "42",
- "id": "foo",
- "owaspTop10": "a1",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 0
- </Link>
- </td>
- </tr>
- </React.Fragment>
- </React.Fragment>
- <React.Fragment
- key="a2"
- >
- <tr>
- <td
- className=""
- >
- <React.Fragment>
- A2
- </React.Fragment>
- </td>
- <td
- className="text-right"
- >
- <div
- className="display-inline-flex-center"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- 2
- </Link>
- <Tooltip
- overlay="metric.security_rating.tooltip.E"
- >
- <Link
- className="link-no-underline spacer-left"
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- <Rating
- value={5}
- />
- </Link>
- </Tooltip>
- </div>
- </td>
- <td
- className="text-right security-column-separator"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolved": "false",
- "statuses": "OPEN,REOPENED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 10
- </Link>
- </td>
- <td
- className="text-right"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolutions": "FIXED",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 2
- </Link>
- </td>
- <td
- className="text-right"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "a2",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 0
- </Link>
- </td>
- </tr>
- <React.Fragment
- key="42"
- >
- <tr>
- <td
- className="cwe-title-cell"
+ className="cwe-title-cell"
>
<React.Fragment>
CWE-42
<div
className="display-inline-flex-center"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "cwe": "42",
- "id": "foo",
- "owaspTop10": "a2",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- 1
- </Link>
- <Tooltip
- overlay="metric.security_rating.tooltip.A"
- >
+ <React.Fragment>
<Link
- className="link-no-underline spacer-left"
onlyActiveOnIndex={false}
style={Object {}}
to={
}
}
>
- <Rating
- value={1}
- />
+ 1
</Link>
- </Tooltip>
+ <Tooltip
+ overlay="metric.security_rating.tooltip.A"
+ >
+ <Link
+ className="link-no-underline spacer-left"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a2",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ <Rating
+ value={1}
+ />
+ </Link>
+ </Tooltip>
+ </React.Fragment>
</div>
</td>
<td
className="text-right security-column-separator"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "cwe": "42",
- "id": "foo",
- "owaspTop10": "a2",
- "resolved": "false",
- "statuses": "OPEN,REOPENED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a2",
+ "resolved": "false",
+ "statuses": "OPEN,REOPENED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 10
- </Link>
+ >
+ 10
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "cwe": "42",
- "id": "foo",
- "owaspTop10": "a2",
- "resolutions": "FIXED",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a2",
+ "resolutions": "FIXED",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
}
- }
- >
- 2
- </Link>
+ >
+ 2
+ </Link>
+ </React.Fragment>
</td>
<td
className="text-right"
>
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "cwe": "42",
- "id": "foo",
- "owaspTop10": "a2",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
+ <React.Fragment>
0
- </Link>
+ </React.Fragment>
</td>
</tr>
</React.Fragment>
"pathname": "/coding_rules",
"query": Object {
"languages": "",
- "q": undefined,
"tags": "owasp-a3",
"types": "SECURITY_HOTSPOT,VULNERABILITY",
},
}
}
>
- security_reports.activate_rules.link.1
+ security_reports.activate_rules.link
</Link>
</React.Fragment>
}
<td
className="text-right"
>
- -
+ <div
+ className="display-inline-flex-center"
+ >
+ -
+ </div>
</td>
<td
className="text-right security-column-separator"
<div
className="display-inline-flex-center"
>
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a3",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ 1
+ </Link>
+ <Tooltip
+ overlay="metric.security_rating.tooltip.A"
+ >
+ <Link
+ className="link-no-underline spacer-left"
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a3",
+ "resolved": "false",
+ "types": "VULNERABILITY",
+ },
+ }
+ }
+ >
+ <Rating
+ value={1}
+ />
+ </Link>
+ </Tooltip>
+ </React.Fragment>
+ </div>
+ </td>
+ <td
+ className="text-right security-column-separator"
+ >
+ <React.Fragment>
<Link
onlyActiveOnIndex={false}
style={Object {}}
"id": "foo",
"owaspTop10": "a3",
"resolved": "false",
+ "statuses": "OPEN,REOPENED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
+ }
+ >
+ 10
+ </Link>
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "cwe": "42",
+ "id": "foo",
+ "owaspTop10": "a3",
+ "resolutions": "FIXED",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
+ },
+ }
+ }
+ >
+ 2
+ </Link>
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <React.Fragment>
+ 0
+ </React.Fragment>
+ </td>
+ </tr>
+ </React.Fragment>
+ </React.Fragment>
+ <React.Fragment
+ key="unknown"
+ >
+ <tr>
+ <td
+ className=""
+ >
+ <React.Fragment>
+ UNKNOWN
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <div
+ className="display-inline-flex-center"
+ >
+ <React.Fragment>
+ <Link
+ onlyActiveOnIndex={false}
+ style={Object {}}
+ to={
+ Object {
+ "pathname": "/project/issues",
+ "query": Object {
+ "id": "foo",
+ "owaspTop10": "unknown",
+ "resolved": "false",
"types": "VULNERABILITY",
},
}
}
>
- 1
+ 3
</Link>
<Tooltip
- overlay="metric.security_rating.tooltip.A"
+ overlay="metric.security_rating.tooltip.C"
>
<Link
className="link-no-underline spacer-left"
Object {
"pathname": "/project/issues",
"query": Object {
- "cwe": "42",
"id": "foo",
- "owaspTop10": "a3",
+ "owaspTop10": "unknown",
"resolved": "false",
"types": "VULNERABILITY",
},
}
>
<Rating
- value={1}
+ value={3}
/>
</Link>
</Tooltip>
- </div>
- </td>
- <td
- className="text-right security-column-separator"
- >
+ </React.Fragment>
+ </div>
+ </td>
+ <td
+ className="text-right security-column-separator"
+ >
+ <React.Fragment>
<Link
onlyActiveOnIndex={false}
style={Object {}}
Object {
"pathname": "/project/issues",
"query": Object {
- "cwe": "42",
"id": "foo",
- "owaspTop10": "a3",
+ "owaspTop10": "unknown",
"resolved": "false",
"statuses": "OPEN,REOPENED",
"types": "SECURITY_HOTSPOT",
}
}
>
- 10
+ 100
</Link>
- </td>
- <td
- className="text-right"
- >
+ </React.Fragment>
+ </td>
+ <td
+ className="text-right"
+ >
+ <React.Fragment>
<Link
onlyActiveOnIndex={false}
style={Object {}}
Object {
"pathname": "/project/issues",
"query": Object {
- "cwe": "42",
"id": "foo",
- "owaspTop10": "a3",
+ "owaspTop10": "unknown",
"resolutions": "FIXED",
"statuses": "RESOLVED",
"types": "SECURITY_HOTSPOT",
}
}
>
- 2
+ 8
</Link>
- </td>
- <td
- className="text-right"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "cwe": "42",
- "id": "foo",
- "owaspTop10": "a3",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 0
- </Link>
- </td>
- </tr>
- </React.Fragment>
- </React.Fragment>
- <React.Fragment
- key="unknown"
- >
- <tr>
- <td
- className=""
- >
- <React.Fragment>
- UNKNOWN
</React.Fragment>
</td>
<td
className="text-right"
>
- <div
- className="display-inline-flex-center"
- >
+ <React.Fragment>
<Link
onlyActiveOnIndex={false}
style={Object {}}
"query": Object {
"id": "foo",
"owaspTop10": "unknown",
- "resolved": "false",
- "types": "VULNERABILITY",
+ "resolutions": "WONTFIX",
+ "statuses": "RESOLVED",
+ "types": "SECURITY_HOTSPOT",
},
}
}
>
- 3
+ 10
</Link>
- <Tooltip
- overlay="metric.security_rating.tooltip.C"
- >
- <Link
- className="link-no-underline spacer-left"
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolved": "false",
- "types": "VULNERABILITY",
- },
- }
- }
- >
- <Rating
- value={3}
- />
- </Link>
- </Tooltip>
- </div>
- </td>
- <td
- className="text-right security-column-separator"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolved": "false",
- "statuses": "OPEN,REOPENED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 100
- </Link>
- </td>
- <td
- className="text-right"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolutions": "FIXED",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 8
- </Link>
- </td>
- <td
- className="text-right"
- >
- <Link
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/issues",
- "query": Object {
- "id": "foo",
- "owaspTop10": "unknown",
- "resolutions": "WONTFIX",
- "statuses": "RESOLVED",
- "types": "SECURITY_HOTSPOT",
- },
- }
- }
- >
- 10
- </Link>
+ </React.Fragment>
</td>
</tr>
</React.Fragment>