Repository navigation
fix(esp32): add OTA path component dependencies (app_update, mdns) - #2592
Conversation
The ESP32 OTA path (FL_ESP_OTA_SUPPORTED, gated to IDF 4/5) includes esp_ota_ops.h and mdns.h, but the component REQUIRES omitted app_update and mdns. Consumers building on IDF 5 (e.g. ESPHome on arduino-esp32) fail with 'esp_ota_ops.h: No such file or directory'. IDF 6 disables the OTA path, so it wasn't caught by the standalone-component CI.
The ESP32 OTA path includes mdns.h and now REQUIRES mdns, but mdns wasn't declared as a managed-component dependency, so a standalone ESP-IDF component build couldn't resolve it. Gate to IDF < 6 and WiFi targets to match FL_ESP_OTA_SUPPORTED (excludes ESP32-H2 / ESP32-P4).
mdns is declared as a conditional managed dependency in idf_component.yml (idf_version < 6.0.0, non-H2/P4), which already adds it to REQUIRES when the rule matches. Listing it unconditionally in idf_component_register broke targets where it isn't pulled (e.g. ESP32-P4): 'Failed to resolve component mdns'. app_update stays (built-in, available on all targets).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe FastLED component's build configuration is updated to add two dependencies: ChangesESP-IDF Component Dependencies
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Sorry forgot to test IDF 5 last time, should have caught this earlier. I verified both IDF 5 & 6 build now as a component. It worked on IDF 6 because OTA is disabled because of mdedtls. |
`claude.yml` triggers on @claude mentions in issue comments, PR review comments, PR reviews, and issue bodies — then checks out the source PR's HEAD (from a fork, when applicable) and runs anthropics/claude-code-action with elevated permissions: contents: write (can push to master) pull-requests: write (can merge PRs) issues: write id-token: write + ANTHROPIC_API_KEY secret + GITHUB_TOKEN Without an author_association guard, any external contributor could: 1. Open a PR from their fork containing malicious code. 2. Comment `@claude please fix this`. 3. The workflow checks out their fork's HEAD with all the above privileges, and either: a. PR code runs during the action's tool execution and pushes unauthorized commits to master, auto-merges PRs, or exfiltrates the ANTHROPIC_API_KEY / GITHUB_TOKEN, OR b. The attacker convinces Claude (via prompt injection in code comments / PR description) to do the same. The fix gates each trigger branch with a check against the source event's `author_association`, which GitHub computes server-side based on the actor's relationship to the repo: Trusted (allowed): OWNER, MEMBER, COLLABORATOR Untrusted (blocked): CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, FIRST_TIMER, NONE External PR authors will fall into one of the untrusted categories, so the job step that follows (which checks out their fork's HEAD) never runs. No functional change for repo maintainers — when an OWNER/MEMBER/ COLLABORATOR mentions @claude, the workflow runs exactly as before. Observed during the audit of PR #2592 (a third-party PR from swoboda1337). That PR did NOT exercise this path (no @claude mention) and was otherwise safe — `project_automation.yml` is the only other workflow using `pull_request_target` and it correctly does not check out PR code, so PR #2592 itself caused no leakage. But the latent exploit in `claude.yml` would have applied to any future PR that did contain an `@claude` mention from an external actor. Co-authored-by: Claude Opus 4.7 <[email protected]>
The ESP32 OTA implementation (
ota_impl.cpp.hpp, gated byFL_ESP_OTA_SUPPORTED) includesesp_ota_ops.handmdns.h, but the component's requirements didn't declare the components that provide them. As a result, building FastLED as a managed ESP-IDF component on ESP-IDF 5 fails at configure time:Changes
app_updateadded toidf_component_register(REQUIRES ...)— built-in IDF component that providesesp_ota_ops.h. Available on all targets, so it can be required unconditionally (the OTA code itself stays gated).espressif/mdnsadded toidf_component.ymlas a conditional dependency (idf_version < 6.0.0 && target not in [esp32h2, esp32p4]) — providesmdns.h. Declared in the manifest (notREQUIRES) so it is only pulled, and only required, where the OTA path actually compiles; this avoids breaking targets like ESP32-P4 where mdns isn't applicable.Summary by CodeRabbit