Files
pruefwerk/compliance-agent/tests
Sharang ParnerkarandClaude Opus 5.5 1a9af09bc4
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m23s
feat(agent): managed git source — auto targets and CRA issues (#439)
A tenant's managed Gitea organisation becomes a git source: every
repository in it is a target, scanned on push, with findings as
labelled issues.

- Git source per tenant (`git_sources`, one doc): https base URL whose
  host must match GIT_SOURCE_HOST_PATTERN, org, bot token and webhook
  secret sealed like other credentials. Platform API
  PUT/GET/DELETE /api/v1/platform/tenants/{id}/git-source; the secret
  is returned only when issued (first PUT or rotate_webhook_secret).
  Read-only GET /api/v1/git-source for IT admins and support.
- POST /webhook/{tenant_id}/gitea-source on the webhook server,
  X-Gitea-Signature checked before anything is created. repository
  created -> target (clone URL built from the source origin, bot token,
  Gitea tracker, type from detection) and first scan unless empty;
  deleted -> target archived; push to the default branch -> scan,
  creating the target if missing. Other orgs are ignored. Entitlement
  and ladder are checked as for scheduled work; usage events as usual.
- Targets get source_repo (unique per instance + repo id, so racing
  deliveries make one target) and archived_at; the scheduler skips
  archived targets.
- Sync job every GIT_SOURCE_SYNC_MINUTES (default 30): lists the org's
  repos (paginated), creates missing, refreshes renamed, archives gone.
- Managed repos get the labels pruefwerk, cra:annex-i and
  severity:* ensured once per run and attached by id; issue bodies name
  the CRA requirement(s) and link into Prüfwerk. User-configured
  trackers behave as before.
- Docs (DE/EN): connecting Managed Git and the bot's minimal rights.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 12:17:12 +02:00
..