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

Tweak "pinned dependency" discussion #999

Merged
merged 8 commits into from
Sep 12, 2021

Conversation

david-a-wheeler
Copy link
Contributor

The Pinned-Dependency discussion has a number of problems.

First, it doesn't even define the term. Let's fix that.

Next, it WAY oversells what
pinned dependencies can do for you. All they do is fix the
dependency. They don't really prevent compromised dependencies;
if you pin an already-compromised dependency, you make it worse,
because now you don't automatically update to the corrected
dependency if there was a later non-malicious version.
It often slows automated security updates, so they can actually
cause a reduction in security (since most updates fix
security vulnerabilities instead of introducing a compromise).

In particular, pinned dependencies are usually a good idea for
applications but you should NOT pin dependencies in libraries.
If a library pins to a version, and the library is only updated
1/year, and the ecosystem requires only 1 version of a library
(true for practically all except JavaScript), users can't update any
dependencies more than 1/year (and in practice they'll never be aligned).
At least a hint of the downsides of pinning should be admitted here.
For a larger discussion, see, for example,
https://docs.google.com/document/d/1x_VrNtXCup75qA3glDd2fQOB2TakldwjKZ6pXaAjAfg/edit#

A better argument for pinning is the reproducibility it brings
when using pinning inside an application. I suggest focusing on
that first.

Pinned dependencies are still typically a good idea for applications,
but they should NOT be oversold.

Signed-off-by: David A. Wheeler dwheeler@dwheeler.com

The Pinned-Dependency discussion has a number of problems.

First, it doesn't even define the term. Let's fix that.

Next, it *WAY* oversells what
pinned dependencies can do for you. All they do is fix the
dependency. They don't really prevent compromised dependencies;
if you pin an already-compromised dependency, you make it worse,
because now you don't automatically update to the corrected
dependency if there was a later non-malicious version.
It often slows automated security updates, so they can actually
cause a *reduction* in security (since most updates *fix*
security vulnerabilities instead of introducing a compromise).

In particular, pinned dependencies are usually a *good* idea for
applications but you should NOT pin dependencies in libraries.
If a library pins to a version, and the library is only updated
1/year, and the ecosystem requires only 1 version of a library
(true for practically all except JavaScript), users can't update any
dependencies more than 1/year (and in practice they'll never be aligned).
At least a hint of the downsides of pinning should be admitted here.
For a larger discussion, see, for example,
https://docs.google.com/document/d/1x_VrNtXCup75qA3glDd2fQOB2TakldwjKZ6pXaAjAfg/edit#

A better argument for pinning is the reproducibility it brings
when using pinning inside an application. I suggest focusing on
that first.

Pinned dependencies are still typically a good idea for applications,
but they should NOT be oversold.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
This is mentioned in the README, but those details should really
be here in the detailed documentation, not in the whole-project README.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
docs/checks.md Outdated Show resolved Hide resolved
@david-a-wheeler
Copy link
Contributor Author

I believe I resolved @laurentsimon 's comment.

The scorecard project only intends to enforce pinned
dependencies on applications (not libraries), as
noted here:
ossf#689

However, that's not documented in docs/checks.md!

This commit makes it clear that this is *intended* to
only apply to applications. It also notes that it's not
possible for an automated tool to always categorize software
correctly (especially when a project is both).

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
@laurentsimon laurentsimon enabled auto-merge (squash) September 12, 2021 23:44
@laurentsimon laurentsimon merged commit ba53081 into ossf:main Sep 12, 2021
@azeemshaikh38
Copy link
Contributor

We need to update checks.yaml not checks.md. I'm a bit surprised that the pre-submit didn't catch this.

@laurentsimon
Copy link
Contributor

laurentsimon commented Sep 13, 2021

Good catch... I did not even realize it when reivewing. @david-a-wheeler can you send a new PR? Update the yaml file, then run make generate-docs.
@naveensrinivasan do you know why pre-submits did not catch the problem?

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.

None yet

3 participants