HardenKitDocs
Guides

GitHub Action

Run the scan on every pull request and fail the build on what matters.

Add it to a workflow

name: Security
on: [pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: hardenkit/scan@v0
        with:
          fail-on: high

The upgrade plan and the findings appear in the job summary. The step fails when a finding is at or above fail-on. Vulnerabilities exploited in the wild always fail it.

Inputs

InputDefaultWhat it does
target.The directory, file or container image to scan
fail-onhighkev, critical, high, medium or low. Empty never fails
versionthe action's tagThe hardenkit version to run
argsemptyExtra arguments for hardenkit scan, for example --verbose
tokenthe workflow's tokenUsed to download the release

Scan the images you deploy

Hosted runners include Helm, so charts are rendered and checked. To scan the images your manifests run as well:

- uses: hardenkit/scan@v0
  with:
    args: --images

On this page