Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security updates ignoring target-branch configuration #2767

Open
ghost opened this issue Nov 16, 2020 · 8 comments
Open

Security updates ignoring target-branch configuration #2767

ghost opened this issue Nov 16, 2020 · 8 comments
Labels
F: pull-requests Issues about Dependabot pull requests F: security-updates 🔐 Issues specific to security updates T: bug 🐞 Something isn't working

Comments

@ghost
Copy link

ghost commented Nov 16, 2020

With the following dependabot.yml:

version: 2
updates:
  # Updates for JS
  - package-ecosystem: "npm"
    directory: "/client"
    schedule:
      interval: "daily"
    target-branch: "develop"

  - package-ecosystem: "npm"
    directory: "/deployment"
    schedule:
      interval: "daily"
    target-branch: "develop"

  # Updates for Java
  - package-ecosystem: "gradle"
    directory: "/api"
    schedule:
      interval: "daily"
    target-branch: "develop"

Dependabot is creating PRs against master instead of develop as seen here:
image

even within the same directory as in:

image

image

@ghost ghost added the T: bug 🐞 Something isn't working label Nov 16, 2020
@feelepxyz
Copy link
Contributor

@pepperrone this is an issue between how Dependabot version updates (configured using the config file) and Security updates work, which you can enable from the Repository/Security tab or Repository/Settings/Security & analysis.

These two products do slightly different things as security updates responds to security alerts from the Dependency Graph which only knows about manifests on your default branch.

Thanks for raising this though as it's not something I've seen reported before. We're working on ways to allow configuring security updates using the config file and this is something we'll need to look into.

@Gicminos
Copy link

+1 It would be very nice to have a way to select the target-branch also for security pull requests. Or otherwise, a way on how to rebase a PR on a different target branch as described here: #2146 would be already good enough!

@ndrewtl
Copy link

ndrewtl commented Apr 11, 2022

Hi @feelepxyz are there any updates on this? There is clearly demand for this feature as seen here, in the issue @Gicminos mentioned, and in the reply to this StackOverflow message. It is a very common workflow for teams to have all updates pushed to a develop branch, which is only later merged into main. Introducing changes directly into main can cause ugly merge conflicts, which slow down the security update process rather than speed it up. If all else fails, could we have a separate configuration option to configure the branch for security update PR's? Thanks so much for maintaining and let us know if you have other thoughts

@feelepxyz
Copy link
Contributor

@ndrewtl I'm no longer working on Dependabot so can't give a good answer to this unfortunately.

cc PM @exvuma

@gperiotto
Copy link

Hi all, any update on the status of this change? It would definitely be a welcomed one!

@jeffwidman jeffwidman changed the title Ignoring target-branch Security updates ignoring target-branch configuration Nov 24, 2022
@jeffwidman jeffwidman added F: pull-requests Issues about Dependabot pull requests F: security-updates 🔐 Issues specific to security updates labels Nov 24, 2022
@jeffwidman
Copy link
Member

jeffwidman commented Nov 24, 2022

While nothing has changed for supporting the target-branch config, I did want to drop some bread crumbs re: related docs for what is currently supported in case future searchers run across this issue while searching for something related:

jsafrane added a commit to kubernetes-csi/node-driver-registrar that referenced this issue Jun 14, 2023
Testing if dependabot can create security pull request for release-2.6, 2.7 and 2.8 branches.

I am trying to cheat with a separate `updates` entry per branch. 

Most likely dependabot cannot bump only security-relevan dependencies in older branches, see  dependabot/dependabot-core#2767 (comment)
jsafrane added a commit to kubernetes-csi/node-driver-registrar that referenced this issue Jun 14, 2023
Testing if dependabot can create security pull request for release-2.6, 2.7 and 2.8 branches.

I am trying to cheat with a separate `updates` entry per branch.

Most likely dependabot cannot bump only security-relevan dependencies in older branches, see  dependabot/dependabot-core#2767 (comment)
jsafrane added a commit to jsafrane/node-driver-registrar that referenced this issue Jun 15, 2023
Testing if dependabot can create security pull request for release-2.6, 2.7 and 2.8 branches.

I am trying to cheat with a separate `updates` entry per branch.

Most likely dependabot cannot bump only security-relevan dependencies in older branches, see  dependabot/dependabot-core#2767 (comment)
@sunnylovestiramisu
Copy link

Is there any ongoing effort to work on this feature support?

@TG-MarioAlten
Copy link

Any news on this topic?
As stated above
"It is a very common workflow for teams to have all updates pushed to a develop branch, which is only later merged into main. Introducing changes directly into main can cause ugly merge conflicts, which slow down the security update process rather than speed it up"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: pull-requests Issues about Dependabot pull requests F: security-updates 🔐 Issues specific to security updates T: bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants