Skip to content

Commit

Permalink
Merge branch 'develop' into 20-merge-lz-infra
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed Dec 5, 2024
2 parents 90be9cf + 3e772fd commit ed31b7e
Show file tree
Hide file tree
Showing 55 changed files with 138 additions and 1,811 deletions.
25 changes: 22 additions & 3 deletions backend/src/api/vulnerabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,28 @@ class VulnerabilitySearch {
});
}
if (this.filters?.severity) {
qs.andWhere('vulnerability.severity ILIKE :severity', {
severity: `%${this.filters.severity}%`
});
if (this.filters.severity === 'N/A') {
qs.andWhere(
"vulnerability.severity IS NULL OR vulnerability.severity = ''"
);
} else if (this.filters.severity === 'Other') {
qs.andWhere(
`vulnerability.severity NOT ILIKE 'N/A' AND
vulnerability.severity NOT ILIKE 'Low' AND
vulnerability.severity NOT ILIKE 'Medium' AND
vulnerability.severity NOT ILIKE 'High' AND
vulnerability.severity NOT ILIKE 'Critical'AND
vulnerability.severity NOT ILIKE '' OR
vulnerability.severity ILIKE :other`,
{
other: 'Other'
}
);
} else {
qs.andWhere('vulnerability.severity ILIKE :severity', {
severity: `%${this.filters.severity}%`
});
}
}
if (this.filters?.cpe) {
qs.andWhere('vulnerability.cpe ILIKE :cpe', {
Expand Down
3 changes: 0 additions & 3 deletions docs/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ module.exports = {
title: '',
items: [{ text: 'API Reference', link: '/api-reference/' }],
},
{
items: [{ text: 'ReadySetCyber', link: '/rsc/user-guide' }],
},
],
secondaryLinks: [
{
Expand Down
Binary file removed docs/src/documentation-pages/rsc/img/assessment.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/src/documentation-pages/rsc/img/register.png
Binary file not shown.
Binary file removed docs/src/documentation-pages/rsc/img/resources.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/src/documentation-pages/rsc/img/rsc-login.png
Binary file not shown.
Binary file removed docs/src/documentation-pages/rsc/img/side-nav.png
Binary file not shown.
Binary file removed docs/src/documentation-pages/rsc/img/sign-in.png
Binary file not shown.
Binary file removed docs/src/documentation-pages/rsc/img/terms.png
Binary file not shown.
87 changes: 0 additions & 87 deletions docs/src/documentation-pages/rsc/user-guide.md

This file was deleted.

5 changes: 1 addition & 4 deletions frontend/scripts/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ app.use((req, res, next) => {
// These CORS origins work in all Crossfeed environments
app.use(
cors({
origin: [
/^https:\/\/(.*\.)?crossfeed\.cyber\.dhs\.gov$/,
/^https:\/\/(.*\.)?readysetcyber\.cyber\.dhs\.gov$/
],
origin: [/^https:\/\/(.*\.)?crossfeed\.cyber\.dhs\.gov$/],
methods: 'GET,POST,PUT,DELETE,OPTIONS'
})
);
Expand Down
32 changes: 0 additions & 32 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ import {
import { LayoutWithSearch, RouteGuard } from 'components';
import './styles.scss';
import { Authenticator } from '@aws-amplify/ui-react';
import { RSCDashboard } from 'components/ReadySetCyber/RSCDashboard';
import { RSCDetail } from 'components/ReadySetCyber/RSCDetail';
import { RSCLogin } from 'components/ReadySetCyber/RSCLogin';
import { RiskWithSearch } from 'pages/Risk/Risk';
import { StaticsContextProvider } from 'context/StaticsContextProvider';
import { SavedSearchContextProvider } from 'context/SavedSearchContextProvider';
Expand Down Expand Up @@ -221,35 +218,6 @@ const App: React.FC = () => (
component={RegionUsers}
permissions={['regionalAdmin', 'globalView']}
/>
<RouteGuard
exact
path="/readysetcyber"
unauth={RSCLogin}
component={RSCDashboard}
/>
<RouteGuard
exact
path="/readysetcyber/dashboard"
component={RSCDashboard}
permissions={[
'globalView',
'readySetCyber',
'regionalAdmin',
'standard'
]}
unauth={RSCLogin}
/>
<RouteGuard
path="/readysetcyber/result/:id"
component={RSCDetail}
permissions={[
'globalView',
'readySetCyber',
'regionalAdmin',
'standard'
]}
unauth={RSCLogin}
/>
</Switch>
</LayoutWithSearch>
</SearchProvider>
Expand Down
110 changes: 50 additions & 60 deletions frontend/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import { useUserActivityTimeout } from 'hooks/useUserActivityTimeout';
import { useAuthContext } from 'context/AuthContext';
import UserInactiveModal from './UserInactivityModal/UserInactivityModal';
import { CrossfeedFooter } from './Footer';
import { RSCFooter } from './ReadySetCyber/RSCFooter';
import { RSCHeader } from './ReadySetCyber/RSCHeader';
import { SkipToMainContent } from './SkipToMainContent/index';
import { matchPath } from 'utils/matchPath';
import { drawerWidth, FilterDrawerV2 } from './FilterDrawerV2';
Expand Down Expand Up @@ -162,65 +160,57 @@ export const Layout: React.FC<PropsWithChildren<ContextType>> = ({
<GovBanner />
<SkipToMainContent />
</div>
{!pathname.includes('/readysetcyber') ? (
<>
<div
style={{
display: 'flex',
flexDirection: 'row',
height: '100vh'
}}
>
{userLevel > 0 ? (
<FilterDrawerV2
setIsFilterDrawerOpen={setIsFilterDrawerOpen}
isFilterDrawerOpen={isFilterDrawerOpen}
isMobile={isMobile}
initialFilters={initialFilters}
/>
) : (
<Drawer
variant="persistent"
id="dummy-drawer-does-not-offer-functionality"
sx={{ width: drawerWidth }}
PaperProps={{ style: { position: 'unset' } }}
>
<Box width={drawerWidth} />
</Drawer>
)}
<Main open={isFilterDrawerOpen} user={!!user}>
<Header
isFilterDrawerOpen={isFilterDrawerOpen}
setIsFilterDrawerOpen={setIsFilterDrawerOpen}
/>
<div className="main-content" id="main-content" tabIndex={-1} />
<>
<div
style={{
display: 'flex',
flexDirection: 'row',
height: '100vh'
}}
>
{userLevel > 0 ? (
<FilterDrawerV2
setIsFilterDrawerOpen={setIsFilterDrawerOpen}
isFilterDrawerOpen={isFilterDrawerOpen}
isMobile={isMobile}
initialFilters={initialFilters}
/>
) : (
<Drawer
variant="persistent"
id="dummy-drawer-does-not-offer-functionality"
sx={{ width: drawerWidth }}
PaperProps={{ style: { position: 'unset' } }}
>
<Box width={drawerWidth} />
</Drawer>
)}
<Main open={isFilterDrawerOpen} user={!!user}>
<Header
isFilterDrawerOpen={isFilterDrawerOpen}
setIsFilterDrawerOpen={setIsFilterDrawerOpen}
/>
<div className="main-content" id="main-content" tabIndex={-1} />

<Box
display="block"
position="relative"
flex="1"
height="calc(100vh - 64px - 72px - 24px)"
overflow="scroll"
sx={{
'&::-webkit-scrollbar': {
display: 'none'
}
}}
zIndex={16}
>
{children}
</Box>
<CrossfeedFooter />
</Main>
</div>
</>
) : (
<>
<RSCHeader />
<div className={classes.content}>{children}</div>
<RSCFooter />
</>
)}
<Box
display="block"
position="relative"
flex="1"
height="calc(100vh - 64px - 72px - 24px)"
overflow="scroll"
sx={{
'&::-webkit-scrollbar': {
display: 'none'
}
}}
zIndex={16}
>
{children}
</Box>
<CrossfeedFooter />
</Main>
</div>
</>
</div>
</StyledScopedCssBaseline>
);
Expand Down
Loading

0 comments on commit ed31b7e

Please sign in to comment.