Message "DeprecationWarning: Buffer() is deprecated due to security and usability issues" when running createComment
See original GitHub issueDescribe the bug I am getting the following message printing out in the Actions log when I run “github.rest.issues.createComment”.
(node:1609) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
I noticed that this also happens for some other comamnds
To Reproduce Steps to reproduce the behavior:
- Create a GitHub Action with `github.rest.issues.createComment({ … })
- Go to ‘Actions’ tab and run the command
- Click on the Action
- Discover that the following message is printed out in the step
Expected behavior I don’t expect to see a message like that, as that actually portraits that the Action does not follow a safe guideline.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:31
- Comments:6
Top Results From Across the Web
Buffer() is deprecated due to security and usability issues ...
According to the deprecation warning new Buffer() should be replaced with one of: Buffer.alloc(); Buffer.allocUnsafe() or; Buffer.from().
Read more >DeprecationWarning - Seed.run
You might see one of the following error messages, or something similar ... DeprecationWarning: Buffer() is deprecated due to security and usability issues....
Read more >[DEP0005] DeprecationWarning: Buffer() is deprecated due to ...
The message appears : (STDERR) (node:24329) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues.
Read more >Next.js - Richiban
(node:22980) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), ...
Read more >CHANGELOG.txt 3.3.604.0 - PowerShell Gallery
You can then easily drill into specific issues with CloudWatch Automatic Dashboards ... The Test-ETSRole cmdlet now emits a deprecation warning, due to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I recently saw this and after a bit of digging the situation is currently this:
github-script 5.0.0
depends on@octokit/core ^3.5.1
@octokit/core 3.5.1
depends on@octokit/request ^5.6.0
@octokit/request 5.6.2
depends onnode-fetch ^2.6.1
This is the point where things break down. Basically the last
node-fetch 2.x
depends on a version of thewhatwg-url
module from 2017 that contains thenew Buffer()
usage. However, not only haswhatwg-url
since then removed their usage ofnew Buffer()
butnode-fetch
versions post-2.x
don’t even depend onwhatwg-url
anymore.So I guess what needs to happen is
@octokit/request
should update their dependency onnode-fetch
.Actually it seems with the recent update of
@octokit/request
to v5.6.3 which bumped thenode-fetch
dependency to^2.6.7
, the deprecation message should no longer be happening.