Skip to content

ci: add Dependabot and dependency review, pin GitHub Actions - #178

Open
testableapple wants to merge 1 commit into
masterfrom
ci/dependabot-dependency-review
Open

testableapple wants to merge 1 commit into
masterfrom
ci/dependabot-dependency-review

Conversation

@testableapple

Copy link
Copy Markdown
Collaborator

Problem

Nothing in this repo checks a pull request for dependencies with known vulnerabilities, and nothing keeps the GitHub Actions the workflows use up to date. The workflows also refer to actions by tag, and a tag can be moved to different code later.

Part of CHA-7207. The process is described in DevSecOps for SDK repositories. The client SDK repos get the same setup, for example in stream-chat-swift#4446.

Solution

  • Dependency Review (dependency_review.yml): a check on every pull request that fails when the PR adds or changes a dependency to a version with a known vulnerability. It also shows the OpenSSF Scorecard of each changed dependency and warns below 3. It calls the GitHub API, so it runs on the github-public-amd64 runner group.
  • Dependabot (dependabot.yml): weekly updates of the GitHub Actions in one grouped PR, with a chore title so it passes the PR title check. A release must be 4 days old before it is proposed. Ruby gems get security updates only: their entry sets open-pull-requests-limit: 0, which switches the routine version updates off and leaves the security ones.
  • Pinned actions: every action reference now names a full commit SHA, with the release in a comment (21 references changed). Dependabot keeps both up to date.
  • These actions move to a new major version: actions/checkout v4 and v5 to v7.0.1. Every other action stays on the major version it had and only moves to its latest release.
  • Runners: 1 job that use no GitHub token move from the github-public-amd64 runner group to ubuntu-26.04: ci.yml (tests-passed). Jobs that call the GitHub API, and every job in the release workflow, stay where they were.

How to verify

  1. The checks on this PR are the first run of the changed workflows, on the new runners where a job moved.
  2. Dependency Review runs on this PR.
  3. regen.yml and release.yml changed too and do not run on a PR. Watch their next run.

@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.

This branch has not been deployed

No deployments
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