Woodpecker CI plugin with trivy utility to check vulnerabilities in images.
  • Go 95.2%
  • Dockerfile 4.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
renovate-bot f03b9b58d6
All checks were successful
ci/woodpecker/push/change_log Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/tag/release Pipeline was successful
ci/woodpecker/cron/vulnerability Pipeline was successful
ci/woodpecker/cron/auto_merge Pipeline was successful
ci/woodpecker/cron/renovate Pipeline was successful
ci/woodpecker/cron/release Pipeline was successful
maint: Update docker.io/aquasec/trivy Docker tag to v0.73.0 #43
Merged automatically
2026-08-03 15:06:27 +00:00
.gitignore Add file_list mode (#16) 2026-04-15 22:14:52 +00:00
.goreleaser.yaml Redesign the plugin and give more option (#8) 2026-03-22 23:07:45 +00:00
.markdownlint.json Redesign the plugin and give more option (#8) 2026-03-22 23:07:45 +00:00
.prettierrc Redesign the plugin and give more option (#8) 2026-03-22 23:07:45 +00:00
.test.env Fix the ArtifactName in the template (#29) 2026-05-29 20:37:54 +00:00
.trivyignore fallback to trivy 0.69.3 2026-03-23 19:36:01 +01:00
action_file_list.go enhancement: The scan_file_list writes fine packages into a new file (#26) 2026-05-27 19:37:09 +00:00
action_local.go enhancement: Make it visible in the log and issue which CVE belongs to which source/artifact (#25) 2026-05-27 19:20:18 +00:00
action_repo.go enhancement: Make it visible in the log and issue which CVE belongs to which source/artifact (#25) 2026-05-27 19:20:18 +00:00
Containerfile maint: Update docker.io/aquasec/trivy Docker tag to v0.73.0 #43 2026-08-03 15:06:27 +00:00
coverage.out Fix the ArtifactName in the template (#29) 2026-05-29 20:37:54 +00:00
go.mod maint: Update module code.thinkaboutit.tech/pandora/woodpecker-utils.gopack to v1.4.1 #40 2026-08-02 12:05:34 +00:00
go.sum maint: Update module code.thinkaboutit.tech/pandora/woodpecker-utils.gopack to v1.4.1 #40 2026-08-02 12:05:34 +00:00
LICENSE add license 2026-04-11 13:49:42 +02:00
main.go enhancement: The scan_file_list writes fine packages into a new file (#26) 2026-05-27 19:37:09 +00:00
README.md enhancement: The scan_file_list writes fine packages into a new file (#26) 2026-05-27 19:37:09 +00:00
renovate.json ci: Use central renovate.json (#37) 2026-07-19 11:59:33 +00:00
template.go Fix the ArtifactName in the template (#29) 2026-05-29 20:37:54 +00:00
trivy.go Update code with feautre (#15) 2026-04-14 18:55:47 +00:00

Container with trivy for Woodpecker CI

This is a plugin for Woodpecker CI that check vulnerabilities with trivy utility. This can be used in two mode:

  • Using in pipeline to validate the code itself
  • Using as a cron trigger to scan the repository and belonging container images

In case of repo_scan mode, it open a vulnerability dashboard ticket and update it accordingly. It makes a "ping comment" then a critical one was detected.

In case of scan_file_list each line must contains a fully qualified image name. They will be scanned. The non-vulnerable images are put into an output file.

Usage

It can be used at any event.

Example to use from a release workflow to scan image and local project.

steps:
  - name: Build image locally
    image: code.thinkaboutit.tech/pandora/container-builder.woodpecker
    settings:
      debug: true
      registry_push: false
  - name: Check built image.tar.gz for vulnerabilities
    image: code.thinkaboutit.tech/pandora/trivy.woodpecker
    settings:
      debug: true
  - name: Scan the code of the project
    image: code.thinkaboutit.tech/pandora/trivy.woodpecker
    settings:
      mode: local_fs_scan
      debug: true
  - name: Push the verified image to the repository
    image: code.thinkaboutit.tech/pandora/container-builder.woodpecker
    settings:
      debug: true
      registry_push: true
      registry_push_latest: true
      registry_owner: pandora
      registry_user: bot-ci
      registry_pwd:
        from_secret: gitea-bot-ci

Example to use to scan repository:

steps:
  - name: Check built image.tar.gz for vulnerabilities
    image: code.thinkaboutit.tech/pandora/trivy.woodpecker
    settings:
      mode: repo_scan
      forgejo_user:
        from_secret: ci-user
      forgejo_token:
        from_secret: ci-password
      debug: true

Settings

Base settings

Name Default value Description
mode local_image_scan It can be local_image_scan, local_fs_scan, scan_file_list or repo_scan
repo_name CI_REPO_NAME Name of repository
repo_owner CI_REPO_OWNER Owner of the repository
forgejo_url CI_FORGE_URL Address of Forgejo

Authentication settings

They are needed when repo_scan is specified.

Name Default value Description
forgejo_user User to handle issues
forgejo_token Access token for CI user

File list settings

They are need when scan_file_list is specified.

Name Default value Description
file_list image_list Name of the file that is read
file_output ok_image_list Images that are not vulnerable
forgejo_user (optional) User to handle issues
forgejo_token (optional) Access token for CI user