Skip to content

Commit

Permalink
formatting and remove hasher log
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilShahi committed Oct 1, 2022
1 parent e37fd23 commit d05759e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
5 changes: 4 additions & 1 deletion backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ import { getVulnerabilitySummaryHandler } from "api/alert/vulnerability"
import { getAttackHandler, getAttacksHandler } from "api/attacks"
import { inSandboxMode } from "utils"
import { createKey, deleteKey, listKeys } from "api/keys"
import { getInstanceSettingsHandler, putInstanceSettingsHandler } from "api/settings"
import {
getInstanceSettingsHandler,
putInstanceSettingsHandler,
} from "api/settings"

const app: Express = express()
const port = process.env.PORT || 8080
Expand Down
4 changes: 2 additions & 2 deletions backend/src/services/get-endpoints/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export class GetEndpointsService {
}
}
if (getEndpointParams?.isAuthenticatedDetected) {
whereConditions= {
whereConditions = {
...whereConditions,
isAuthenticatedDetected: getEndpointParams.isAuthenticatedDetected
isAuthenticatedDetected: getEndpointParams.isAuthenticatedDetected,
}
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/jobs/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ export const updateUnauthenticatedEndpoints = `
AND "sessionMeta" ->> 'authenticationProvided' = 'false'
AND "sessionMeta" ->> 'authenticationSuccessful' = 'true'
)
`
`
1 change: 0 additions & 1 deletion backend/src/utils/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import crypto from "crypto"

export const hasher = key => {
let salt = process.env.ENCRYPTION_KEY
console.log(salt)
let hash = crypto.createHmac("sha512", salt)
hash.update(key)
let value = hash.digest("base64")
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/api/home/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const getSummary = async (): Promise<Summary> => {

export const getInstanceSettings = async (): Promise<InstanceSettings> => {
try {
const resp = await axios.get<InstanceSettings>(`${getAPIURL()}/instance-settings`)
const resp = await axios.get<InstanceSettings>(
`${getAPIURL()}/instance-settings`,
)
return resp.data
} catch (err) {
console.error(`Error fetching instance settings: ${err}`)
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Alert/AlertDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ export const AlertDetail: React.FC<AlertDetailProps> = ({
const [rightPanel, setRightPanel] = useState(null)
const scrollRef = useRef(null)
const topDivRef = useRef(null)
console.log(providedSpecExtension)

const executeScroll = () => {
scrollRef.current?.scrollIntoView()
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/components/EndpointList/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,12 @@ const EndpointFilters: React.FC<EndpointFilterProps> = React.memo(
<Box w={{ base: "full", lg: "xs" }} zIndex="1000">
<FilterHeader title="Detected Authentication" />
<Select
defaultValue={
params &&
{ label: "All", value: null }
}
defaultValue={params && { label: "All", value: null }}
size="sm"
options={[
{ label: "All", value: null },
{ label: "Authenticated", value: true },
{ label: "Unauthenticated", value: false }
{ label: "Unauthenticated", value: false },
]}
placeholder="Filter by Detected Authentication"
instanceId="endpoint-tbl-env-isAuthenticatedDetected"
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/Home/HomeUpdateEmailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export const HomeUpdateEmailView: React.FC<{}> = () => {
}}
/>
<FormHelperText>
We will only use this email to send you important updates about Metlo.
We will only use this email to send you important updates about
Metlo.
</FormHelperText>
</FormControl>
<Button colorScheme="blue" onClick={submit}>
Expand Down

0 comments on commit d05759e

Please sign in to comment.