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

Search for Dockerfiles recursively #1015

Closed
webratz opened this issue Feb 21, 2019 · 14 comments
Closed

Search for Dockerfiles recursively #1015

webratz opened this issue Feb 21, 2019 · 14 comments
Labels
L: docker Docker containers T: feature-request Requests for new features

Comments

@webratz
Copy link

webratz commented Feb 21, 2019

Hey,

I'm aware that there is a directory setting that could be configured. But we have many repos where we have (in this case Dockerfiles) in several sub directories. Adding them all manually is quite error prone.

Is there a setting that i could use to search recursively through the repo for files matching and check all of these?

@greysteil
Copy link
Contributor

Not at the moment. Because Dependabot never clones your repo it's not easy for us to do this without hitting GitHub a lot of times. We're looking into changing that (the git tree API might give us what we need), and serving a list of possible projects for a given repository, but it's a way off for now.

@greysteil
Copy link
Contributor

greysteil commented Feb 21, 2019

(Although if you're using dependabot-core with a script, rather than dependabot.com, hopefully there's nothing stopping you implementing this on your side?)

@webratz
Copy link
Author

webratz commented Feb 21, 2019

Yeah, we will most likely implement that search within our probot app then. just wanted to make sure i don't miss a feature thats already there

@greysteil
Copy link
Contributor

Cool, makes sense! I imagine we will add this, and the logic for it will live in this repo (rather than in the app backend) in the next 3 months or so, but wouldn't want to keep you waiting!

@abxhr
Copy link

abxhr commented Nov 1, 2022

Hello!
Any updates on this issue? Would love to see this feature in dependabot as it would make the config.yml much more neater and easier to maintain

@jeffwidman
Copy link
Member

jeffwidman commented Nov 7, 2022

Agreed, re-opening as recursive file search is relevant to the K8s files as well:

I realize this issue originally encompassed all ecosystems, but since we have similar requests for other ecosystems and the implementation may vary (or may be shared, not sure until we actually build it), I re-scoped this to only Dockerfiles since that's what the OP is actually affected by.

@jeffwidman jeffwidman reopened this Nov 7, 2022
@jeffwidman jeffwidman added T: feature-request Requests for new features L: docker Docker containers labels Nov 7, 2022
@jeffwidman jeffwidman changed the title Search for files recursively Search for Dockerfiles recursively Nov 7, 2022
@Dreamsorcerer
Copy link

Dreamsorcerer commented Nov 7, 2022

What I'm confused by, is that Dependabot security updates seem to happen on all dependency files in a repository, but version updates only check the top-level dependency files. Why would they have different capabilities?

(Note to self: This is needed for aiohttp_demos).

@abxhr
Copy link

abxhr commented Nov 8, 2022

@Dreamsorcerer Exactly. I get it few folks might require the dependabot version updates to be running only in specific places in the repository, but when the requirement increases it is a hassle to configure everything.
It'll be nice to have a parameter or something in the config (boolean), which allows the recursive check to be done from the mentioned directory location

@Dreamsorcerer
Copy link

What I meant is that I'm genuinely confused. Discussion is suggesting that there's a significant piece of work to add this feature (not just a config flag), but the security updates seem to already do it. Are they 2 separate projects without common code or something?

@jeffwidman
Copy link
Member

Sorry for the confusion here.

  1. This ticket was originally closed because Dependabot had a restriction of never cloning the repo. That restriction is no longer valid, so we could tackle this. That's why I re-opened it.
  2. The flow for security alerts is indeed different. The code which generates the repo's dependency graph at https://github.com/dependabot/dependabot-core/network/dependencies is indeed a different code base. Long term we'd like to use only one codebase, but that's a project for another day. When a new security vulnerability arrives, the security alerts code checks for all repos marked as using that dependency in the dependency graph. From there, it will notify the Dependabot version updater of the vulnerable dependency name, version, and the manifest file path. So for a security update PR, Dependabot never has to find the manifest file.

@duglin
Copy link

duglin commented Dec 12, 2022

Until recursiveness is supported, is there a way to specify a list of dirs instead of having to create an entire "update" block for each dir?

@PanzerHabba
Copy link

Hi, any progress ?
I`m working on a project where we have a lot of microservices (.net) and also terraform, python and possibly other "package-ecosystems". Is the only workaround only to create a separate entry for each folder ?

@jeffwidman
Copy link
Member

Unfortunately that's correct, you currently have to specify each entry separately.

Also, since i last commented, i realized this one is a little more complicated because some users will want recursive search, some will want only search the root directory, etc... so I think we need to be explicit about / => root dir, * => recursive to allow disambiguating user intent.

The * recursive case is already tracked under:

So I'm going to close this as a duplicate.

@jeffwidman jeffwidman closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2023
@jeffwidman
Copy link
Member

Until recursiveness is supported, is there a way to specify a list of dirs instead of having to create an entire "update" block for each dir?

@duglin Several workarounds are listed in the comments of this ticket for programmatically generating the list of dirs to specify in dependabot.yml file:

mikaelarguedas added a commit to osrf/docker_images that referenced this issue Jan 2, 2024
Apparently recursively finding Dockerfile is not working: dependabot/dependabot-core#1015

Not sure why it stopped working

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: docker Docker containers T: feature-request Requests for new features
Projects
None yet
Development

No branches or pull requests

7 participants