exercism / dart

Exercism exercises in Dart.
https://exercism.org/tracks/dart
MIT License
57 stars 94 forks source link

actions: Update action references to use versions instead of hashes #529

Closed Stargator closed 4 months ago

Stargator commented 7 months ago

This should reduce the number of Dependabot PRs that are created and reviewed

glennj commented 7 months ago

I though that Exercism is trying to use hashes instead of versions. @ErikSchierboom am I misunderstanding

iHiD commented 7 months ago

Yeah, we deliberately use hashes as versions risk introducing section risks, as someone can republish a version with a different, dangerous commit. It's worth noting this has actually previously happened, so it definitely feels like a real risk.

However, I do wonder if for "official" GitHub actions such as checkout, we can rely on the versions.

Stargator commented 7 months ago

@iHiD okay, I wasn't aware of Exercism's policy on this. Could the track's test.yml still use versions? Or should we just drop this PR?

EDIT: Also, shouldn't PRs have enough checks to verify before we update an action that it's working properly?

iHiD commented 7 months ago

Also, shouldn't PRs have enough checks to verify before we update an action that it's working properly?

I think the issue is that actions can read secrets. And so if someone maliciously changes an action upstream and then we inadvertently run it, we leak things.


I'll leave @ErikSchierboom to answer your other questions as he knows more! :)

ErikSchierboom commented 7 months ago

We have a section about this in the docs: https://exercism.org/docs/building/github/gha-best-practices#h-pin-actions-to-shas

You could consider changing the dependabot frequency.

Stargator commented 4 months ago

Closing this due to Exercism policy

Stargator commented 4 months ago

You could consider changing the dependabot frequency.

@ErikSchierboom I don't have permissions to change the Dependabot settings for this repo

ErikSchierboom commented 4 months ago

You do though, as it is configured in https://github.com/exercism/dart/blob/main/.github/dependabot.yml (ping me in the PR)