Principle:0sec labs 0 Repository Ingestion
| Knowledge Sources | |
|---|---|
| Domains | Source_Code_Review, CLI, Security |
| Last Updated | 2026-10-30 00:00 GMT |
Overview
Technique for ingesting a repository into a security review pipeline by selecting an operator profile, scan depth, and LLM runtime that determine the analysis strategy.
Description
Repository ingestion is the entry point for source code security review. It accepts a repository path (local directory or git URL) and operator-selectable parameters: profile (default, c-library, linux-kernel, onchain variants, xnu-kernel, xnu-re — each targets a different ecosystem's vulnerability classes), depth (quick, default, deep — controls analysis thoroughness), and runtime (auto, claude, codex, gemini, api, ollama — selects the LLM backend). These parameters flow into a RunOptions object that drives the unified run command and the core agent loop.
Usage
Use this principle when designing a source code security review system. The profile determines which vulnerability classes are prioritized, the depth controls time vs. coverage, and the runtime determines which LLM backend performs the reasoning.
Theoretical Basis
The ingestion maps operator intent to pipeline configuration:
# Abstract model (NOT real implementation)
class RunOptions:
repo: str # local path or git URL
profile: str # default | c-library | linux-kernel | xnu-kernel | ...
depth: str # quick | default | deep
runtime: str # auto | claude | codex | gemini | api | ollama
cost_ceiling_usd: float # hard budget
# Profile → vulnerability classes:
# default → web/JS/TS/Python (XSS, SSRF, SQLi, IDOR)
# c-library → C/C++ memory safety (buffer overflow, UAF, fmt string)
# linux-kernel → kernel-aware (copy_from_user, race conditions, refcount)
# xnu-kernel → Apple XNU source (Mach ports, IOKit)
# *-onchain → smart contract (reentrancy, oracle manipulation, auth)