Skip to content

Commit

Permalink
fix: security alerts (#932)
Browse files Browse the repository at this point in the history
* fix: update dependencies
* fix: security alerts
  • Loading branch information
rangoo94 authored Nov 8, 2023
1 parent 0f8f9db commit 78c8f58
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 92 deletions.
125 changes: 46 additions & 79 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const ExternalLink: React.FC<React.AnchorHTMLAttributes<HTMLAnchorElement>> = pr
const {children, ...rest} = props;

return (
<a target="_blank" {...rest}>
<a target="_blank" rel="noopener" {...rest}>
{children}
</a>
);
Expand Down
3 changes: 1 addition & 2 deletions packages/web/src/components/molecules/LabelsSelect/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ export const composeLabels = (labelsObject?: Record<string, string>): string[] =
return Object.entries(labelsObject || {}).map(([key, value]) => `${key}${value ? `:${value}` : ''}`);
};

export const labelRegex =
/^(([A-Za-z0-9][-A-Za-z0-9_./]*)?[A-Za-z0-9]:\s?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+)$/;
export const labelRegex = /^[a-z0-9]([a-z0-9_./-]*[a-z0-9])?:\s?[a-z0-9]([a-z0-9_.-]*[a-z0-9])?$/i;
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {ReactComponent as LockedIcon} from '@assets/lockedIcon.svg';

import ExternalLink from '@atoms/ExternalLink';

import {Button, Text} from '@custom-antd';

import Colors from '@styles/Colors';
Expand All @@ -15,10 +17,7 @@ const AiInsightsTab = () => (
<Text className="big bold"> This feature is available only in Testkube Cloud.</Text>
<Text color={Colors.slate400}>
Start using Testkube Cloud to get AI insights for your test executions, as well as other exclusive features.
<a href={externalLinks.testkubeCloud} target="_blank">
{' '}
Learn more
</a>
<ExternalLink href={externalLinks.testkubeCloud}> Learn more</ExternalLink>
</Text>
<Button
type="primary"
Expand Down
14 changes: 8 additions & 6 deletions packages/web/src/plugins/sider-support/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import {Popover} from 'antd';

import {createPlugin, external} from '@testkube/plugins';

import ExternalLink from '@atoms/ExternalLink';

import Text from '@custom-antd/Typography/Text';

import {DropdownListItem} from '@organisms/Sider/Sider.styled';
Expand Down Expand Up @@ -31,25 +33,25 @@ export default createPlugin('dashboard/sider-support')
content={
<>
<DropdownListItem>
<a href={externalLinks.documentation} target="_blank">
<ExternalLink href={externalLinks.documentation}>
<Text color={Colors.slate300} className="regular middle">
Documentation
</Text>
</a>
</ExternalLink>
</DropdownListItem>
<DropdownListItem>
<a href={tk.data.discordUrl} target="_blank">
<ExternalLink href={tk.data.discordUrl}>
<Text color={Colors.slate300} className="regular middle">
Discord community
</Text>
</a>
</ExternalLink>
</DropdownListItem>
<DropdownListItem>
<a href={externalLinks.github} target="_blank">
<ExternalLink href={externalLinks.github}>
<Text color={Colors.slate300} className="regular middle">
GitHub
</Text>
</a>
</ExternalLink>
</DropdownListItem>
</>
}
Expand Down

0 comments on commit 78c8f58

Please sign in to comment.