Skip to content

Add Dependabot and dependency review - #125

Open
testableapple wants to merge 6 commits into
developfrom
add/dependabot-dependency-review
Open

testableapple wants to merge 6 commits into
developfrom
add/dependabot-dependency-review

Conversation

@testableapple

@testableapple testableapple commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

🔗 Issue Links

🎯 Goal

Keep the repo's dependencies up to date and stop PRs from adding known-vulnerable ones. Same setup as stream-chat-swift #4446.

📝 Summary

  • Dependabot version updates for GitHub Actions (workflows and composite actions), Bundler and Swift.
    Updates run weekly, and a new version must be 7 days old before it is proposed. Except for Swift, each ecosystem's updates arrive as one grouped PR.
  • A Dependency Review check on every PR. It shows each changed dependency's OpenSSF Scorecard and warns below 3, and it fails if the PR adds a package that is not in .github/approved-dependencies.txt, pointing out names that look like an approved package.
  • This repo is covered by the weekly Dependency Check in apple-internal-testing-pipeline, which fails and posts to Slack when the dependency graph has a package that is not approved, or an approved package whose source repo or registry entry disappeared, moved or was recreated.
  • .github/approved-dependencies.txt and the checks that enforce it are owned by @GetStream/sdk-managers in CODEOWNERS, so approving a new dependency needs an SDK manager.
  • The Xcode project's Package.resolved is committed, so CI runs the reviewed versions of StreamCore and StreamLogsUI instead of the newest release in range.

🛠 Implementation

  • Dependabot ignores rubocop: it is pinned exactly in the Gemfile, and a new version brings cops that would fail the lint and block the grouped Bundler PR.
  • Package.resolved was resolved with a clean package cache. .gitignore keeps ignoring every other Package.resolved.
  • .github/approved-dependencies.txt lists package URLs without versions, so version bumps pass and only new packages need approval. It was generated from the current dependency graph plus what this PR adds, and it includes transitive dependencies (such as gems from Gemfile.lock), because a malicious package can arrive through one.
  • .github/scripts/dependency_check.py uses only the Python standard library. The PR check reads the base and head dependency graphs from the API itself. For a package that is not approved, it reports a look-alike of an approved package of the same type (including the same name under another owner), a repo or package published less than 90 days ago, fewer than 10,000 downloads and an OpenSSF Scorecard below 3. For approved packages, the weekly check only looks for what can change after approval: the source disappeared, moved to another owner (accepted once the new location is on the list too) or was recreated in the last 90 days, which is how a repo is hijacked after its owner renames their account. Rate limits, server errors and timeouts are retried, then reported as "couldn't check".

🧪 Manual Testing Notes

  • This PR's Dependency Review check is the workflow's first run.
  • After merge: run Dependency Check in apple-internal-testing-pipeline from the Actions tab once every iOS repo has its approved list on the default branch.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@testableapple
testableapple requested a review from a team as a code owner December 1, 2026 16:23
@getstream-metis

Copy link
Copy Markdown

👋 Hi Alexey, want a second pair of eyes on this?

I'm Jeffery, Stream's review agent. I look for bugs, regressions, missing tests and slow paths, and I only post findings I've checked against the code.

  • Review this PR

Or comment /jeffery review. I'll stay quiet unless you ask.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Public Interface

🚀 No changes affecting the public interface.

@stream-ios-release-bot

Copy link
Copy Markdown

SDK Size

title develop branch diff status
StreamFeeds 4.71 MB 4.71 MB 0 KB 🟢

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