Repository navigation
Move development guidance out of README #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,96 @@ | ||||||||||||||||||||||
| # AutoTriage Development Guide | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| This page contains the engineering information needed to build, configure, and run AutoTriage locally. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| [Return to the AutoTriage overview](README.md) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Repository Structure | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - `scan-common`: shared models and Temporal interfaces. | ||||||||||||||||||||||
| - `scan-api`: REST entry point (`/scans`, `/health`). | ||||||||||||||||||||||
| - `scan-worker-workflow`: orchestrates the full scan workflow. | ||||||||||||||||||||||
| - `scan-worker-light`: lightweight activities (repository, suppression, upload, and verdict). | ||||||||||||||||||||||
| - `scan-worker-filter`: SARIF filtering and optional ZeroFalse evaluation. | ||||||||||||||||||||||
| - `scan-worker-opengrep`: OpenGrep execution worker. | ||||||||||||||||||||||
| - `triage-service`: triage APIs, UI, CEL policy evaluation, audit trail, and suppression PR automation. | ||||||||||||||||||||||
| - `suppression-service-mock`: mock ingest service for local and integration flows. | ||||||||||||||||||||||
| - `docs/`: architecture, runbook, and implementation notes. | ||||||||||||||||||||||
| - `k8s/` and `docker/`: deployment artifacts. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Local Development | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Prerequisites | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - JDK 17 | ||||||||||||||||||||||
| - Maven 3.9 or newer | ||||||||||||||||||||||
| - Temporal (development server or cluster) | ||||||||||||||||||||||
| - Git CLI | ||||||||||||||||||||||
| - Optional: Postgres for the triage service, OpenGrep binary/configuration, and LLM provider configuration | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Startup | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| 1. Start Temporal. For the development server, set `TEMPORAL_TARGET=localhost:7233` and `TEMPORAL_TLS_ENABLED=false`. | ||||||||||||||||||||||
| 2. Start the services and workers from the repository root: | ||||||||||||||||||||||
| - `mvn -pl scan-api quarkus:dev` | ||||||||||||||||||||||
| - `mvn -pl scan-worker-workflow quarkus:dev` | ||||||||||||||||||||||
| - `mvn -pl scan-worker-light quarkus:dev` | ||||||||||||||||||||||
| - `mvn -pl scan-worker-filter quarkus:dev` | ||||||||||||||||||||||
| - `mvn -pl scan-worker-opengrep quarkus:dev` | ||||||||||||||||||||||
|
Comment on lines
+34
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: These per-module dev commands fail from a clean checkout because they select only the application module while its sibling reactor dependencies, such as Prompt for AI agents
Suggested change
|
||||||||||||||||||||||
| 3. For the optional local triage path: | ||||||||||||||||||||||
| - Start Postgres. | ||||||||||||||||||||||
| - Run `mvn -pl triage-service quarkus:dev`. | ||||||||||||||||||||||
| - Set the JWT verification and database configuration. | ||||||||||||||||||||||
| 4. For the optional suppression-ingest mock, run `mvn -pl suppression-service-mock quarkus:dev`. | ||||||||||||||||||||||
| 5. Submit scans to `scan-api` and monitor `/scans/{runId}` and the Temporal UI. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Verification | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Run the complete Java 17 verification suite from the repository root: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| mvn -B verify | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Containerized Local Run | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - PowerShell: `scripts/podman-compose.ps1 up` | ||||||||||||||||||||||
| - Bash: `scripts/podman-compose.sh up` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Key Configuration | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Common | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - `TEMPORAL_TARGET` | ||||||||||||||||||||||
| - `TEMPORAL_NAMESPACE` | ||||||||||||||||||||||
| - `TEMPORAL_TLS_ENABLED` | ||||||||||||||||||||||
| - `ARTIFACTS_DIR` | ||||||||||||||||||||||
| - `GIT_CLONE_TOKEN` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### OpenGrep | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - `OPENGREP_BIN` | ||||||||||||||||||||||
| - `OPENGREP_CONFIG` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Filter and ZeroFalse | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - `ZEROFALSE_ENABLED` | ||||||||||||||||||||||
| - `ZEROFALSE_MAX_FINDINGS` | ||||||||||||||||||||||
| - `ZEROFALSE_MAX_TRACE_STEPS` | ||||||||||||||||||||||
| - `ZEROFALSE_CONTEXT_LINES_BEFORE` | ||||||||||||||||||||||
| - `ZEROFALSE_CONTEXT_LINES_AFTER` | ||||||||||||||||||||||
| - `ZEROFALSE_PROMPTS_VARIANT` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Triage | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - `TRIAGE_SERVICE_URL` | ||||||||||||||||||||||
| - `TRIAGE_POLICY_PATH` | ||||||||||||||||||||||
| - `TRIAGE_POLICY_CACHE_MINUTES` | ||||||||||||||||||||||
| - `TRIAGE_PR_URL_TEMPLATE` | ||||||||||||||||||||||
| - The JWT role claim must include `security:vuln_assessor:triager`. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Engineering Documentation | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - [Architecture](docs/architecture.md) | ||||||||||||||||||||||
| - [Runbook](docs/runbook.md) | ||||||||||||||||||||||
| - [Triage plan](docs/triage-plan.md) | ||||||||||||||||||||||
| - [Decision log](docs/decisions/decision-log.md) | ||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The OpenGrep worker refuses to analyze a scan unless bubblewrap is installed, but the local prerequisites omit that required sandbox executable. Document bubblewrap (or
SANDBOX_BIN) alongside the OpenGrep configuration.Prompt for AI agents