
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
universal-github-client
Advanced tools
A Github API Client for the browser and Node JS
First install the package
npm i universal-github-client
# or
yarn add universal-github-client
Then you need to generate a new token from your Github profile and make sure that this token has access to the relevant scopes that you plan to query the API for.
Then you need to configure and setup your Github Client instance:
You need to install a fetch polyfill because Node does not include one.
npm i node-fetch
# or
yarn add node-fetch
const fetch = require('node-fetch');
const { GithubClient } = require('universal-github-client');
const client = new GitHubClient({
base: 'https://api.github.com',
token: 'YOUR_GITHUB_TOKEN_HERE',
fetch
});
Please note that this package is supported by browsers which implement natively the Fetch API and have support for Promises. If you are using an outdated browser, you need to install a polyfill for Fetch and Promises.
import { GithubClient } = from 'universal-github-client';
const client = new GitHubClient({
base: 'https://api.github.com',
token: 'YOUR_GITHUB_TOKEN_HERE',
fetch
});
When you have installed and configured the client
, you can make calls to the Github API:
You can use the paths defined in the Github API documentation.
For example, if you want to get the repositories for a user you need to do the following:
const repos = client.get({ path: '/users/scriptex/repo' }); // scriptex is the Github user name
There are five different instance methods based on the HTTP method required by a particular endpoint in the Github API.
client.get({ path });
client.post({ path, data });
client.delete({ path });
client.put({ path, data });
client.patch({ path, data });
MIT
FAQs
A Github API Client for the browser and Node
We found that universal-github-client 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.