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.
This project focuses on managing JSON Web Tokens signed with RS256. Inspired by pyjwt,
this library provides core encode and decode functionality, utilizing the standard crypto
package within Go instead of
cryptography.
pip install pygo-jwt
import pygo_jwt
private_jwk = pygo_jwt.new_jwk(size=2048)
private_pem = pygo_jwt.jwk_to_pem(private_jwk)
public_jwk = pygo_jwt.extract_public_jwk(private_jwk)
public_pem = pygo_jwt.extract_public_pem(private_pem)
payload = {'message': 'hello world', 'count': 4}
token = pygo_jwt.encode(payload=payload, key=private_pem, mode='pem')
token_data = pygo_jwt.decode(token=token, key=public_jwk, mode='jwk')
go mod init main
go get github.com/rkhullar/python-libraries/pygo-jwt/pygo_jwt/go
package main
import (
"fmt"
lib "github.com/rkhullar/python-libraries/pygo-jwt/pygo_jwt/go/core"
)
func main() {
private_jwk, _ := lib.NewJWK(2048, nil)
private_pem, _ := lib.JWKToPEM(private_jwk)
fmt.Println(private_jwk)
fmt.Println(private_pem)
}
FAQs
Encode and Decode RS256 JSON Web Tokens with Python and Go
We found that pygo-jwt demonstrated a healthy version release cadence and project activity because the last version was released less than 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.