fix(swift): remove programmatic-init example with hardcoded credentials keeping reference file leaner#155
Conversation
The "Programmatic Initialization" section taught the explicit-credentials factory form (`webAuth(clientId:domain:)`, `authentication(clientId:domain:)`) with inline `"YOUR_CLIENT_ID"` / `"YOUR_DOMAIN"` placeholders. Lower-capability models copy this form verbatim and hardcode credentials into source, tripping the security graders and diverging from the recommended `Auth0.plist` path. Remove the section so the skill teaches a single, secure configuration path (Auth0.plist). The migration/detection references to `webAuth(domain:clientId:)` elsewhere are unaffected — they identify existing call sites to upgrade, not patterns to author.
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ skillsaw — All checks passedFull report
|
Summary
The Swift reference's Programmatic Initialization section taught the explicit-credentials factory form with inline placeholders:
This form isn't required for the skill — the recommended
Auth0.plistpath already covers configuration. Lower- and mid-capability models tend to reach for the programmatic form and paste real credential values directly into Swift source, which trips the L3 security graders.Also we should not add all integration patterns in skill . it should onloy have recommended one to keep the skill. size lean
Change
Remove the "Programmatic Initialization" section (22 lines) so the skill teaches a single, secure configuration path (
Auth0.plist). It's not needed for the skill's purpose, and dropping it keeps the reference leaner — one canonical way to configure, less surface area for a model to pick the insecure branch.The migration/detection references to
webAuth(domain:clientId:)elsewhere in the file are intentionally left untouched — they identify existing call sites to upgrade during SDK migration, not patterns to author for new integrations.Eval signal
From
swift_quickstart/agent-mcp-skillsin eval run 29835398213, three models copied the hardcoded-credentials pattern and failed both L3 security graders:barkbook_client_abc123xyz+dev-barkbook.us.auth0.comFOUND in sourceThose are the eval's placeholder client ID and domain — models substituted them into
webAuth(clientId:domain:)verbatim in.swiftfiles. Removing the section removes the pattern they were copying.Context
Part of the eval flywheel. The companion grader fix (auth0/auth0-evals#144) makes the async/await grader correctly accept the valid
webAuth(clientId:domain:)API for models that wrote correct code; this PR stops the skill from teaching it with hardcoded values.