AI-powered code reviews, vulnerability analysis, architecture drift detection, test gap analysis, and release readiness scoring — directly in your Jenkins pipeline. Supports OpenAI, Anthropic Claude, Ollama (local), LM Studio, vLLM, and any OpenAI-compatible endpoint.
Every CI/CD pipeline runs linters and tests — but they miss the architectural, strategic, and contextual issues that only experienced engineers catch. ForgeAI bridges that gap by embedding AI-powered intelligence directly into your Jenkins pipeline.
-
8 specialized analyzers, each with expert-level system prompts tuned for its domain
-
Architecture-aware analysis that understands hexagonal, layered, CQRS, and microservice patterns
-
Composite scoring that weighs security 3× and architecture 2× — because not all findings are equal
-
Release readiness verdicts (SHIP_IT / CAUTION / HOLD / BLOCK) that synthesize all analyses
-
Zero-cloud mode via Ollama for air-gapped and regulated environments
-
A self-contained HTML report archived with every build
| Analyzer | ID | What It Does |
|---|---|---|
AI Code Review |
|
SOLID, DRY, naming, error handling, anti-patterns, readability |
Vulnerability Analysis |
|
OWASP Top 10, hardcoded secrets, injection, CWE mapping |
Architecture Drift Detection |
|
Layer violations, circular deps, coupling, pattern enforcement |
Test Gap Analysis |
|
Untested paths, missing edge cases, test quality, concrete suggestions |
Dependency Risk Scoring |
|
License conflicts, unmaintained deps, unpinned versions, duplication |
Commit Intelligence |
|
Commit hygiene, breaking change detection, changelog & semver suggestions |
Pipeline Optimizer |
|
Parallelization, caching, resource waste, failure resilience |
Release Readiness |
|
Composite verdict synthesizing all prior analyses |
ForgeAI is provider-agnostic. Use whatever fits your security and budget requirements:
| Provider | Type | API Key Required | Air-Gapped |
|---|---|---|---|
OpenAI (GPT-4o, GPT-4o-mini, o1) |
Cloud API |
Yes |
No |
Anthropic Claude (claude-opus-4-7, claude-sonnet-4-6) |
Cloud API |
Yes |
No |
Ollama (DeepSeek-Coder, CodeLlama, Llama 3, Mistral, Phi-3) |
Local |
No |
Yes |
LM Studio |
Local |
No |
Yes |
vLLM / LocalAI / text-generation-webui |
Self-hosted |
Optional |
Yes |
Any OpenAI-compatible endpoint |
Varies |
Varies |
Varies |
-
Go to Manage Jenkins → Plugins → Available plugins
-
Search for ForgeAI Pipeline Intelligence
-
Install and restart Jenkins
Navigate to Manage Jenkins → System → ForgeAI Pipeline Intelligence:
-
Select your LLM Provider (OpenAI / Anthropic / Ollama)
-
Enter the Endpoint URL (e.g.,
https://api.openai.com/) -
Enter the Model ID (e.g.,
gpt-4o) -
Select or create an API Key credential (Jenkins Secret Text)
-
Click Test Connection to verify
-
Enable or disable individual analyzers
-
Save
| Setting | Description | Default |
|---|---|---|
LLM Provider |
OpenAI / Anthropic / Ollama |
OpenAI |
Endpoint URL |
API base URL |
|
Model ID |
Model to use |
|
API Key Credential |
Jenkins Secret Text credential ID |
— |
Temperature |
LLM creativity (0.0–1.0) |
|
Timeout |
Request timeout in seconds |
|
Max Tokens |
Maximum response length |
|
Max Source Chunks per Analyzer |
LLM requests one analyzer may use when the source exceeds one request |
|
Parallel LLM Requests |
Analyzers that call the LLM at once; |
|
Per-analyzer toggles |
Enable or disable each analyzer globally |
All enabled |
Publish HTML Report |
Generate the HTML report artifact |
|
Fail on Low Score |
Fail build below the threshold (step |
|
Score Threshold |
Minimum passing composite score (1–10; step |
|
Custom System Prompt |
Text prepended to every LLM prompt |
— |
LLM requests use the proxy configured in Manage Jenkins → System → HTTP Proxy Configuration, including its no-proxy hosts and proxy credentials.
Runs the selected analyzers, several at once, then Release Readiness last, and produces a composite report.
stage('ForgeAI Intelligence') {
steps {
script {
def report = forgeAI(
analyzers: ['code-review', 'vulnerability', 'architecture-drift',
'test-gaps', 'dependency-risk', 'release-readiness'],
sourceGlob: 'src/**/*.java',
contextInfo: 'Spring Boot microservice, hexagonal architecture',
failOnCritical: true,
criticalThreshold: 4
)
echo "Composite Score: ${report.compositeScore}/10"
}
}
post {
always {
archiveArtifacts artifacts: 'forgeai-reports/**', allowEmptyArchive: true
publishHTML(target: [
reportDir: 'forgeai-reports',
reportFiles: 'forgeai-report.html',
reportName: 'ForgeAI Report'
])
}
}
}
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
All 7 analyzers |
Which analyzers to run |
|
|
|
Glob patterns for source files |
|
|
|
Project description, architecture, or constraints |
|
|
|
|
|
|
PR target |
Branch, tag or commit to compare against when analyzing changes |
|
|
Global setting |
Fail build if composite score falls below threshold, or if an analyzer fails |
|
|
Global setting |
Minimum composite score (1–10) |
Returns a Map with: compositeScore, totalFindings, criticalCount, analyzerCount, failedAnalyzers (IDs of analyzers that errored or returned unparseable output), analysisScope (changes or all), filesAnalyzed, filesSkipped, sarifFile, and per-analyzer scores (e.g., code-reviewScore, vulnerabilityScore).
On a pull request build, the code analyzers read only the files the pull request changed. scope: 'auto' (the default) detects this from CHANGE_TARGET, which multibranch pipelines set, and compares against that target branch. On other builds it analyzes every file matching sourceGlob.
-
scope: 'changes'always analyzes only changed files. The base isbaseRefif you set it, else the pull request target, else the previous build’s commit (GIT_PREVIOUS_SUCCESSFUL_COMMIT). -
scope: 'all'always analyzes every matching file.
The base branch must exist in the workspace’s git repository. If ForgeAI cannot find it, it logs a warning and analyzes all files. When no source file changed, the code analyzers are skipped and make no LLM calls.
// Compare a branch build against main
forgeAI scope: 'changes', baseRef: 'origin/main'
Files are sent whole. One LLM request holds 60,000 characters; larger inputs are split across several requests per analyzer (up to Max Source Chunks per Analyzer, default 4) and the results are merged: the score is the average, the severity is the worst, and all findings are kept. Files beyond that are skipped and listed in the build log.
commit-intel analyzes the commits and diff since the base when one is known, otherwise the last 20 commits and the HEAD diff. It is skipped when the workspace has no git history.
When the quality gate is enabled, the build also fails if any requested analyzer errors (for example, an unreachable LLM) or returns output that cannot be parsed — a gate that could not evaluate the code does not pass.
Runs one analyzer against provided source code.
def result = forgeAIScan(
analyzer: 'vulnerability',
source: readFile('src/main/java/App.java'),
context: 'Java 17 REST API handling PII data'
)
if (result.criticalCount > 0) {
error("Security scan found ${result.criticalCount} critical vulnerabilities")
}
stage('ForgeAI Parallel') {
parallel {
stage('Security') { steps { script { forgeAIScan analyzer: 'vulnerability', source: src } } }
stage('Architecture') { steps { script { forgeAIScan analyzer: 'architecture-drift', source: src } } }
stage('Test Gaps') { steps { script { forgeAIScan analyzer: 'test-gaps', source: src } } }
}
}
ForgeAI supports fully offline operation — no data ever leaves your network.
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull a code-focused model
ollama pull deepseek-coder:6.7b # Fast, good for most use cases (~4 GB)
ollama pull codellama:13b # Meta's code model
# Verify it is running
curl http://localhost:11434/api/tags
Jenkins global config:
Provider: Ollama (Local) Endpoint: http://localhost:11434 Model ID: deepseek-coder:6.7b API Key: (leave blank)
|
Note
|
ForgeAI sends LLM requests from the Jenkins controller, not from the agent running the build. The endpoint must be reachable from the controller; localhost means the controller’s own machine. |
-
Download from lmstudio.ai
-
Load any GGUF model (e.g.,
deepseek-coder-v2) -
Start the local server (default:
http://localhost:1234) -
In Jenkins, select OpenAI / OpenAI-Compatible, set endpoint to
http://localhost:1234/, and leave API Key blank
Each build that runs forgeAI gets a ForgeAI Analysis page, linked from the build’s sidebar and summarized on the build page. It shows the composite score, the verdict, each analyzer’s score and summary, and every finding with its location and suggested fix. Jenkins renders the page itself, so it needs no extra plugin and follows the Jenkins theme.
The job page shows a ForgeAI score trend: the composite score of the last 30 builds that ran ForgeAI, with the quality-gate threshold when the gate is on. Select a point to open that build’s analysis, or ForgeAI Trend in the sidebar for a table of the same builds.
-
A build that fails the quality gate keeps its analysis, so you can see why it failed.
-
When a build runs
forgeAImore than once, the page shows the last run. -
The page stores scores and findings with the build. The raw model responses are left out; they are in the HTML report.
Every build generates a self-contained HTML report with:
-
Composite score and release verdict (SHIP_IT / CAUTION / HOLD / BLOCK)
-
Per-analyzer breakdown with individual scores
-
Detailed findings with severity, file location, and suggested fixes
-
Dark theme optimised for readability
The report is written to forgeai-reports/forgeai-report.html in the workspace. Use the HTML Publisher plugin or archiveArtifacts to surface it on the build page.
Every run also writes forgeai-reports/forgeai-report.sarif, the findings in SARIF 2.1.0, the standard format for static-analysis results. The step returns its path as sarifFile.
With the Warnings NG plugin, findings appear on the build page with source annotations, trend charts and Warnings NG’s own quality gates:
def report = forgeAI(analyzers: ['code-review', 'vulnerability'])
recordIssues tool: sarif(pattern: report.sarifFile, id: 'forgeai', name: 'ForgeAI')
The same file can be uploaded to GitHub code scanning or any other SARIF consumer.
-
Each analyzer is a rule (
forgeai/code-review,forgeai/vulnerability, …). -
CRITICAL and HIGH findings are reported as
error, MEDIUM aswarning, LOW and INFO asnote. -
Only findings with a file location are included, because SARIF consumers anchor results to source. Findings without one, such as release-readiness verdicts, stay in the HTML report. Pipeline advisor findings point at the
Jenkinsfile.
| Requirement | Minimum |
|---|---|
Jenkins |
2.528.3 LTS |
Java (runtime) |
17 |
LLM |
OpenAI API key, Anthropic API key, or Ollama running locally |
-
Report bugs and request features on the GitHub issue tracker
-
See CONTRIBUTING.md for pull request guidelines