Safeguard
Developer Tools•

pod install vs pod update: which one is safe to run in CI?

pod install honours Podfile.lock, pod update ignores it. Learn which to run in CI, which to run by hand, and why the difference matters for security.

Safeguard Security Team
3 min read

Run pod install in CI and on release builds. It installs the versions recorded in Podfile.lock and does not look for newer ones. Run pod update by hand, on purpose, when you want newer versions, then review and commit the changed lock file.

What each command does

The CocoaPods guides describe the split clearly.

CommandReads lock fileLooks for newer versionsTypical use
pod installYesJust for pods not yet lockedSetup, CI, adding or removing a pod
pod updateIgnoredYes, within Podfile limitsDeliberate upgrade
pod update PODNAMEIgnored for that podYes, for that podTargeted upgrade
pod outdatedNo changes madeReports newer versionsReview

For pods already in Podfile.lock, pod install uses the locked version without checking for a newer one.

Why this is a security question

Two properties matter. A build you cannot reproduce is a build you cannot audit. And an automatic upgrade means a new release of a dependency can reach your app without a human reading what changed.

If CI runs pod update, every build can pull different code. If CI runs pod install with a committed lock file, the build matches what was reviewed. The guide also notes that exact versions in the Podfile are not enough, because a pod's own dependencies can resolve differently over time. The lock file is what fixes that.

A workable routine

  1. Commit Podfile.lock. CocoaPods says to do so even if you do not commit the Pods folder.
  2. Use pod install in CI.
  3. Schedule pod outdated weekly and read the list.
  4. When an advisory affects a pod, run pod update PODNAME for just that pod.
  5. Review the lock file diff in the pull request. Look for transitive pods that appeared or moved.
  6. Build and test before merging.

Common mistakes

  • Running pod update to fix an unrelated build error, which upgrades everything.
  • Leaving the lock file out of version control, so each developer resolves differently.
  • Approving a lock file diff without reading it.

For more on lock file integrity, see CocoaPods supply chain security and Podfile.lock integrity risks.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how a fixed version is surfaced for a vulnerable package, which is the signal that tells you to run a targeted update.

Safeguard builds an SBOM and scans your dependencies for known vulnerabilities, and you can run a free scan at gold.safeguard.sh/scan to see what your own project pulls in.

Quick check

Does pod install ever upgrade a pod?

Not one that is already in the lock file. It resolves pods that are new or whose Podfile requirement changed.

Should the Pods folder be committed?

The CocoaPods guide treats that as a team policy decision. It is firm that Podfile.lock should be committed.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.