cnpm / cnpmcore

Private NPM Registry for Enterprise
https://npmmirror.com
MIT License
607 stars 80 forks source link

fix: remove CVE-2023-46809 revert config #683

Closed fengmk2 closed 4 months ago

fengmk2 commented 4 months ago

revert https://github.com/cnpm/cnpmcore/pull/650

run test on Node.js 22

Summary by CodeRabbit

coderabbitai[bot] commented 4 months ago

[!WARNING]

Rate Limit Exceeded

@fengmk2 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 38 seconds before requesting another review.

How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.
Commits Files that changed from the base of the PR and between 307792df75b0141ad4e3deb13537035aeab8c8ab and 40f1a263fe9584c6287ee915f6554c6897ae3588.

Walkthrough

The recent updates encompass multiple files, focusing on modernizing the Node.js version matrix, enhancing the encryption and decryption mechanisms using NodeRSA, and refining import statements to leverage ES module syntax. Additionally, a minor configuration change was made in the release workflow, and dependencies were updated in package.json. These changes collectively aim to improve security, maintain compatibility with newer Node.js versions, and streamline cryptographic operations.

Changes

File Change Summary
.github/workflows/nodejs.yml Updated node-version matrix from [16, 18, 20] to [18, 20, 22] in job configurations.
.github/workflows/release.yml Removed checkTest: false configuration.
app/common/CryptoUtil.ts Refactored encryption/decryption functions to use NodeRSA instead of crypto module.
package.json Removed "revert": ["CVE-2023-46809"], added "node-rsa": "^1.1.1" and "@types/node-rsa": "^1.1.4".
test/common/CryptoUtil.test.ts, test/port/webauth/webauthController.test.ts Updated import statements to use ES module syntax and added necessary imports for testing cryptographic functions.

๐Ÿ‡ In the land of code, where changes flow, Node versions rise, old ones go. RSA keys now shine so bright, Encrypting data, day and night. Dependencies fresh, imports refined, A safer, swifter app you'll find. ๐ŸŒŸ


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
socket-security[bot] commented 4 months ago

New and removed dependencies detected. Learn more about Socket for GitHub โ†—๏ธŽ

Package New capabilities Transitives Size Publisher
npm/@types/node-rsa@1.1.4 None +1 1.98 MB types

๐Ÿšฎ Removed packages: npm/mysql2@3.9.7, npm/npm-package-arg@10.1.0, npm/oss-cnpm@5.0.1, npm/p-map@4.0.0, npm/s3-cnpmcore@1.1.2, npm/semver@7.6.2, npm/ssri@8.0.1, npm/type-fest@2.19.0, npm/typescript@5.2.2, npm/ua-parser-js@1.0.37, npm/validate-npm-package-name@3.0.0

View full reportโ†—๏ธŽ

fengmk2 commented 4 months ago

image ็œ‹่ตทๆฅไธ็ฎ€ๅ•

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.84%. Comparing base (a51891d) to head (442dc40). Report is 1 commits behind head on master.

:exclamation: Current head 442dc40 differs from pull request most recent head 40f1a26

Please upload reports for the commit 40f1a26 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #683 +/- ## ======================================= Coverage 96.84% 96.84% ======================================= Files 181 181 Lines 17899 17902 +3 Branches 2311 2318 +7 ======================================= + Hits 17334 17337 +3 Misses 565 565 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fengmk2 commented 4 months ago

https://github.com/travist/jsencrypt/issues/84