22 Commits
Author SHA1 Message Date
Dylan Arbour d7259e3867 action.yml: don't default go-version over go-version-file
The go-version-input input defaults to "stable", which actions/setup-go
prefers over go-version-file. This makes go-version-file a no-op unless
go-version-input is first set to "".

Default go-version-input to "" instead, and fall back to "stable" later
if neither go-version-input nor go-version-file is set.

Change-Id: I1d3d5abc83686e96078d7faaf1472d8713f3974e
GitHub-Last-Rev: 2ad299b5e83c081a26956f9689c558feb90cdcae
GitHub-Pull-Request: golang/govulncheck-action#15
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/862401
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Bypass: Sean Liao <sean@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2026-12-01 10:47:33 -08:00
Roland Shoemaker 032d45514a action.yml: use step-level env vars instead of direct vars in commands
It seems unlikely that users would configure this action in a way to
allow injection of malicious content into the commands we run, but
better to be safe here, since GitHub Actions are a footgun with a hair
trigger.

Change-Id: I8d137a1f98f832c8d22506b309f20644fc74e4ec
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/797300
Reviewed-by: Neal Patel <nealpatel@google.com>
Reviewed-by: Neal Patel <neal@golang.org>
TryBot-Bypass: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Commit-Queue: Roland Shoemaker <roland@golang.org>
v1 v1.1.0
2026-07-07 08:37:04 -07:00
Julien Pivotto 3fa7bd9cee action.yml: unset GOOS/GOARCH when installing govulncheck
When a caller sets GOOS=windows at the job level (e.g.
prometheus/windows_exporter, which builds for Windows but runs
CI on Linux), go install would build govulncheck for Windows
instead of the Linux runner, causing "command not found" on
execution.

Clearing GOOS and GOARCH in the install step ensures the tool
is always built for the host platform.

Change-Id: Ied55d19c2f0e733f7882e1f1348db2c4c9f38f1d
GitHub-Last-Rev: b5c359d5956ae33a422e0ed76106f6cf3e63cb89
GitHub-Pull-Request: golang/govulncheck-action#9
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/785640
Auto-Submit: Sean Liao <sean@liao.dev>
TryBot-Bypass: Sean Liao <sean@liao.dev>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2026-06-12 19:01:29 -07:00
Charlotte Brandhorst-Satzkorn 31f7c54634 action.yml: pin action dependencies to full commit SHAs
In August 2025, GitHub introduced a feature which allows GitHub
repositories to enforce that Actions use SHA pinning. If enabled, all
GitHub Actions, including their transitive dependencies, must use SHA
pinning in order to be allowed to run. Switching to SHAs for our Action
dependencies allows repositories with this setting enabled to continue
using golang/govulncheck-action.

Fixes golang/go#75908

Change-Id: I0ffe9a8f56bbfd87dc50136fc35b0fc58abb4206
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/749320
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Bypass: Sean Liao <sean@liao.dev>
2026-02-28 02:47:43 -08:00
Akihiro Suda 5accf6f1b7 action.yml: update dependencies
- actions/checkout: v4.2.2 -> v6.0.1
- actions/setup-go: v5.4.0 -> v6.1.0

See:
- https://github.com/actions/checkout/releases
- https://github.com/actions/setup-go/releases

Notable fixes:
- https://github.com/actions/setup-go/pull/665

Change-Id: I4885641c2e7d15c5362b3aab54c89d7a502ef2be
GitHub-Last-Rev: 81e47c83ae36005a4244b3326362fedbd6e459be
GitHub-Pull-Request: golang/govulncheck-action#8
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/726120
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
TryBot-Bypass: Sean Liao <sean@liao.dev>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
2026-02-12 09:26:03 -08:00
Zvonimir Pavlinovic 357ea4a541 action.yml: specify cache-dependency-path
Also, update the documentation.

Fixes golang/go#70027

Change-Id: I55a45799e89c9073a43e242df9d0ae64db24dffe
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/642635
Reviewed-by: Sean Liao <sean@liao.dev>
Commit-Queue: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Bypass: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2025-05-14 10:27:51 -07:00
Kir Kolyshkin 1ea760651e action.yml: update actions to fix caching issue
When the action is run, it complains when trying to save the cache:

> Failed to save: Unable to reserve cache with key
> setup-go-Linux-ubuntu24-go-1.23.0-xxxx
> another job may be creating this cache. More details: This legacy
> service is shutting down, effective April 15, 2025. Migrate to the new
> service ASAP. For more information: https://gh.io/gha-cache-sunset

This is caused by using an obsoleted version of actions/setup-go,
which is being fixed in v5.3.0 [1].

There were other important actions/setup-go updates as well (such as
including the arch in the cache key in v5.1.0 [2]. For complete changes,
see https://github.com/actions/setup-go/compare/v5.0.0...v5.4.0 and
https://github.com/actions/setup-go/releases.

Update actions/checkout as well; for changes, see
https://github.com/actions/checkout/compare/v4.1.1...v4.2.2 and
https://github.com/actions/checkout/releases.

Fixes golang/go#73616

[1]: https://github.com/actions/setup-go/releases/tag/v5.3.0
[2]: https://github.com/actions/setup-go/releases/tag/v5.1.0
Change-Id: I124d20136cc34f06ac5dad7b0c535fdc3ad0fa0e
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/670318
TryBot-Bypass: Sean Liao <sean@liao.dev>
Reviewed-by: Sean Liao <sean@liao.dev>
Commit-Queue: Sean Liao <sean@liao.dev>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Commit-Queue: Kirill Kolyshkin <kolyshkin@gmail.com>
Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-05-12 12:37:08 -07:00
Oleksandr Redko f03a9d4ce4 README.md: fix typo
Change-Id: I47ebffae76669aeea33ae4850eb7c5da0fad41cf
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/647635
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Bypass: Sean Liao <sean@liao.dev>
Reviewed-by: Sean Liao <sean@liao.dev>
2025-05-12 07:45:07 -07:00
Zvonimir Pavlinovic b625fbe08f action.yml: make sure the latest Go version is default
Due to some confusion on the contract of one of the dependencies,
govulncheck-action would not by default try to download the newest go
version when one was present. This would sometimes even break the action
run due to a seemingly another issue with the dependency. This change
should fix both issues.

Fixes golang/go#69597

Change-Id: I51a21aad2daafc3984866051f91cf9339bb540e2
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/616435
Reviewed-by: Maceo Thompson <maceothompson@google.com>
TryBot-Bypass: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
v1.0.4
2024-10-01 14:47:37 +00:00
Zvonimir Pavlinovic dd0578b371 all: provide options to specify action output
This includes the output format and the file to which the output should
be saved.

Change-Id: Iebbc4ecf38f669de441900c4d1ee3f2b83d1c6a9
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/588735
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Commit-Queue: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Bypass: Zvonimir Pavlinovic <zpavlinovic@google.com>
v1.0.3
2024-05-29 13:07:46 +00:00
Tobias Klauser 3a32958c27 action.yml: update actions to latest versions
Update actions/checkout v3 -> 4.1.1, see
https://github.com/actions/checkout/compare/v3...v4.1.1 for changes.

Update actions/setup-go v4.0.0 -> v5.0.0, see
https://github.com/actions/setup-go/compare/v4.0.0...v5.0.0 for changes.

Change-Id: I8b37eb73efb3d2103e421fbbc29f32b5df8c3037
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/554895
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Maceo Thompson <maceothompson@google.com>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
Commit-Queue: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Bypass: Zvonimir Pavlinovic <zpavlinovic@google.com>
Commit-Queue: Tobias Klauser <tobias.klauser@gmail.com>
v1.0.2
2024-02-06 15:52:01 +00:00
Zvonimir Pavlinovic 7da72f730e all: allow go.mod or go.work Go version to be used
Fixes golang/go#61343

Change-Id: I844f3c83a4e8c6859e6e2527867533e363698b30
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/521735
TryBot-Bypass: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
v1.0.1
2023-08-24 22:31:14 +00:00
Zvonimir Pavlinovic b56219ac10 action.yml: provide option to checkout repository
The repo checkout is enabled by default, but that can lead to some
issues in case the repo was been checked out earlier and some files are,
say, generated. Hence, we make the checkout optional.

Fixes golang/go#61409

Change-Id: I9bf37fb66c02ef3aa7347e6d534e150766c28990
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/520935
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Bypass: Zvonimir Pavlinovic <zpavlinovic@google.com>
2023-08-24 21:15:50 +00:00
Zvonimir Pavlinovic 5f206a9797 actions.yml: add working directory input
Fixes golang/go#61354

Change-Id: If10a7ffcfebdd3542366cc32a543bb59355019d7
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/520175
TryBot-Bypass: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2023-08-17 18:32:35 +00:00
Julie Qiu dd3ead030e README.md: update version to v1
Change-Id: Ie615cb2071f9ed3f43e38d1d00230e372634fbb0
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/509355
Reviewed-by: Julie Qiu <julieqiu@google.com>
TryBot-Bypass: Julie Qiu <julieqiu@google.com>
Reviewed-by: Brandon Kessler <bkessler@google.com>
v1.0.0
2023-07-13 14:59:29 +00:00
Brandon Kessler 4876574c49 Updates the README to specify the leatest version of the GitHub Action
Change-Id: Id46b55c5e52fa65cb33cb6f0558b7236cb7b3418
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/507756
TryBot-Bypass: Brandon Kessler <bkessler@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2023-07-06 17:02:59 +00:00
Brandon Kessler a46a9b37e1 govulncheck-action: add check-latest and cache options
Add options for check-latest and cache as optional inputs for setup-go.

Fixes golang/go#60704

Change-Id: I72325a5f6d8282a9b000fa24e91da65574f05193
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/502538
Reviewed-by: Julie Qiu <julieqiu@google.com>
TryBot-Bypass: Brandon Kessler <bkessler@google.com>
v0.2.0
2023-06-20 13:23:42 +00:00
Julie Qiu 87b6cbd06f README.md: update content
Change-Id: I5184d02e9fd93557f66e5f8918d5269873a54794
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/496878
Reviewed-by: Brandon Kessler <bkessler@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
TryBot-Bypass: Julie Qiu <julieqiu@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
v0.1.0
2023-05-22 16:44:56 +00:00
Julie Qiu e03a9cb174 README.md: wrap text
Change-Id: Ic440b5168ecf73bf739373bcbbc3af36273b9951
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/496877
Reviewed-by: Brandon Kessler <bkessler@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Bypass: Julie Qiu <julie@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2023-05-22 16:36:50 +00:00
Julie Qiu 714f1ec27c govulncheck-action: rename to golang-govulncheck-action
Rename action to golang-govulncheck-action, since govulncheck-action and
govulncheck are already taken on the GitHub marketplace.

Change-Id: I4f329b8dce27d9ecef0f78650579e7ba74997252
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/496876
TryBot-Bypass: Julie Qiu <julie@golang.org>
Reviewed-by: Brandon Kessler <bkessler@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2023-05-22 16:36:38 +00:00
Brandon Kessler 36fe93a417 govulncheck-action: Adding the initial version of the govulncheck github action & README
Change-Id: I1e5ea64b91d6f10147c0632441df189de5e486b3
Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/494038
Reviewed-by: Brandon Kessler <bkessler@google.com>
Auto-Submit: Brandon Kessler <bkessler@google.com>
TryBot-Bypass: Brandon Kessler <bkessler@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Brandon Kessler <bkessler@google.com>
2023-05-15 17:18:47 +00:00
Carlos Amedee a197ae39e5 initial commit 2023-05-04 15:30:51 -04:00