Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: portal bitcoin assets compatibility #2544

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Conversation

jojoo-eth
Copy link
Contributor

Summary

[Summary about this PR](fix: portal bitcoin assets compatibility)

  • Closes #issue

Copy link

vercel bot commented Aug 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 4:17pm
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 4:17pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Aug 30, 2024 4:17pm

Copy link

github-actions bot commented Aug 30, 2024

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

infra/rooch-portal-v2/package.json

PackageVersionLicenseIssue Type
dompurify^3.1.6NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@types/dompurify ^3.0.5 🟢 6.9
Details
CheckScoreReason
Code-Review🟢 8Found 23/27 approved changesets -- score normalized to 8
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 9license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Security-Policy🟢 10security policy file detected
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
Fuzzing⚠️ 0project is not fuzzed
npm/dompurify ^3.1.6 🟢 6.1
Details
CheckScoreReason
Code-Review🟢 7Found 7/10 approved changesets -- score normalized to 7
Maintained🟢 1023 commit(s) and 14 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 9license file detected
Signed-Releases⚠️ -1no releases found
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Fuzzing⚠️ 0project is not fuzzed
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 10SAST tool is run on all commits
Vulnerabilities🟢 64 existing vulnerabilities detected

Scanned Manifest Files

infra/rooch-portal-v2/package.json
  • @types/dompurify@^3.0.5
  • dompurify@^3.1.6

overflowWrap: 'break-word',
}}
>
{parsePlainText}
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的 text 会做安全过滤么?比如 text 里有 html 内容。

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

React 本身会对字符串转义,保险起见我用 DOMPurify 再处理一遍

try {
parsePlainText =
i.value.content_type === 'text/plain;charset=utf-8'
? DOMPurify.sanitize(JSON.stringify(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jolestar done

@jolestar jolestar merged commit 4e6d0d3 into main Aug 30, 2024
9 checks passed
@jolestar jolestar deleted the fix/assets-bitcoin-parse branch August 30, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants