Java Quarkus REST API that manages SAST-AI-Workflow security scanning Tekton pipelines.
Description: Application health status with dependency checks
Response: 200 OK / 503 Service Unavailable
{
"status": "UP|DOWN",
"timestamp": "2025-01-01T10:00:00",
"version": "1.0.0",
"dependencies": {
"database": "UP",
"tekton": "UP",
"google-service-account": "UP - Service account available"
}
}Description: Create a new security scanning job
Request Body:
{
"packageNvr": "package-name-version-release",
"inputSourceUrl": "https://example.com/source.zip",
"submittedBy": "[email protected]", # (optional, defaults to "unknown")
"useKnownFalsePositiveFile": false # (optional)
}Response: 201 Created
{
"jobId": 123,
"packageName": "package-name",
"packageNvr": "package-name-version-release",
"sourceCodeUrl": "https://example.com/source.zip",
"status": "PENDING",
"createdAt": "2025-01-01T10:00:00",
"startedAt": null,
"completedAt": null,
"cancelledAt": null,
"tektonUrl": null,
"batchId": null,
"projectName": "package-name",
"projectVersion": "version-release",
"oshScanId": null,
"jiraLink": null,
"hostname": null
}Description: List all jobs with filtering and pagination
Query Parameters:
packageName(optional): Filter by package namestatus(optional): Filter by status (PENDING,SCHEDULED,RUNNING,COMPLETED,FAILED,CANCELLED)page(optional, default: 0): Page numbersize(optional, default: 20): Page size
Response: 200 OK
[
{
"jobId": 123,
"packageName": "package-name",
"packageNvr": "package-name-version-release",
"sourceCodeUrl": "https://example.com/source.zip",
"status": "COMPLETED",
"createdAt": "2025-01-01T10:00:00",
"startedAt": "2025-01-01T10:05:00",
"completedAt": "2025-01-01T10:30:00",
"tektonUrl": "https://tekton.example.com/pipelineruns/job-123",
"batchId": null,
"projectName": "package-name",
"projectVersion": "version-release",
"oshScanId": "scan-123",
"jiraLink": "https://jira.example.com/browse/ISSUE-123",
"hostname": "worker-node-1"
}
]Description: Get specific job details
Response: 200 OK - Same structure as job creation response
Error Responses:
404 Not Found- Job not found
Description: Cancel a running job
Response: 200 OK
"Job cancellation requested"Error Responses:
404 Not Found- Job not found400 Bad Request- Job cannot be cancelled (already completed/failed)
Description: Submit batch processing jobs from Google Sheets
Request Body:
{
"batchGoogleSheetUrl": "https://docs.google.com/spreadsheets/d/...",
"submittedBy": "[email protected]", # (optional, defaults to "unknown")
"useKnownFalsePositiveFile": false # (optional)
}Response: 201 Created
{
"batchId": 456,
"batchGoogleSheetUrl": "https://docs.google.com/spreadsheets/d/...",
"submittedBy": "[email protected]",
"submittedAt": "2025-01-01T10:00:00",
"status": "PROCESSING",
"totalJobs": 10,
"completedJobs": 0,
"failedJobs": 0
}Description: List job batches with pagination
Query Parameters:
page(optional, default: 0): Page numbersize(optional, default: 20): Page size
Response: 200 OK - Array of batch objects (same structure as batch creation response)
Description: Get batch details
Response: 200 OK - Same structure as batch creation response
Error Responses:
404 Not Found- Batch not found
Description: Cancel a job batch
Response: 200 OK
"Job batch cancellation requested"Error Responses:
404 Not Found- Batch not found
Description: List package vulnerability summaries with pagination
Query Parameters:
page(optional, default: 0): Page numbersize(optional, default: 50): Page size
Response: 200 OK
[
{
"packageName": "example-package",
"totalAnalyses": 25,
"lastAnalysisDate": "2025-01-01T10:00:00",
"completedAnalyses": 20,
"failedAnalyses": 2,
"runningAnalyses": 3
}
]Description: Get specific package summary
Response: 200 OK - Same structure as package list item
Description: Get jobs for a specific package
Query Parameters:
page(optional, default: 0): Page numbersize(optional, default: 20): Page size
Response: 200 OK - Array of job objects (same structure as /api/v1/jobs response)
Job Status:
PENDING- Job created but not yet scheduledSCHEDULED- Job scheduled for executionRUNNING- Job currently executingCOMPLETED- Job completed successfullyFAILED- Job failed during executionCANCELLED- Job was cancelled
Batch Status:
PROCESSING- Batch is being processedCOMPLETED- All jobs completed successfullyCOMPLETED_WITH_ERRORS- Batch completed but some jobs failedCOMPLETED_EMPTY- Batch completed but contained no valid jobsFAILED- Batch processing failedCANCELLED- Batch was cancelled
- The multipart form endpoint
POST /api/v1/jobsexists but is not yet implemented - use/simpleendpoint instead - All timestamps are in ISO 8601 format
- All endpoints return JSON responses with appropriate HTTP status codes
- Error responses include descriptive error messages in the response body
-
Clone the repository
git clone https://github.com/RHEcosystemAppEng/sast-ai-orchestrator.git cd sast-ai-orchestrator -
Setup PostgreSQL
# Using Docker docker run --name postgres \ -e POSTGRES_DB=sast-ai \ -e POSTGRES_USER=quarkus \ -e POSTGRES_PASSWORD=quarkus \ -p 5432:5432 \ -d postgres:13 -
Run the application
./mvnw quarkus:dev
-
Access the API
http://localhost:8080/api/v1/health
# JVM Mode (Fast startup)
docker build -f src/main/docker/Dockerfile.jvm -t sast-ai-orchestrator:jvm .- Helm Chart: See
deploy/sast-ai-chart/for Helm deployment - ArgoCD: See
deploy/argocd/for GitOps deployment - Documentation: Refer to
deploy/README.mdfor detailed instructions
Key configuration options in application.properties:
# Database
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/sast-ai
quarkus.datasource.username=quarkus
quarkus.datasource.password=quarkus
# Workflow Integration
sast.ai.workflow.namespace=sast-ai
quarkus.kubernetes-client.trust-certs=false