Repository navigation
feat(scanner): add Trustabl Forge pre-coding skill - #1972
ericksondelacruz wants to merge 4 commits into
Conversation
Generate a pre-coding SKILL.md with `trustabl forge` from policies taken
from the latest Analyzer scan of a repository, without cloning it. Runs
are project-scoped, stored in connector metadata (last 10), and checked
for staleness with `trustabl forge check`.
- POST /api/scanners/{id}/forge, GET .../forge/{runId}, GET .../check
- Forge policies and flags discovered from the installed CLI
- Abandoned running entries are reported as failed
Rename Run scan to Run Analyzer and group the run menu into Analyzer and Forge actions. Connectors that support forge get Analyzer findings and Forge skill tabs: empty, running (with Cancel), preview and raw skill views, outline, Copy, Download, Regenerate, run history and a stale banner. Run Forge with new parameters prefills policy chips from the latest scan.
Drive Run Analyzer, Run Forge, copy, parameters and stale regenerate against a hermetic fake trustabl CLI with recorded 0.1.8 output. The dev server uses its own SQLite file, build directory (OPENLIT_NEXT_DIST_DIR) and a crontab shim so it never touches a developer's setup.
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
Sorry @ericksondelacruz, your pull request is larger than the review limit of 150,000 diff characters |
PR Summary by QodoAdd Trustabl Forge pre-coding skills to scanner connectors
AI Description
Merge Risk
|
Code Review by Qodo
1. Forge skills leak across environments
|
Issue number:
Change description:
Adds Trustabl Forge to the Trustabl scanner connector. Forge turns the detection rules for a repository's SDKs into a pre-coding
SKILL.md. Coding agents read it before writing agent code, so they avoid the issues the Analyzer would flag.Runs and API:
POST /api/scanners/{id}/forgerunstrustabl forgewith policies taken from the latest succeeded Analyzer scan of the repository. The repository is not cloned.GET /api/scanners/{id}/forge/{runId}returns a run with its skill.GET /api/scanners/{id}/forge/{runId}/checkrunstrustabl forge checkand reports whether the skill iscurrentorstale. Runs are project-scoped and kept in connector metadata (last 10). Forge policies and flags are read from the installed CLI, and abandoned running entries are reported as failed.UI: Run scan becomes Run Analyzer, with a menu that groups Analyzer and Forge actions. Connectors that support Forge get Analyzer findings and Forge skill tabs. The Forge skill tab covers:
Run Forge with new parameters prefills policies from the latest scan.
Tests: Unit and component tests. A Playwright suite (
e2e/scanner-forge.spec.ts) drives Run Analyzer, Run Forge, copy, parameters and stale regenerate against a faketrustablCLI that replays recorded 0.1.8 output. The dev server uses its own SQLite file and build directory (OPENLIT_NEXT_DIST_DIR).Docs: Forge section on the Scanner connectors page, plus API reference pages and OpenAPI entries for the Forge endpoints.
Checks on the branch rebased onto current
main, fromsrc/client:npm run lint: no warnings or errorsnpx tsc --noEmit: 0 errorsnpx jest: 435/435 suites, 6205/6205 testsChecklist
If your change doesn't seem to apply, please leave them unchecked.
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.