Repository navigation
feat: new audit: stale-action-refs - #713
Conversation
|
Nice, thank you @Marcono1234! This looks great from a very quick initial pass; I'll do a more detailed review tonight. |
| Some action repositories use a "rolling release branch" strategy where | ||
| all commits on a certain branch are considered releases. In such a case | ||
| findings of this audit can likely be ignored. |
There was a problem hiding this comment.
I was thinking about this a bit, and I think we could detect this scenario by looking up the SHA ref, and then seeing whether it belongs to a branch other that the default one. But that's likely to expensive in terms of API calls and slow, so I'm OK with not doing it for now.
There was a problem hiding this comment.
It could also lead to false negatives when that branch is not a rolling release branch, but instead some work-in-progress branch containing bugs.
There was a problem hiding this comment.
True. There's probably no good general solution here, then.
| .with_context(|| { | ||
| format!( | ||
| "couldn't retrieve tag for {owner}/{repo}@{commit_ref}", | ||
| owner = uses.owner, | ||
| repo = uses.repo | ||
| ) | ||
| })?, |
There was a problem hiding this comment.
Nitpick: this is a great context message to add, but it's so good that it makes me realize that it should be in longest_tag_for_commit itself 🙂 -- could you move it there?
There was a problem hiding this comment.
Thanks for the compliment, but I just copied the message from src/audit/known_vulnerable_actions.rs, and you were the one who added it there originally 😅
The with_context call there is now probably redundant; have created #729 to remove it.
woodruffw
left a comment
There was a problem hiding this comment.
Thanks @Marcono1234, this is excellent! Only one tiny nitpick.
(Thinking out loud: I think we'll want to put the "mismatching comment" check under this same audit name, but that's not something that needs to be tackled in this PR at all.)
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
Resolves #689