这个项目能做什么

SecureFlow is a local-first, evidence-driven application security workflow platform designed for authorized code analysis. Built in Rust, it emphasizes deterministic processes, human validation, and reproducible benchmarks without relying on network connectivity or automatic vulnerability confirmation. ### Core Architecture The project is structured around separate, versioned contracts and processes: 1. **Secure Engine**: Performs deterministic source-to-sink analysis. 2. **Secure Skill**: Provides contextual review of security invariants. 3. **Secure Bench**: Enables reproducible evaluation with separated metrics. 4. **Local Knowledge Base**: Stores provenance, deduplication, and versioned data. 5. **AI Agents (Optional)**: Assists in prioritization and investigation of ambiguous cases, though final authority always remains with the human researcher. ### Key Features #### Offline API Inventory (SecureFlow Web) SecureFlow includes a vertical for offline API inventorying that seals local scopes with authorization and expiry. It inventories Next.js routes, correlates client calls, OpenAPI specs, manifests, GraphQL, and tRPC. Crucially, it retains all outputs as candidates and does not execute target code or send network requests. The workflow includes: - `web-scope-create`: Defines authorized scope. - `web-inventory-nextjs`: Scans routes and correlations. - `web-infer`: Processes inventory data. - `web-assess`: Generates candidates, hardening notes, or abstentions based on operator-reviewed coverage matrices. - `web-review-assessment`: Allows humans to promote candidates to validated status using retained local evidence. #### Deterministic Analysis & Human Validation The CLI runs an explicitly selected Secure Engine binary, retaining its `secure-json-v1` output without reserialization. It generates a `secureflow-run-v2` manifest that preserves engine versions, report fingerprints, graph accounting, and finding states. - **Authorization**: Mandatory acknowledgement of authorization scope and reviewer identity. - **Sandboxing**: On Linux, uses Bubblewrap for private network and read-only host filesystem access by default. - **Validation**: Candidates are never automatically validated. A human reviewer must explicitly validate findings via `review-run`, writing to a separate manifest while leaving the original intact. #### Knowledge Base & Advisory Catalog SecureFlow maintains a local append-only ledger for reviewed findings, storing provenance, target revisions, and license evidence. It also supports importing public advisories (e.g., OSV, GitHub Advisory Database) into a separate SQLite catalog. - **Snapshot Management**: Supports preparing and importing OSV snapshots and deltas with strict license evidence requirements. - **Correlation**: Findings can be conservatively linked to package advisories, though `affected` status does not imply causality or validation. - **Bundling**: Advisory data can be distributed as Zstandard bundles in `core`, `malicious`, or `full` profiles, verified via SHA-256 hashes. #### Benchmarking & AI Integration - **Secure Bench**: Imports results from separate evaluation paths, verifying upstream schemas and suite fingerprints. Metrics are kept separate (TP/FN, FP/TN) to prevent superiority claims without blind studies. - **AI Preparation**: Optional AI integration prepares redacted, budgeted finding payloads for offline contract analysis. No provider client is implemented yet, and AI outputs do not alter human decisions. ### Usage Philosophy SecureFlow is designed to outperform human baselines on narrow, measurable tasks (coverage, speed, pattern memory) but explicitly abstains when evidence is insufficient. It ensures that zero candidates is not interpreted as a security guarantee, maintaining a strict boundary between automated scanning and human responsibility.