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.
github.com/go-suriya/shop-api-echo
Published by Pakphom Promsean.
So this project is going to act like CRUD project + OAuth2.
Pull the PostgreSQL image
docker pull postgres:alpine
Start the PostgreSQL container
docker run --name shopdb -p 5432:5432 -e POSTGRES_PASSWORD=123456 -d postgres:alpine
Create the Shop Database
docker exec -it shopdb bash
psql -U postgres
CREATE DATABASE shopdb;
In case you need to delete the database
DROP DATABASE shopdb;
go run ./databases/migration/migratedb.go
server:
port: 8080
allowOrigins:
- "*"
bodyLimit: "10M" # MiB
timeout: 30 # Seconds
oauth2:
playerRedirectUrl: "http://localhost:8080/v1/oauth2/google/player/login/callback"
adminRedirectUrl: "http://localhost:8080/v1/oauth2/google/admin/login/callback"
clientId: "xxxxx.apps.googleusercontent.com"
clientSecret: "xxxxx"
endpoints:
authUrl: "https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force"
tokenUrl: "https://oauth2.googleapis.com/token"
deviceAuthUrl: "https://oauth2.googleapis.com/device/code"
scopes:
- "https://www.googleapis.com/auth/userinfo.email"
- "https://www.googleapis.com/auth/userinfo.profile"
userInfoUrl: "https://www.googleapis.com/oauth2/v2/userinfo"
revokeUrl: "https://accounts.google.com/o/oauth2/revoke"
database:
host: localhost
port: 5432
user: postgres
password: 168
dbname: shopdb
sslmode: disable
schema: public
Let's see the IPv4 of our database container first by this follwing command.
docker network inspect bridge
Then copy the IPv4 of shopdb to change the host of database in the config.yaml.
And now let's build and start the shop-api through the Docker.
docker build -t shop-api:v1.0.0 .
docker run --name shop-api -v /path/to/config-folder:/app/etc -d shop-api:v1.0.0
FAQs
Unknown package
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.