1---2name: backstage-integrations-23description: Use when editing Backstage integrations with GitHub, Azure, Azure DevOps, or other external providers.4---56<!-- Generated from harness/github-copilot/plugins/open-horizons-platform/instructions/backstage-integrations.instructions.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Backstage External Integrations910## Conventions1112- Use the least-privilege credential type supported by the provider, preferring GitHub Apps, managed identity, workload identity, or short-lived delegated tokens.13- Keep provider sign-in, catalog discovery, backend service access, and user-delegated actions as separate trust boundaries.14- Resolve credentials from environment-backed secret stores and keep them out of catalog entities, logs, and frontend config.15- Scope organizations, repositories, projects, tenants, and subscriptions explicitly; reject requests outside the configured boundary.16- Bound scheduled discovery and event processing with stable task IDs, timeouts, retries, and idempotency.17- Validate webhook signatures and event provenance before processing.18- Normalize provider failures into safe integration errors while retaining redacted correlation metadata.19- Keep provider-specific code behind typed adapters so catalog and UI contracts remain stable.2021## Verification2223- Integration tests use fixtures or mocks rather than production credentials.24- Permission scopes are documented by the owning configuration and match actual operations.25- Discovery, webhook replay, throttling, and provider-unavailable paths remain deterministic.2627## Do / Do Not2829| Do | Do not |30| --- | --- |31| Keep providers behind typed adapters and test bounded failure behavior. | Couple catalog or UI contracts to provider-specific response objects. |32| Use fixtures and least-privilege scopes. | Test with production credentials or broaden permissions implicitly. |3334## Checklist Before Opening a PR3536- [ ] The change matches this instruction's `applyTo` scope.37- [ ] Adapter contracts and permission scopes match actual operations.38- [ ] Discovery, replay, throttling, and unavailable-provider cases are tested.39- [ ] Fixtures contain no production credential or private tenant data.40- [ ] No unrelated edits or unresolved placeholders remain.