Skip to content

Dependabot

Lisa Chung edited this page Aug 27, 2024 · 33 revisions

Dependabot is now enabled, ensuring that VRO dependencies (Java, Python, Docker, and GitHub Actions) remain up-to-date. Daily scheduled checks automatically generate pull requests to upgrade library versions, like these examples. Additionally, the updates are auto-merged when safe to do so.

This setup helps keep VRO code secure by staying ahead of vulnerabilities and reduces the effort needed to resolve SecRel alerts, which is critical for production deployments.

On-Call Responsibility for Dependabot

The on-call developers, as assigned through PagerDuty, is responsible for monitoring and managing Dependabot pull requests and any related issues. If Dependabot encounters a problem or raises an update that requires attention:

  1. The on-call team members should review the PR, address any conflicts, and ensure that all tests and checks pass.
  2. If manual intervention is required due to the complexity of the PR or its potential impact on other dependent services:
    • Create a new issue to track the change.
    • Bring the issue to the team's attention during the daily scrum or in the Slack engineering channel for further discussion and prioritization.
  3. Regularly check for any alerts or notifications from Dependabot during your on-call shift to ensure smooth updates.

This ensures that dependency updates are managed efficiently, minimizing risks and delays in keeping the codebase secure and up-to-date.

Known problems

Checks (GitHub Actions) fail on Dependabot-generated PR

UPDATE: Based on Configuring access to private registries for Dependabot and Github action accessing secrets, PR #454 fixes this issue by:

Dependabot Processing Guide

Checking for new Dependabot PRs

Dependabot-generated PRs can be found under the Pull Requests tab by searching on open PRs with the dependencies label

dependabot 1 - open PRs

Also check for and address Code scanning and Secret scanning alerts.

When to accept the update

If the proposed update seems minor or straightforward, follow these steps:

  1. Locate the Dependabot PR in the repo and ensure that all automated unit and integration tests and container health checks run successfully and pass.
  2. Perform a SecRel run on private repo side. Address any SecRel issues and update the public repo PR if needed.
  3. Optionally, conduct additional manual API testing based on the complexity of the update.

Sometimes, the auto-generated PR might miss some necessary changes to fully update the dependencies. After successful functional testing, push any additional changes to the branch and re-run SecRel to confirm no new security issues are introduced.

Whenever possible, update the constraints section in shared.java.vro-dep-constraints.gradle so that other project dependencies can be kept current.

If everything checks out with the generated (or updated) PR:

  1. Comment on the PR confirming that all tests have passed, and tag the Engineering Lead (or another relevant developer) for final approval.
  2. Since Dependabot authored the PR, only one additional reviewer is required for approval.
  3. Once approved, merge the PR into the develop branch.

When to skip an update

If the proposed update is a significant or potentially breaking change that could require extensive testing and/or refactoring, you may choose to postpone it (similar to these PRs). In such cases:

  1. Close the PR with a detailed comment explaining the rationale, and tag the Engineering Lead and/or relevant developers.
  2. Create an issue to track the update for future consideration (see instructions below).

How to open an issue

  1. Navigate to the Issues tab and click "New Issue."
  2. Select “Open a blank issue.”
  3. Complete the ticket details, using this issue as a reference (include a Description and Acceptance Criteria). Be sure to link relevant PRs so they appear in the issue comments.
  4. Apply the Engineer and vro-issue labels under the Labels section.
  5. Add the issue to the ABD VRO Project in the Projects section.
Clone this wiki locally