Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion client/src/app/pages/advisory-list/advisory-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ export const AdvisoryTable: React.FC = () => {
<TableHeaderContentWithControls {...tableControls}>
<Th {...getThProps({ columnKey: "identifier" })} />
<Th {...getThProps({ columnKey: "title" })} />
<Th {...getThProps({ columnKey: "severity" })} />
<Th
{...getThProps({ columnKey: "severity" })}
info={{
tooltip:
"The average CVSS score for all of the Vulnerabilities linked to this Advisory.",
}}
/>
<Th {...getThProps({ columnKey: "type" })} />
<Th {...getThProps({ columnKey: "modified" })} />
<Th {...getThProps({ columnKey: "vulnerabilities" })} />
Expand Down
8 changes: 4 additions & 4 deletions client/src/app/pages/home/components/MonitoringSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const MonitoringSection: React.FC = () => {

return (
<Card>
<CardTitle>Your dashboard</CardTitle>
<CardTitle>Dashboard</CardTitle>
<CardBody>
<Grid>
<GridItem md={6}>
Expand All @@ -109,9 +109,9 @@ export const MonitoringSection: React.FC = () => {
<Stack hasGutter>
<StackItem>
<Content>
Below is a summary of Vulnerability status for your last 10
ingested SBOMs. You can click on the SBOM name to be taken
to their respective details page.
Below is a summary of Vulnerability status for the last 10
ingested SBOMs. To view the details, click on an SBOM name.
You can also select up to 4 SBOMs to watch.
</Content>
</StackItem>
<StackItem>
Expand Down
16 changes: 16 additions & 0 deletions client/src/app/pages/package-details/package-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ import {
Flex,
FlexItem,
PageSection,
Popover,
Stack,
StackItem,
Tab,
TabAction,
TabContent,
TabTitleText,
Tabs,
} from "@patternfly/react-core";
import HelpIcon from "@patternfly/react-icons/dist/esm/icons/help-icon";

import { PathParam, useRouteParams } from "@app/Routes";
import { LoadingWrapper } from "@app/components/LoadingWrapper";
Expand Down Expand Up @@ -43,6 +46,8 @@ export const PackageDetails: React.FC = () => {
const vulnerabilitiesTabRef = React.createRef<HTMLElement>();
const sbomsTabRef = React.createRef<HTMLElement>();

const sbomsPopupRef = React.createRef<HTMLElement>();

return (
<>
<PageSection hasBodyWrapper={false}>
Expand Down Expand Up @@ -85,6 +90,17 @@ export const PackageDetails: React.FC = () => {
<Tab
eventKey={1}
title={<TabTitleText>SBOMs using package</TabTitleText>}
actions={
<>
<TabAction ref={sbomsPopupRef}>
<HelpIcon />
</TabAction>
<Popover
bodyContent={<div>A list of SBOMs using this package.</div>}
triggerRef={sbomsPopupRef}
/>
</>
}
tabContentId="refTabSbomsSection"
tabContentRef={sbomsTabRef}
/>
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/pages/search/components/SearchMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export const SearchMenu: React.FC<ISearchMenu> = ({ onChangeSearch }) => {

const searchInput = (
<SearchInput
placeholder="Search for an SBOM, Package, or Vulnerability"
placeholder="Search for an SBOM, Package, Advisory, or Vulnerability"
value={searchValue}
onChange={(_event, value) => onChangeSearchValue(value)}
onClear={onClearSearchValue}
Expand Down
79 changes: 68 additions & 11 deletions client/src/app/pages/search/components/SearchTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,9 @@ export const SearchTabs: React.FC<SearchTabsProps> = ({
};

const sbomPopoverRef = React.createRef<HTMLElement>();

const sbomPopover = (popoverRef: React.RefObject<unknown>) => (
<Popover
bodyContent={
<div>Software Bill of Materials for Products and Containers.</div>
}
position={"right"}
triggerRef={popoverRef}
/>
);
const packagePopoverRef = React.createRef<HTMLElement>();
const vulnerabilityPopoverRef = React.createRef<HTMLElement>();
const advisoryPopoverRef = React.createRef<HTMLElement>();

return (
<Split hasGutter>
Expand Down Expand Up @@ -170,7 +163,16 @@ export const SearchTabs: React.FC<SearchTabsProps> = ({
<TabAction aria-label="SBOM help popover" ref={sbomPopoverRef}>
<HelpIcon />
</TabAction>
{sbomPopover(sbomPopoverRef)}
<Popover
bodyContent={
<div>
A list of ingested Software Bill of Materials (SBOM)
documents.
</div>
}
position={"right"}
triggerRef={sbomPopoverRef}
/>
</>
}
>
Expand All @@ -193,6 +195,26 @@ export const SearchTabs: React.FC<SearchTabsProps> = ({
</Badge>
</TabTitleText>
}
actions={
<>
<TabAction
aria-label="Package help popover"
ref={packagePopoverRef}
>
<HelpIcon />
</TabAction>
<Popover
bodyContent={
<div>
A list of packages along with the count of
vulnerabilities.
</div>
}
position={"right"}
triggerRef={packagePopoverRef}
/>
</>
}
>
<PackageToolbar />
{packageTable ?? <PackageTable />}
Expand All @@ -213,6 +235,26 @@ export const SearchTabs: React.FC<SearchTabsProps> = ({
</Badge>
</TabTitleText>
}
actions={
<>
<TabAction
aria-label="Vulnerability help popover"
ref={vulnerabilityPopoverRef}
>
<HelpIcon />
</TabAction>
<Popover
bodyContent={
<div>
A list of publicly known Common Vulnerabilities and
Exposures (CVE).
</div>
}
position={"right"}
triggerRef={vulnerabilityPopoverRef}
/>
</>
}
>
<VulnerabilityToolbar />
{vulnerabilityTable ?? <VulnerabilityTable />}
Expand All @@ -233,6 +275,21 @@ export const SearchTabs: React.FC<SearchTabsProps> = ({
</Badge>
</TabTitleText>
}
actions={
<>
<TabAction
aria-label="Advisory help popover"
ref={advisoryPopoverRef}
>
<HelpIcon />
</TabAction>
<Popover
bodyContent={<div>A list of available advisories.</div>}
position={"right"}
triggerRef={advisoryPopoverRef}
/>
</>
}
>
<AdvisoryToolbar />
{advisoryTable ?? <AdvisoryTable />}
Expand Down
49 changes: 46 additions & 3 deletions client/src/app/pages/upload/upload.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type React from "react";
import React from "react";

import type { AxiosError, AxiosResponse } from "axios";

Expand All @@ -7,12 +7,15 @@ import {
CardBody,
Content,
PageSection,
Popover,
Tab,
TabAction,
TabContent,
TabContentBody,
TabTitleText,
Tabs,
} from "@patternfly/react-core";
import HelpIcon from "@patternfly/react-icons/dist/esm/icons/help-icon";

import { useUploadAdvisory } from "@app/queries/advisories";
import { useUploadSBOM } from "@app/queries/sboms";
Expand All @@ -31,6 +34,9 @@ export const ImporterList: React.FC = () => {
handleRemoveUpload: handleAdvisoryRemoveUpload,
} = useUploadAdvisory();

const sbomPopupRef = React.createRef<HTMLElement>();
const advisoryPopupRef = React.createRef<HTMLElement>();

return (
<>
<PageSection hasBodyWrapper={false}>
Expand All @@ -42,7 +48,28 @@ export const ImporterList: React.FC = () => {
<Card>
<CardBody>
<Tabs defaultActiveKey={0}>
<Tab eventKey={0} title={<TabTitleText>SBOM</TabTitleText>}>
<Tab
eventKey={0}
title={<TabTitleText>SBOM</TabTitleText>}
actions={
<>
<TabAction ref={sbomPopupRef}>
<HelpIcon />
</TabAction>
<Popover
bodyContent={
<div>
Upload a Software Bill of Materials (SBOM) document.
We accept CycloneDX versions 1.3, 1.4, 1.5 and 1.6,
and System Package Data Exchange (SPDX) versions 2.2,
and 2.3.
</div>
}
triggerRef={sbomPopupRef}
/>
</>
}
>
<TabContent id="upload-sbom-tab-content">
<TabContentBody hasPadding>
<UploadFiles
Expand All @@ -63,7 +90,23 @@ export const ImporterList: React.FC = () => {
</TabContentBody>
</TabContent>
</Tab>
<Tab eventKey={1} title={<TabTitleText>Advisory</TabTitleText>}>
<Tab
eventKey={1}
title={<TabTitleText>Advisory</TabTitleText>}
actions={
<>
<TabAction ref={advisoryPopupRef}>
<HelpIcon />
</TabAction>
<Popover
bodyContent={
<div>Upload a CSAF, CVE, or OSV Advisory.</div>
}
triggerRef={advisoryPopupRef}
/>
</>
}
>
<TabContent id="upload-advisory-tab-content">
<TabContentBody hasPadding>
<UploadFiles
Expand Down
47 changes: 43 additions & 4 deletions client/src/app/pages/vulnerability-details/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import {
DescriptionList,
DescriptionListDescription,
DescriptionListGroup,
DescriptionListTerm,
DescriptionListTermHelpText,
DescriptionListTermHelpTextButton,
Grid,
GridItem,
Popover,
Stack,
StackItem,
} from "@patternfly/react-core";
Expand Down Expand Up @@ -43,19 +45,56 @@ export const Overview: React.FC<OverviewProps> = ({ vulnerability }) => {
}}
>
<DescriptionListGroup>
<DescriptionListTerm>Reserved</DescriptionListTerm>
<DescriptionListTermHelpText>
<Popover
bodyContent={
<div>
The date the Vulnerability identifier was assigned by
CVE Numbering Authority (CNA).
</div>
}
>
<DescriptionListTermHelpTextButton>
Reserved
</DescriptionListTermHelpTextButton>
</Popover>
</DescriptionListTermHelpText>
<DescriptionListDescription>
{formatDate(vulnerability.reserved)}
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>Published date</DescriptionListTerm>
<DescriptionListTermHelpText>
<Popover
bodyContent={
<div>The date the Vulnerability went public.</div>
}
>
<DescriptionListTermHelpTextButton>
Published
</DescriptionListTermHelpTextButton>
</Popover>
</DescriptionListTermHelpText>
<DescriptionListDescription>
{formatDate(vulnerability.published)}
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>Last modified</DescriptionListTerm>
<DescriptionListTermHelpText>
<Popover
bodyContent={
<div>
The last date when information for this Vulnerability
was updated in the National Vulnerability Database
(NVD).
</div>
}
>
<DescriptionListTermHelpTextButton>
Modified
</DescriptionListTermHelpTextButton>
</Popover>
</DescriptionListTermHelpText>
<DescriptionListDescription>
{formatDate(vulnerability.modified)}
</DescriptionListDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ export const VulnerabilityTable: React.FC = () => {
<TableHeaderContentWithControls {...tableControls}>
<Th {...getThProps({ columnKey: "identifier" })} />
<Th {...getThProps({ columnKey: "title" })} />
<Th {...getThProps({ columnKey: "severity" })} />
<Th
{...getThProps({ columnKey: "severity" })}
info={{
tooltip:
"The Common Vulnerability Scoring System measuring the severity of security flaws.",
}}
/>
<Th {...getThProps({ columnKey: "published" })} />
<Th {...getThProps({ columnKey: "sboms" })} />
</TableHeaderContentWithControls>
Expand Down
Loading