Backend API for the Safeturned security scanning service that protects Unturned servers from malicious plugins. This API handles plugin analysis, threat detection, and provides REST endpoints for the web interface.
Try it now: https://safeturned.com - Upload and scan your Unturned plugins instantly!
This API processes Unturned plugin files (.dll) and scans them for:
- Backdoors and malicious code
- Suspicious patterns and functions
- Security vulnerabilities
- Code obfuscation attempts
- Framework: ASP.NET Core 9.0 with Aspire
- Database: PostgreSQL, dbup & EF Core migrations
- Background Jobs: Hangfire
- Logging: Serilog
- Error Tracking: Sentry & Bugsink
- API Documentation: Swagger/OpenAPI
- Deployment: GitHub Actions builds with Aspire, pushes to GHCR, and deploys via SSH, we do not make it via GH Release for simple!
- .NET 9.0 SDK
- Docker Desktop (required for Aspire to run services)
- Clone and setup:
git clone https://github.com/Safeturned/Api.git
cd Api- Install Aspire CLI:
dotnet tool install --global Aspire.Cli- Run with Aspire (includes PostgreSQL and pgAdmin):
aspire run- Services will be available at:
- API:
http://localhost:5000 - pgAdmin:
http://localhost:5050 - Hangfire Dashboard:
http://localhost:5000/hangfire
- API:
The API is automatically deployed when you create a version tag:
git tag 1.0.0
git push origin 1.0.0This triggers:
- Build - Aspire publishes the application
- Container - Docker image is built and pushed to GitHub Container Registry
- Deploy - Files are copied to server and deployed via SSH
POST /v1/files- Upload and scan a .dll plugin fileGET /v1/files/{id}- Get scan results by file IDGET /v1/analytics- Get analytics dataGET /health- Health check endpoint
Note: API requires authentication via API key and origin validation. In the short/long term future, we plan to make the API publicly available for everyone.
Api/
├── src/ # Main API project
├── Safeturned.AppHost/ # Aspire host
├── Safeturned.ServiceDefaults/ # Shared services
└── FileChecker/ # Plugin analysis logic
MIT License - see LICENSE file.