Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ build
gradle/wrapper
gradlew
gradlew.bat

# IDEA
.idea
out/
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ repos:
- id: mixed-line-ending
args: [--fix, lf]
- id: trailing-whitespace
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.5.2
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.7.0
hooks:
- id: zizmor

Expand Down
6 changes: 6 additions & 0 deletions zizmor.yml
Copy link
Collaborator

@OptimumCode OptimumCode May 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Julian, would you be okay with that solution? (I don't see any point in having hash-pin actions in harnesses repo)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the point is the same as "usual" no? I.e. it prevents vulnerabilities due to third party actions getting hacked. E.g. a scenario is:

  • a harness uses an action
  • that action gets hacked and goes unnoticed
  • it gets run here which produces a vulnerable image
  • that image potentially runs on someone's machine who uses bowtie

All of which isn't to say I'm fine with handling this later if need be, there are many places where we do this already (because I wasn't aware of how it could be an issue until zizmor reminded me)

So yeah feel free to merge of course!

Copy link
Collaborator

@OptimumCode OptimumCode May 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that image potentially runs on someone's machine who uses bowtie

I think I did not consider this point (I will take a look at pinning actions to hashes - at least those that build docker image)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to point it out (since it wasn't obvious to me either!) dependabot will happily still keep the hash up to date. So actually another thing for us to consider if we're already considering this threat mode is that we should potentially not automerge github action bump PRs (and only do so for the implementation itself)?...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the problem (I think, at least, this is a problem) is that we have dependabot that updates actions automatically and not review happens - so, it looks like, there is no difference from having ref pinned actions like we do right now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and only do so for the implementation itself

I think it might be a lot of work once we move all the test harnesses out of the bowtie repo

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I don't think we will be able to handle that amount of work across all the repositories (since the frequency of updates for hash-pinned actions will be much higher than right now)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we can, probably, try that at least, and if we see that it does not work for us, go back to the ref-pinned actions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that dependabot adds labels to PRs which says what it is bumping -- so I think it should be as "simple" as ignoring PRs with the github label in automerge? Maybe?? But yeah I'm good with whatever certainly in the short term!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I think it should be as "simple" as ignoring PRs with the github label in automerge?

Yes, that part should be simple. But then we need to find time to review that update (and this part might not be that simple once we move other harnesses to separate repos).
In any case, I will try to create a PR for that, merge it and then we will see whether it works for us or not

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rules:
unpinned-uses:
config:
policies:
actions/*: ref-pin
"*": ref-pin