clank
clank is a simple tool that allows you to detect imposter commits in GitHub Actions workflows.
This is primarily a proof-of-concept - our aim is to upstream this check to OpenSSF Scorecards.
The name is inspired by https://github.com/sethvargo/ratchet.
Installation
$ go install github.com/chainguard-dev/clank@latest
Usage
$ clank [ path/to/workflow/dir | URL ]
Examples:
By path:
$ clank ./testdata
testdata/push.yaml
+---------------------------------------------------------------------+--------+-------+-------------------------+
| REF | STATUS | LINES | DETAILS |
+---------------------------------------------------------------------+--------+-------+-------------------------+
| actions://actions/checkout@main | OK | [10] | |
| actions://actions/checkout@c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e | ERROR | [7] | SHA not present in repo |
+---------------------------------------------------------------------+--------+-------+-------------------------+
By URL:
$ clank https://github.com/sigstore/cosign
/var/folders/83/j7crs0zj5g9_nj3wb9hql9hh0000gn/T/clank-3841068745/sigstore/cosign/.github/workflows/build.yaml
+-------------------------------------------------------------------------------+--------+-------+---------+
| REF | STATUS | LINES | DETAILS |
+-------------------------------------------------------------------------------+--------+-------+---------+
| actions://sigstore/cosign-installer@c3667d99424e7e6047999fb6246c0da843953c65 | OK | [46] | |
| actions://actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 | OK | [48] | |
| actions://ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa | OK | [54] | |
| actions://google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d | OK | [57] | |
| actions://actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | OK | [44] | |
+-------------------------------------------------------------------------------+--------+-------+---------+
/var/folders/83/j7crs0zj5g9_nj3wb9hql9hh0000gn/T/clank-3841068745/sigstore/cosign/.github/workflows/codeql-analysis.yml
+---------------------------------------------------------------------------------+--------+-------+---------+
| REF | STATUS | LINES | DETAILS |
+---------------------------------------------------------------------------------+--------+-------+---------+
| actions://actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 | OK | [63] | |
| actions://github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 | OK | [70] | |
| actions://github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 | OK | [78] | |
| actions://actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | OK | [50] | |
| actions://actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 | OK | [53] | |
+---------------------------------------------------------------------------------+--------+-------+---------+
...
Authentication
clank looks for an access token to be passed in via the GITHUB_TOKEN
environment variable. This token is used to fetch content and compute diffs.
While clank can be used against public repos without a token, you may run into rate limiting without it.
The easiest way to get a token is to run:
$ export GITHUB_TOKEN=`gh auth token`
$ clank ./testdata
Bump actions/checkout from 3.5.0 to 3.5.2
Bumps actions/checkout from 3.5.0 to 3.5.2.
Release notes
Sourced from actions/checkout's releases.
Changelog
Sourced from actions/checkout's changelog.
... (truncated)
Commits
8e5e7e5
Release v3.5.2 (#1291)eb35239
Fix: convert baseUrl to serverApiUrl 'formatted' (#1289)83b7061
Release v3.5.1 (#1284)40a16eb
Improve checkout performance on Windows runners by upgrading@actions/github
...You can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump actions/checkout from 3.3.0 to 3.4.0
Bumps actions/checkout from 3.3.0 to 3.4.0.
Release notes
Sourced from actions/checkout's releases.
Changelog
Sourced from actions/checkout's changelog.
... (truncated)
Commits
24cb908
Bump@actions/io
to v1.1.3 (#1225)27135e3
Upgrade dependencies (#1210)7b18718
Upgrade codeql actions to v2 (#1209)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump github.com/fatih/color from 1.14.1 to 1.15.0
Bumps github.com/fatih/color from 1.14.1 to 1.15.0.
Release notes
Sourced from github.com/fatih/color's releases.
Commits
12126ed
Merge pull request #188 from pellared/patch-1770038b
Merge branch 'main' into patch-1c5d9a2b
Merge pull request #189 from fatih/dependabot/go_modules/golang.org/x/sys-0.6.01ceb746
Bump golang.org/x/sys from 0.5.0 to 0.6.066a1b89
Merge pull request #191 from fatih/update-ci-deps3228f5a
ci: update dependencies0226ec9
Refactor color_windows.god080a5b
Merge pull request #186 from martinlindhe/main02ab2ea
windows: enable virtual terminal processing, fixes #169Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump github.com/sethvargo/ratchet from 0.3.1 to 0.4.0
Bumps github.com/sethvargo/ratchet from 0.3.1 to 0.4.0.
Release notes
Sourced from github.com/sethvargo/ratchet's releases.
Commits
4c346f7
Cleanup README5e13c62
Update all deps (#45)9a80a87
Add list of parsers to help output (#44)fbe90fc
add support for Drone (#40)3417511
Update dependencies and templates05cbd8f
Fix bad commentf36399b
Update releasing configDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump golang.org/x/oauth2 from 0.10.0 to 0.11.0
Bumps golang.org/x/oauth2 from 0.10.0 to 0.11.0.
Commits
2e4a4e2
go.mod: update golang.org/x dependenciesac6658e
all: update go version to 1.18Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0
Bumps golang.org/x/oauth2 from 0.9.0 to 0.10.0.
Commits
ec5679f
go.mod: update golang.org/x dependencies989acb1
all: update dependencies to their latest versionsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump golang.org/x/oauth2 from 0.8.0 to 0.9.0
Bumps golang.org/x/oauth2 from 0.8.0 to 0.9.0.
Commits
2323c81
go.mod: update golang.org/x dependenciesDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump actions/checkout from 3.5.2 to 3.5.3
Bumps actions/checkout from 3.5.2 to 3.5.3.
Release notes
Sourced from actions/checkout's releases.
Changelog
Sourced from actions/checkout's changelog.
... (truncated)
Commits
c85c95e
Release v3.5.3 (#1376)d106d46
Add support for sparse checkouts (#1369)f095bcc
Fix typos found by codespell (#1287)47fbe2d
Fix: Checkout fail in self-hosted runners when faulty submodule are checked-i...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump golangci/golangci-lint-action from 3.5.0 to 3.6.0
Bumps golangci/golangci-lint-action from 3.5.0 to 3.6.0.
Release notes
Sourced from golangci/golangci-lint-action's releases.
Commits
639cd34
tests: increase timeout569abaa
fix: out-format (#770)c57cc43
build(deps-dev): bump typescript from 5.0.4 to 5.1.3 (#764)322510a
feat: support out-format as args (#769)185e7a2
feat: add install-mode (#768)5be60c7
docs: improve args examples825a50d
chore: update workflow and doc8c13ec4
doc: Add custom configuration file path to args (#767)416b5d0
build(deps-dev): bump@typescript-eslint/parser
from 5.59.7 to 5.59.8 (#765)66a6080
build(deps-dev): bump@typescript-eslint/eslint-plugin
from 5.59.7 to 5.59.8 ...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump golangci/golangci-lint-action from 3.4.0 to 3.5.0
Bumps golangci/golangci-lint-action from 3.4.0 to 3.5.0.
Release notes
Sourced from golangci/golangci-lint-action's releases.
... (truncated)
Commits
5f1fec7
build(deps-dev): bump@typescript-eslint/parser
from 5.59.6 to 5.59.7 (#758)601007b
build(deps): bump@types/node
from 20.2.3 to 20.2.5 (#756)d2a913e
build(deps-dev): bump@typescript-eslint/eslint-plugin
from 5.59.6 to 5.59.7 ...7233bd7
build(deps-dev): bump@typescript-eslint/eslint-plugin
from 5.59.5 to 5.59.6 ...687f029
build(deps): bump@types/node
from 20.1.4 to 20.2.3 (#755)f9990cd
build(deps-dev): bump@typescript-eslint/parser
from 5.59.5 to 5.59.6 (#754)f30aa51
build(deps-dev): bump eslint from 8.40.0 to 8.41.0 (#753)6b21f58
build(deps-dev): bump@typescript-eslint/eslint-plugin
from 5.59.2 to 5.59.5 ...535ed3a
build(deps): bump@types/semver
from 7.3.13 to 7.5.0 (#748)0078ef0
build(deps-dev): bump@typescript-eslint/parser
from 5.59.1 to 5.59.5 (#750)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump golang.org/x/oauth2 from 0.7.0 to 0.8.0
Bumps golang.org/x/oauth2 from 0.7.0 to 0.8.0.
Commits
839de22
google: don't check for IsNotExist for well-known file0690208
go.mod: update golang.org/x dependencies451d5d6
internal: remove repeated definite articlescfe200d
oauth2: parse RFC 6749 error responseDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Bump actions/setup-go from 4.0.1 to 4.1.0
Bumps actions/setup-go from 4.0.1 to 4.1.0.
Release notes
Sourced from actions/setup-go's releases.
Commits
93397be
Fix Install on Windows is very slow (#393)27eec5b
Merge pull request #396 from actions/dependabot/npm_and_yarn/semver-6.3.1ecfc77a
Merge pull request #397 from actions/dependabot/npm_and_yarn/word-wrap-1.2.41b80a11
Bump word-wrap from 1.2.3 to 1.2.4b1c3434
Fix licensing for Semver 6.3.10bb97b1
Rebuild after updating Semver4220624
Bump semver from 6.3.0 to 6.3.1db8764c
Bump tough-cookie and@azure/ms-rest-js
(#392)08b314a
Merge pull request #383 from akv-platform/issue-3684e0b6c7
Limit to Linux onlyDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)