|
| 1 | +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json |
| 2 | +language: "en-US" |
| 3 | +early_access: false |
| 4 | +reviews: |
| 5 | + profile: "assertive" |
| 6 | + request_changes_workflow: true |
| 7 | + high_level_summary: true |
| 8 | + auto_review: |
| 9 | + enabled: true |
| 10 | + drafts: false |
| 11 | + path_instructions: |
| 12 | + - path: "Auth0/**/*.swift" |
| 13 | + instructions: | |
| 14 | + This is library source code for the Auth0.swift SDK targeting Apple platforms. |
| 15 | +
|
| 16 | + Verify the following: |
| 17 | + - All `public` types, methods, and properties must have DocC comments (`/// ...`). |
| 18 | + - No force-unwraps (`!`) in library source — use `guard`, `if let`, or `throws`. |
| 19 | + - No `#if os(iOS)` / `#if os(macOS)` for SDK-level guards — use `#if WEB_AUTH_PLATFORM` or `#if PASSKEYS_PLATFORM`. |
| 20 | + - New public methods must expose both a completion-handler variant and an `async throws` variant. |
| 21 | + - Never log `accessToken`, `refreshToken`, `idToken`, or `recoveryCode`. |
| 22 | + - Every new public API must follow the typed `Result` alias pattern (`AuthenticationResult<T>`, `MyAccountResult<T>`, etc.). |
| 23 | + - Protocol-backed implementations must be prefixed with `Auth0` (e.g. `Auth0Authentication`). |
| 24 | + - Error types must end in `Error` and extend the existing error hierarchy. |
| 25 | + - PKCE must never be disabled — do not add any option or parameter that bypasses it. |
| 26 | + - DPoP key generation must not be silently downgraded to software keys. |
| 27 | + - Token storage must use `SimpleKeychain` — never `UserDefaults` or in-memory storage. |
| 28 | +
|
| 29 | + - path: "Auth0Tests/**/*.swift" |
| 30 | + instructions: | |
| 31 | + This is the test suite for Auth0.swift, using Quick (BDD) + Nimble. |
| 32 | +
|
| 33 | + Verify the following: |
| 34 | + - Every spec file must be a `QuickSpec` subclass named `<Subject>Spec`. |
| 35 | + - Behavior must be organized with nested `describe` / `context` / `it` blocks. |
| 36 | + - `it` descriptions must use present tense, declarative style: `"should ... when ..."`. |
| 37 | + - `beforeEach` / `afterEach` must handle all setup and teardown. |
| 38 | + - `NetworkStub.clearStubs()` must be called in every `afterEach` that registers network stubs. |
| 39 | + - All network interactions must use `StubURLProtocol` / `NetworkStub` — no real network calls. |
| 40 | + - Test constants must use `UpperCamelCase` (e.g. `AccessToken`, `ClientId`, `Domain`). |
| 41 | + - Combine publishers must be tested with Nimble async matchers or `waitUntil`. |
| 42 | + - Platform-specific tests must be gated with the same `#if WEB_AUTH_PLATFORM` / `#if PASSKEYS_PLATFORM` flags as source. |
| 43 | + - Do not skip or remove failing tests — fix the underlying issue. |
| 44 | + - New or changed behavior must have corresponding test coverage. |
| 45 | +
|
| 46 | + - path: "Auth0/DPoP/**/*.swift" |
| 47 | + instructions: | |
| 48 | + This is security-sensitive DPoP (Demonstration of Proof-of-Possession) code. |
| 49 | +
|
| 50 | + Extra scrutiny required: |
| 51 | + - Key generation must prefer the Secure Enclave; never silently fall back to software keys without surfacing a clear error or documented fallback path. |
| 52 | + - Proof generation must not be bypassable. |
| 53 | + - Any change to the signing algorithm, key type, or proof structure must be explicitly justified. |
| 54 | + - Changes here require team approval before merging (flag in review). |
| 55 | +
|
| 56 | + - path: "Auth0/MyAccount/**/*.swift" |
| 57 | + instructions: | |
| 58 | + This is the My Account API client. |
| 59 | +
|
| 60 | + Verify the following: |
| 61 | + - New API methods must expose both a completion-handler variant and an `async throws` variant. |
| 62 | + - All `public` types and methods must have DocC comments. |
| 63 | + - Result type must use `MyAccountResult<T>`. |
| 64 | + - Error handling must use `MyAccountError`. |
| 65 | +
|
| 66 | + - path: "Auth0/MFA/**/*.swift" |
| 67 | + instructions: | |
| 68 | + This is the MFA (Multi-Factor Authentication) client. |
| 69 | +
|
| 70 | + Verify the following: |
| 71 | + - All `public` types and methods must have DocC comments. |
| 72 | + - No sensitive credential data may be logged. |
| 73 | + - New methods must expose both a completion-handler variant and an `async throws` variant. |
| 74 | +
|
| 75 | + - path: "CHANGELOG.md" |
| 76 | + instructions: | |
| 77 | + Follow the Keep a Changelog format. |
| 78 | + - New entries must be under the correct heading: Added, Changed, Deprecated, Fixed, Security, or Removed. |
| 79 | + - Entries must be user-facing descriptions, not commit messages. |
| 80 | + - Ensure an `[Unreleased]` section exists at the top for in-progress changes. |
| 81 | +
|
| 82 | + - path: "Auth0.podspec" |
| 83 | + instructions: | |
| 84 | + Verify that `s.version` matches the version string in `Auth0/Version.swift`. |
| 85 | + Minimum platform versions must not be lowered without team approval. |
| 86 | +
|
| 87 | + - path: "Package.swift" |
| 88 | + instructions: | |
| 89 | + Verify minimum platform versions are consistent with `Auth0.podspec`. |
| 90 | + New targets or compilation conditions require explicit justification. |
| 91 | + Do not add new external dependencies without team approval. |
| 92 | +
|
| 93 | + - path: ".github/workflows/**" |
| 94 | + instructions: | |
| 95 | + CI workflow changes require explicit justification. |
| 96 | + Verify that all required checks (unit tests on iOS/macOS/tvOS, SwiftLint, pod lib lint, Swift package tests) remain in place. |
| 97 | + Do not remove or skip any existing required status checks. |
0 commit comments