kodadot / workers

Implementation of Cloudflare Workers in KodaDot
https://kodadot.xyz
9 stars 12 forks source link

fix: opengraph images #308

Closed preschian closed 3 months ago

preschian commented 3 months ago

Context

Previously it fails render some images. This PR is to force "all" images by using smaller resolution

before: https://ogi.koda.art/ahp/gallery/127-2406146262/__og_image__/og.png after: https://ogi-fix-opengraph-images.workers-ogi.pages.dev/__og-image__/image/ahp/gallery/127-2406146262/og.png

Ref

PR Type

socket-security[bot] commented 3 months ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/nuxt-og-image@3.0.0-rc.53 Transitive: environment, eval, filesystem, network, shell, unsafe +55 61.1 MB harlan_zw
npm/prettier@3.3.2 environment, filesystem, unsafe 0 8.25 MB prettier-bot
npm/remark-parse@11.0.0 None 0 19.5 kB wooorm
npm/remark-stringify@11.0.0 None 0 19.6 kB wooorm
npm/unified@11.0.4 None 0 147 kB wooorm
npm/vfile-matter@5.0.0 None 0 13.5 kB wooorm

🚮 Removed packages: npm/tslib@2.6.2

View full report↗︎

socket-security[bot] commented 3 months ago

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Install scripts npm/@fortawesome/free-regular-svg-icons@6.5.2
  • Install script: postinstall
  • Source: node attribution.js
  • orphan: npm/@fortawesome/free-regular-svg-icons@6.5.2
Install scripts npm/@fortawesome/free-solid-svg-icons@6.5.2
  • Install script: postinstall
  • Source: node attribution.js
  • orphan: npm/@fortawesome/free-solid-svg-icons@6.5.2
Install scripts npm/@fortawesome/fontawesome-common-types@6.5.2
  • Install script: postinstall
  • Source: node attribution.js
  • orphan: npm/@fortawesome/fontawesome-common-types@6.5.2
Install scripts npm/json-editor-vue@0.15.1
  • Install script: preinstall
  • Source: node -e "if (process.env.INIT_CWD === process.cwd()) { process.exit(1) }" || npx only-allow pnpm
Install scripts npm/json-editor-vue@0.15.1
  • Install script: postinstall
  • Source: node -e "if (process.env.INIT_CWD === process.cwd()) { process.exit(1) }" || npx simple-git-hooks
Install scripts npm/esbuild@0.21.5

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/@fortawesome/free-regular-svg-icons@6.5.2
  • @SocketSecurity ignore npm/@fortawesome/free-solid-svg-icons@6.5.2
  • @SocketSecurity ignore npm/@fortawesome/fontawesome-common-types@6.5.2
  • @SocketSecurity ignore npm/json-editor-vue@0.15.1
  • @SocketSecurity ignore npm/esbuild@0.21.5
cloudflare-workers-and-pages[bot] commented 3 months ago

Deploying workers-ogi with  Cloudflare Pages  Cloudflare Pages

Latest commit: 492ab52
Status: ✅  Deploy successful!
Preview URL: https://49937f34.workers-ogi.pages.dev
Branch Preview URL: https://ogi-fix-opengraph-images.workers-ogi.pages.dev

View logs

preschian commented 3 months ago

merging this, and continue to https://github.com/kodadot/workers/issues/311