
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
github.com/fermyon/enterprise-architectures-and-patterns/http-crud-go-sqlite
This is a sample implementation of CRUD (Create, Read, Update, Delete) in Go.
The sample is using SQLite for persistence and provides the following API endpoints via HTTP:
GET /items
- To retrieve a list of all itemsGET /items/:id
- To retrieve a item using its identifierPOST /items
- To create a new itemPUT /items/:id
- To update an existing item using its identifierDELETE /items/batch
- To delete multiple items providing an array of identifiers as payloadDELETE /items/:id
- To delete an existing item using its identifierSend data to POST /items
and PUT /items/:id
using the following structure:
{
"name": "item name",
// boolean (either true or false)
"active": true
}
To run the sample on your local machine, you must have the following software installed:
spin up
)To run the sample locally, you must provide @migrations.sql
using the --sqlite
flag to seed the database as shown in the snippet below:
# Build the project
spin build
# Run the sample
spin up --sqlite @migrations.sql
Logging component stdio to ".spin/logs/"
Storing default SQLite data to ".spin/sqlite_db.db"
Serving http://127.0.0.1:3000
Available Routes:
http-crud-go-sqlite: http://127.0.0.1:3000 (wildcard)
You can deploy this sample to Fermyon Cloud following the steps below:
# Authenticate
spin cloud login
# Deploy the sample to Fermyon Cloud
# This will ask if a new database should be created or an existing one should be used
# Answer the question with "create a new database"
spin deploy
Uploading http-crud-go-sqlite version 0.1.0 to Fermyon Cloud...
Deploying...
App "http-crud-go-sqlite" accesses a database labeled "default"
Would you like to link an existing database or create a new database?: Create a new database and link the app to it
What would you like to name your database?
What would you like to name your database?
Note: This name is used when managing your database at the account level. The app "http-crud-go-sqlite" will refer to this database by the label "default".
Other apps can use different labels to refer to the same database.: sincere-mulberry
Creating database named 'sincere-mulberry'
Waiting for application to become ready.......... ready
View application: https://http-crud-go-sqlite-jcmbpezb.fermyon.app/
Manage application: https://cloud.fermyon.com/app/http-crud-go-sqlite
# Ensure tables are created in the new database (here sincere-mulberry)
spin cloud sqlite execute --database sincere-mulberry @migrations.sql
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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.