Connect applications and CI
PatchTrail uses committed dependency files to assess a repository and software bills of materials (SBOMs) to assess builds. Connect both if you need to trace a dependency update from merge to production.
Connect GitHub
Section titled “Connect GitHub”In the console, connect the read-only PatchTrail GitHub App and select the repositories to observe. PatchTrail refreshes selected lockfiles from the default branch and records the exact commit it assessed. Use Dependabot or Renovate to open dependency updates. A merge to the default branch triggers a new repository assessment.
Scan locally
Section titled “Scan locally”Install patchtrail from the CLI package and put the supported OSV-Scanner version on your PATH. The following command refreshes advisory databases as needed and scans a lockfile.
patchtrail scan --lockfile package-lock.json --download-databasesRun patchtrail scan --help for supported inputs and output formats. Local scans can run without a PatchTrail account.
Publish build evidence
Section titled “Publish build evidence”Generate a CycloneDX JSON SBOM for the built artifact. Use a protected runner secret named PATCHTRAIL_API_KEY. For an enrolled CI asset, give the key inventory:write for the exact team and asset. Set TEAM_ID and ASSET_ID to the enrolled values, BUILD_SEQUENCE to an increasing number for that asset, and supply the full Git commit and exact platform manifest digest.
patchtrail ci submit --team "$TEAM_ID" --asset "$ASSET_ID" \ --sequence "$BUILD_SEQUENCE" --commit "$GIT_COMMIT" \ --image-digest "$IMAGE_DIGEST" --report image.cdx.jsonThe receipt means PatchTrail accepted the report for assessment. To verify a deployment, compare that digest with a current runtime observation from Kubernetes.
For GitLab, patchtrail ci on a runner can submit the committed lockfiles from a default-branch push. Set a masked, protected PATCHTRAIL_API_KEY with Publish build inventory for the selected team. The CLI checks the remote default branch before it submits the files.