Class CodeReviewPipeline
java.lang.Object
com.tnsai.quality.security.harness.CodeReviewPipeline
Top-level orchestrator for the agent-driven code-review pipeline (TNS-291).
Holds the pipeline configuration — matchers, agents, state store,
project root — and exposes one method per stage plus a run()
convenience that runs them in order. Each stage() call is
idempotent and safe to invoke multiple times.
Quick start
CodeReviewPipeline pipeline = CodeReviewPipeline.builder()
.projectRoot(Path.of("/work/myrepo"))
.matcher(BuiltInMatchers.SQL_INJECTION)
.matcher(BuiltInMatchers.PATH_TRAVERSAL)
.agent(ReviewAgent.claudeOpus(llmClient))
.stateStore(new FileSystemPipelineStateStore(Path.of(".tnsai/security")))
.build();
pipeline.scan(); // matchers fire → FileRecords
pipeline.process(); // agent runs per file
pipeline.export(ExportFormat.SARIF, Path.of("findings.sarif"));
- Since:
- 0.10.0 (TNS-291)
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CodeReviewPipeline.Builderbuilder()context()Read-only view of the pipeline's configuration.Execute one stage by id.run()Run every registered stage in registration order; returns each stage'sStageResult.Lookup a stage by id; absent when the stage hasn't been registered.
-
Method Details
-
context
Read-only view of the pipeline's configuration. -
stage
Lookup a stage by id; absent when the stage hasn't been registered. -
execute
Execute one stage by id. Throws if the stage isn't registered — usestage(String)for a non-throwing lookup. -
run
Run every registered stage in registration order; returns each stage'sStageResult. -
builder
-