Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
atlas-git-identity
Advanced tools
A CLI tool which sets a git repository's author based on package.json or arguments.
A CLI tool which sets a git repository's author based on package.json or arguments.
npm install -g atlas-git-identity
Note: make sure you install this globally (-g
) unless you're using the API for a local project.
There are few things that are more annoying than Gravatar leaking your identity to nearly everything you touch with your e-hands. Similarly with git, you might be surprised when you look back on some of your commits and realize they've been authored under your real name. Some people don't care, but this really bothers me as my real name is so common, it makes everything I do much less interesting.
Do yourself a favor and run:
git config --global user.useConfigOnly true
After running this, your machine will force you to set a local identity on all of your git projects. At least for me, this extra configuration work when I start a new project is well worth the peace of mind (i.e. my privacy). This CLI tool aims to eliminate the extra work I put on myself.
After installing this package, the command below will automatically set your git identity for the current project based on your package.json
's "author"
field:
git-identity
If you don't have this field, you can also specify your name and email as arguments:
git-identity atlassubbed atlassubbed@gmail.com
You can also do all of the above programmatically:
const { parseAuthor, setIdentity } = require("atlas-git-identity");
const stringAuthor = "atlassubbed <atlassubbed@gmail.com>"
const author = parseAuthor(stringAuthor)
setIdentity(author, process.cwd(), err => {
if (!err) console.log("success!")
})
We can directly set whichever of the git config "user" fields we want:
...
setIdentity({name:"atlassubbed"}, err => {
if (!err) console.log("success!")
})
We can set any number of the git config "user" fields:
setIdentity({name: "atlassubbed", signingkey: "123"}, err => {
if (!err) console.log("success!")
})
At first, this package automatically ran git config --global user.useConfigOnly true
to remove that step as well, however it's a bad idea because it may not be desired on some machines. Furthermore, the step only needs to be run once and is entirely optional, so it's not a problem. Please run this command separately if you would like to force a local identity on your git projects.
FAQs
A CLI tool which sets a git repository's author based on package.json or arguments.
We found that atlas-git-identity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.