Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Unbloat maximizes the security posture of your repository and purges unnecessary file weight without compromising commit and commit message history.
Unbloat is a powerful tool designed to help developers manage and clean up their Git repositories by identifying and handling files and directories that were once tracked but no longer present in the most recent commits across existing branches. It's particularly useful for removing API keys, passwords or other sensitive data, and large files and directories that were accidentally committed (e.g. /node_modules), while keeping commit and commit message history intact.
npm run unbloat
Unbloat works by scanning the entire Git repository, including all branches and reflog entries, to compile a comprehensive list of files that have ever been tracked. It then compares this list to the files present in the latest commits across all currently existing branches. This comparison allows Unbloat to accurately identify files that are no longer needed, providing the developer with the option to either view these files or remove them permanently from the repository's history. Once the obsolete files are identified Unbloat offers a cleanup option that not only removes these files but also purges stashes, tags, original refs, the Git reflog and unreachable objects, maximizing the security posture of the repository while also ensuring that it is as lean and performant as possible. Given the powerful nature of Unbloat it is highly recommended that developers experiment with it in a controlled environment before applying changes to their main repository. This can be achieved by running it from a local copy of the repository, carefully reviewing the list of identified files, and extensive regression testing. When confident in the repository's unbloated state, ensure collaborators are aware before forcing updates to the remote origin.
With npm do
$ npm install unbloat
(MIT)
Copyright (c) 2024 David H. <email6@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unbloat maximizes the security posture of your repository and purges unnecessary file weight without compromising commit and commit message history.
The npm package unbloat receives a total of 19 weekly downloads. As such, unbloat popularity was classified as not popular.
We found that unbloat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.