Skip to content

fix: The specified item could not be found in the keychain#1448

Closed
kolipakakondal wants to merge 4 commits intomasterfrom
fix_codesign
Closed

fix: The specified item could not be found in the keychain#1448
kolipakakondal wants to merge 4 commits intomasterfrom
fix_codesign

Conversation

@kolipakakondal
Copy link
Copy Markdown
Collaborator

@kolipakakondal kolipakakondal commented Apr 24, 2026

Description

Please include a summary of the change and which issue is fixed.

Fixes # (IEP-XXX)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • ESP-IDF Version:
  • OS (Windows,Linux and macOS):

Dependent components impacted by this PR:

  • Component 1
  • Component 2

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • Chores
    • CI now runs on pull requests targeting main release branches in addition to nightly runs, improving pre-release validation.
    • macOS signing and packaging steps made more robust: the signing keychain is selected, developer CA certificates are imported (with diagnostics), and signing uses a dedicated variable to ensure consistent artifact signing.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@kolipakakondal has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 36 minutes and 43 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 36 minutes and 43 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18da3d11-58cc-4e62-aa98-53c088549cf1

📥 Commits

Reviewing files that changed from the base of the PR and between 8a7414a and 13eb446.

📒 Files selected for processing (1)
  • .github/workflows/nightly.yml
📝 Walkthrough

Walkthrough

The GitHub Actions nightly workflow now also runs on pull requests targeting master and release/**. The macOS codesigning steps explicitly select build.keychain, import Apple Developer ID CA certificates into it (ignoring import failures), emit diagnostic keychain listings, set SIGN_ID=QWXF6GB4AV, and update codesign invocations to use --keychain build.keychain and -s "$SIGN_ID".

Changes

Cohort / File(s) Summary
Nightly Workflow
.github/workflows/nightly.yml
Added PR triggers for master and release/**. In macOS codesign steps: select/activate build.keychain, import Apple Developer ID CA certs into build.keychain (ignore failures), emit diagnostic listings, set SIGN_ID=QWXF6GB4AV, and change codesign calls to use --keychain build.keychain and -s "$SIGN_ID".

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions
    participant Runner as macOS Runner
    participant Keychain as build.keychain
    participant Codesign as codesign tool
    participant Notarize as notarization service
    participant Upload as Artifact uploader

    rect rgba(135,206,235,0.5)
    GH->>Runner: trigger (cron or PR -> master/release/**)
    end

    rect rgba(144,238,144,0.5)
    Runner->>Keychain: list & select `build.keychain`
    Runner->>Keychain: import Apple Developer ID CA certs (ignore failures)
    Runner->>Runner: set SIGN_ID=QWXF6GB4AV
    end

    rect rgba(255,182,193,0.5)
    Runner->>Codesign: run codesign --keychain build.keychain -s "$SIGN_ID" (x86_64/aarch64 + DMG)
    Codesign-->>Runner: signed artifacts
    end

    rect rgba(255,228,181,0.5)
    Runner->>Notarize: submit signed artifacts
    Notarize-->>Runner: notarization result
    Runner->>Upload: upload notarized artifacts
    Upload-->>GH: publish artifacts
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • sigmaaa
  • AndriiFilippov

Poem

🐰
I hopped into CI at midnight's chime,
Chose build.keychain, lined up certs in time,
I set the SIGN_ID with a tiny twitch,
Codesigned the app, then sent it to stitch,
Hooray — builds and notarize, carrot-sweet delight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main issue being fixed: keychain-related codesigning failures. The changes focus on resolving keychain selection and certificate import issues in the macOS codesigning workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_codesign

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/nightly.yml:
- Around line 9-12: The workflow currently triggers on pull_request and can run
destructive publishing and secret-consuming steps; change triggers or gate risky
steps so PRs cannot publish or use production secrets. Either remove or restrict
the pull_request trigger and run PR validation via workflow_dispatch on a
branch, or keep pull_request only for build/codesign smoke-tests and add if:
github.event_name != 'pull_request' (or equivalent) to each sensitive job/step
such as "Authenticate to Azure", "Get Azure Key Vault Access Token", "Sign JAR
files with Azure Key Vault", "Codesign Espressif-IDE", "Notarization of
Espressif-IDE dmg files", and "Upload build assets to
dl.espressif.com"/S3/CloudFront publish steps (the aws s3 rm / upload /
CloudFront invalidation steps) so they never run for PR events.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ecb75a5e-8b4c-4acd-8e0f-702cd3704137

📥 Commits

Reviewing files that changed from the base of the PR and between 6a67e13 and 37a1417.

📒 Files selected for processing (1)
  • .github/workflows/nightly.yml

Comment on lines +9 to +12
pull_request:
branches:
- master
- release/**
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: pull_request trigger will overwrite production nightly artifacts and expose signing secrets on every PR.

This workflow is not a build-only pipeline — downstream steps perform destructive, production-impacting actions that must not run for PRs:

  • Line 235: aws s3 rm s3://${{ secrets.DL_BUCKET }}/dl/idf-eclipse-plugin/updates/nightly --recursive wipes the live nightly update site.
  • Lines 236–238: publicly re-upload the PR's build output to the live nightly location and invalidate CloudFront.
  • The workflow also consumes Azure Key Vault signing, Apple codesign certs, and notarization credentials. For same-repo PRs these secrets are passed to code under review (supply-chain risk); for fork PRs the secrets are unavailable and the run will fail partway through after already having performed work.

Net effect: every PR merged-or-not against master/release/** will replace the published nightly build with artifacts from an unmerged branch, and potentially sign/notarize unreviewed code with production credentials.

If the intent is only to validate that the build/codesign/keychain change works in CI before merge, please either (a) revert this trigger and test via workflow_dispatch on a branch, or (b) split the workflow so only the build + codesign verification steps run on pull_request, while az login, notarization, and all S3/CloudFront publishing steps remain gated to schedule (or push to master).

🛡️ Suggested minimal guard (Option B sketch)

At minimum, gate the publish/notarize steps so they never run for PRs. For example, add if: github.event_name != 'pull_request' to each of:

  • Authenticate to Azure
  • Get Azure Key Vault Access Token
  • Sign JAR files with Azure Key Vault
  • Notarization of Espressif-IDE dmg files
  • Upload build assets to dl.espressif.com

…and consider whether Codesign Espressif-IDE itself should also be skipped on PR events, given the macOS cert secret exposure.

Alternatively, keep the PR trigger only on a dedicated validation workflow that performs mvn clean install and the keychain/codesign smoke test without secrets that touch production.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/nightly.yml around lines 9 - 12, The workflow currently
triggers on pull_request and can run destructive publishing and secret-consuming
steps; change triggers or gate risky steps so PRs cannot publish or use
production secrets. Either remove or restrict the pull_request trigger and run
PR validation via workflow_dispatch on a branch, or keep pull_request only for
build/codesign smoke-tests and add if: github.event_name != 'pull_request' (or
equivalent) to each sensitive job/step such as "Authenticate to Azure", "Get
Azure Key Vault Access Token", "Sign JAR files with Azure Key Vault", "Codesign
Espressif-IDE", "Notarization of Espressif-IDE dmg files", and "Upload build
assets to dl.espressif.com"/S3/CloudFront publish steps (the aws s3 rm / upload
/ CloudFront invalidation steps) so they never run for PR events.

@kolipakakondal kolipakakondal marked this pull request as draft April 24, 2026 09:17
@kolipakakondal
Copy link
Copy Markdown
Collaborator Author

We have tested and updated the new certificates. Hence closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant