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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FC } from 'react'
import { BaseModal } from '~/libs/ui'
import { AiWorkflow } from '~/apps/review/src/lib/hooks'
import { IconExternalLink } from '~/apps/review/src/lib/assets/icons'
import { MarkdownReview } from '~/apps/review/src/lib/components/MarkdownReview'

import AiModelIcon from '../AiModelIcon'

Expand Down Expand Up @@ -35,7 +36,7 @@ const AiModelModal: FC<AiModelModalProps> = props => (
</div>

<p className={styles.modelDescription}>
{props.model.description}
<MarkdownReview value={props.model.description} />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Ensure that props.model.description is sanitized before rendering with MarkdownReview to prevent potential XSS vulnerabilities. If MarkdownReview handles sanitization internally, this can be ignored.

</p>
</div>
</BaseModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ReviewsContextModel } from '~/apps/review/src/lib/models'
import { useRolePermissions, UseRolePermissionsResult } from '~/apps/review/src/lib/hooks'
import { ArrowCircleDownIcon, ArrowCircleUpIcon } from '@heroicons/react/outline'

import { MarkdownReview } from '../../../../lib/components/MarkdownReview'
import { IconClock, IconFile, IconPremium } from '../../../../lib/assets/icons'
import { AiModelModal } from '../AiModelModal'
import { useReviewsContext } from '../../ReviewsContext'
Expand Down Expand Up @@ -105,7 +106,7 @@ const ScorecardHeader: FC = () => {
</div>
</div>
<p className={styles.workflowDescription}>
{workflow.description}
<MarkdownReview value={workflow.description} />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Ensure that workflow.description is properly sanitized before being passed to MarkdownReview to prevent potential XSS vulnerabilities if description contains user-generated content.

</p>
{/* <div className={styles.workflowFileLink}>
<a href={workflow.defUrl}>
Expand Down
Loading