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

Feature: Dependency-Update-Tool should check whether tools are available #1726

Open
artem-smotrakov opened this issue Mar 12, 2022 · 11 comments

Comments

@artem-smotrakov
Copy link

Dependency-Update-Tool checks if a project uses Dependabot or Renovate bot. Although these tools support many languages and ecosystems, there are cases they don't support, for example, C/C++ projects. For such projects, it is often not feasible to set up a tool for automated dependency updates. This is related to #74.

For example, Dependency-Update-Tool reports 0 / 10 for CuraEngine that is writted in C++. This score doesn't look fair because it doesn't seem to be possible to configure automatic dependency updates. Neither Dependabot nor Renovatebot can help here.

I'd like to propose updating the check, so that it reports ? for projects that use languages/ecosystems that are not supported by Dependabot/Renovate bot. GitHub API provides a list of languates used in a project repository. The check could use this info to decide if automated dependency updates are possible.

Alternatively, the check could return a non-zero score (but less than 10) if no automated updates are possible.

I'd be happy to draft a pull request for that if the idea is accepted.

@artem-smotrakov artem-smotrakov added the kind/enhancement New feature or request label Mar 12, 2022
@laurentsimon
Copy link
Contributor

Thanks for the report, and sorry for the late reply.. I've missed your issue!

What you suggest seems like a reasonable thing to do. The only drawback is that the check won't be accessible for local repositories - since it now needs an API call; but I think that's fine. We could try to list files and look for extensions.. but that sounds like a a lot of work and prone to errors.

I think it's fine to return -1 if it's not possible with dependabot/renovatebot.

Feel free to send a PR and cc me to it for review. Thanks again for your help!

@agonzalez-plume
Copy link

Agree, C/C++ projects could use a software repo like Conan, but usage is sporadic. The auto dependency tools mentioned don't support it.

What would this check show for the linux kernel for instance, probably that it's not compliant.

@agonzalez-plume
Copy link

I'm assuming a change for this would be in the evaluation module using repo.languages. 'GET /repos/{owner}/{repo}/languages'

if repo_language == 'C' {
	dl.Warn(&checker.LogMessage{
		Text: "no dependency update tool available",
	})
	// Generic summary.
	return checker.CreateInconclusiveResult(name, "no tool available")
}

OR

if repo_language == 'C' {
	dl.Warn(&checker.LogMessage{
		Text: "unsupported language for dependency update",
	})
	// Generic summary.
	return checker.CreateInconclusiveResult(name, "unsupported language")
}

Right?

@laurentsimon
Copy link
Contributor

@naveensrinivasan @azeemsgoogle @justaugustus any comment or thoughts on this?

@justaugustus
Copy link
Member

It would be great to have something like a scorecard config file, where we could allow users to configure acceptable parameters like, "I am not using a dependency update tool/language that is supported by the supported dependency update tools".

The check could use this info to decide if automated dependency updates are possible.

Alternatively, the check could return a non-zero score (but less than 10) if no automated updates are possible.

I think the right approach is refuse to score a scenario that's impossible to satisfy.

@laurentsimon
Copy link
Contributor

Would anyone object if we returned inconclusive results for ecosystems not supported by dependabot and other tools? I think this is what refuse to score a scenario that's impossible to satisfy means, correct?

Would that be a good first step towards improving this check?

@nealmcb
Copy link

nealmcb commented May 11, 2022

If I'm evaluating the security of a tool, and the tool is written in a language doesn't allow effective dependency tracking, my guess is that in many if not most cases, the tool is more vulnerable than an otherwise similar tool written in a language with good dependency tracking support.

I.e. I'd hate to see what amounts to an undeserved bonus awarded for use of a problematic language / ecosystem.

And I'd love for us to find ways to incentivize projects and dependency-checking tools for languages that are currently unsupported. That is sort of what the current bad score does, but perhaps there is a better way to frame it.

If we provide a way for project admins to configure scorecard to explain such things away, it may be used appropriately at times, but I wonder if we'll need new tooling to detect unskillful or dubious configurations of that sort.

@laurentsimon
Copy link
Contributor

to your last point: I would like to enable maintainers to explain their score/results, for example thru code annotation (or anything else really), so that we can provide that data along with the findings. We don't necessarily have to change the score, but at least the information would be available for a human to inspect.

Note that we're trying to move away from scores #1245 (WIP). Any ideas you have on results presentation are useful in this context. Please feel free to share

Copy link

github-actions bot commented Nov 2, 2023

This issue is stale because it has been open for 60 days with no activity.

Copy link

github-actions bot commented Mar 3, 2024

This issue has been marked stale because it has been open for 60 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

6 participants