Skip to content

Commit

Permalink
ci: add govulncheck
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 5, 2024
1 parent 20cc230 commit 25f92e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ jobs:
error: Go source needs to be updated, check the GitHub run summary for the diff.
suggested-fix: Run \`nix run .#generate\` to generate and tidy Go code.
renovate-commit-msg: "fixup: update Go source"

govulncheck:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install Nix
uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run govulncheck
run: nix run .#govulncheck -- ./...
6 changes: 6 additions & 0 deletions packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,10 @@ rec {
genpolicy = genpolicy-msft;
genpolicy-msft = callPackage ./genpolicy_msft.nix { };
genpolicy-kata = callPackage ./genpolicy_kata.nix { };

govulncheck = writeShellApplication {
name = "govulncheck";
runtimeInputs = with pkgs; [ go govulncheck ];
text = ''govulncheck "$@"'';
};
}

0 comments on commit 25f92e5

Please sign in to comment.