惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
Jina AI
Jina AI
雷峰网
雷峰网
博客园_首页
WordPress大学
WordPress大学
博客园 - 司徒正美
爱范儿
爱范儿
博客园 - 聂微东
IT之家
IT之家
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
博客园 - Franky
V
V2EX
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Free Security Audit API: Scan Your Code in 30 Seconds
Ahmed Moussa · 2026-05-28 · via DEV Community

Ahmed Moussa

Most developers know they should scan their code for vulnerabilities. Few actually do it consistently. The friction is real: install a tool, configure rules, wait for a slow scan, parse noisy output.

What if you could scan any code snippet with a single curl command and get structured JSON back in under 30 seconds?

The Problem With Security Scanning Today

Static analysis tools are powerful but heavy. Setting up Semgrep, CodeQL, or Snyk in a CI pipeline takes hours. For a quick check on a code snippet, you need something lighter.

I wanted an API where I could POST code and GET findings. No CLI installation, no configuration files, no 200MB Docker images.

SecureScope: Security Audit as an API

SecureScope is a REST API that scans source code for security vulnerabilities. Send code in, get findings out. Each finding includes severity, description, affected line, and remediation steps.

Getting Your API Key

Free tier gives you 10 scans per month. No credit card.

curl -X POST https://api.aaido.dev/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

Enter fullscreen mode Exit fullscreen mode

Response:

{
  "api_key": "ak_abc123...",
  "tier": "free",
  "monthly_limit": 100
}

Enter fullscreen mode Exit fullscreen mode

Save that key. It will not be shown again.

Your First Scan

Here is a Python snippet with an obvious vulnerability:

import pickle
data = pickle.loads(user_input)

Enter fullscreen mode Exit fullscreen mode

Scan it:

curl -X POST https://api.aaido.dev/v1/products/securescope/scan \
  -H "X-API-Key: ak_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "import pickle\ndata = pickle.loads(user_input)",
    "language": "python"
  }'

Enter fullscreen mode Exit fullscreen mode

Response:

{
  "findings": [
    {
      "severity": "HIGH",
      "rule": "unsafe-deserialization",
      "line": 2,
      "message": "pickle.loads with untrusted input enables arbitrary code execution",
      "remediation": "Use json.loads() or validate input before deserialization"
    }
  ],
  "scan_id": "sc_a1b2c3",
  "risk_score": 8.5
}

Enter fullscreen mode Exit fullscreen mode

Each finding tells you exactly what is wrong, where, and how to fix it.

A More Realistic Example

Let me scan a Flask route that has multiple issues:

from flask import Flask, request
import subprocess
import sqlite3

app = Flask(__name__)

@app.route('/search')
def search():
    query = request.args.get('q')
    conn = sqlite3.connect('app.db')
    results = conn.execute(f"SELECT * FROM items WHERE name LIKE '%{query}%'")
    return str(results.fetchall())

@app.route('/run')
def run_cmd():
    cmd = request.args.get('cmd')
    output = subprocess.check_output(cmd, shell=True)
    return output

Enter fullscreen mode Exit fullscreen mode

The scan picks up:

  • SQL Injection (HIGH) on line 11 -- f-string in SQL query
  • Command Injection (CRITICAL) on line 16 -- unsanitized user input in shell command
  • No CSRF Protection (MEDIUM) -- Flask app without CSRF tokens

Each with remediation: use parameterized queries, use subprocess.run with a whitelist, add flask-wtf for CSRF.

Integrating Into CI/CD

A simple GitHub Actions step:

- name: Security scan
  run: |
    RESULT=$(curl -s -X POST https://api.aaido.dev/v1/products/securescope/scan \
      -H "X-API-Key: ${{ secrets.SECURESCOPE_KEY }}" \
      -H "Content-Type: application/json" \
      -d "{\"code\": \"$(cat src/main.py | jq -Rs .)\", \"language\": \"python\"}")

    HIGH_COUNT=$(echo $RESULT | jq '[.findings[] | select(.severity == "HIGH" or .severity == "CRITICAL")] | length')

    if [ "$HIGH_COUNT" -gt "0" ]; then
      echo "Found $HIGH_COUNT high/critical vulnerabilities"
      echo $RESULT | jq '.findings[] | select(.severity == "HIGH" or .severity == "CRITICAL")'
      exit 1
    fi

Enter fullscreen mode Exit fullscreen mode

This blocks PRs with high-severity findings. Free tier covers most small teams at 10 scans per month.

Supported Languages

Python, JavaScript, TypeScript, Go, Rust, Java, Solidity, Ruby, PHP. The scanner combines pattern matching with AI analysis, so it catches both known vulnerability patterns and context-specific issues.

Why an API Instead of a CLI Tool?

Three reasons:

  1. Zero installation -- works from any environment with curl
  2. Always updated -- new rules deploy server-side without client updates
  3. Composable -- pipe output to Slack, Jira, or your own dashboard

The API returns structured JSON, not messy terminal output. Parse it, filter it, route it wherever you need.

Pricing

The free tier (10 scans/month) covers casual use. Pro at $49/month gives 50 scans with deeper analysis. Enterprise at $199/month adds multi-model consensus scanning.

Product page: api.aaido.dev/products/securescope