1
0
Fork 0
mirror of https://github.com/imjasonh/govulncheck-action synced 2026-07-08 08:45:48 +00:00
govulncheck-action/.github/workflows/example.yml
dependabot[bot] 655cf90f44
chore(deps): bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [step-security/harden-runner](https://github.com/step-security/harden-runner) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6...v6.0.1)

Updates `step-security/harden-runner` from 2.13.2 to 2.13.3
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](95d9a5deda...df199fb7be)

Updates `github/codeql-action` from 4.31.6 to 4.31.7
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](fe4161a26a...cf1bb45a27)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 4.31.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 21:20:28 +00:00

40 lines
1.2 KiB
YAML

name: Example Vulnerability Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual triggering
jobs:
example:
name: Check Example for Vulnerabilities
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6.0.1
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: Run govulncheck on example
id: govulncheck
uses: ./
with:
working-directory: './example'
# We expect the check to fail, since there are known vulnerabilities in the example code.
# Therefore, we fail if no vulnerabilities are found.
- name: Check for vulnerabilities
if: steps.govulncheck.outputs.vulnerabilities-found != 'true'
run: |
echo "No vulnerabilities found, but we expected some in the example code."
exit 1
- name: Demonstrate conditional failure
run: |
echo "In a real workflow, you might want to fail if vulnerabilities are found:"
echo "if: steps.govulncheck.outputs.vulnerabilities-found == 'true'"
echo "run: exit 1"