Skip to content

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

4 watching

Forks

Repository files navigation

build-scan-push-action

About

GitHub Action to build, scan and push Docker images. This is a thin wrapper around docker-build-push GitHub action.

This action does the following:

  1. Builds the docker image (with push set to false).
  2. Scans the built docker image for secrets with Trufflehog.
    • GitHub action fails if secrets are found in the docker image
  3. Pushes the docker image to a docker repository if no secrets are found (when push is set to true).

Usage

Replace docker/build-push-action@vX with rudderlabs/[email protected] in your GitHub Workflows.

For more info, refer the documentation of docker-build-push GitHub Action.

Ignoring false positives

By default TruffleHog doesn't support excluding file paths when scanning docker images. In our GitHub Action, we have added support to exclude paths using a .truffleignore file.

Create a .truffleignore file at the root of your repository. Add paths that you want to exclude in gitignore-style pattern format. All paths that match these patterns are excluded in TruffleHog scans.

The action also ignores a built-in list of paths for OS package databases and vendored binaries (see default.truffleignore). These defaults always apply and are merged with your .truffleignore.

Current Limitations

This GitHub Action only accepts the following inputs.

  • build-args
  • cache-from
  • cache-to
  • context
  • file
  • labels
  • load
  • platforms
  • provenance
  • push
  • sbom
  • secret-envs
  • secrets
  • tags
  • target

If you want to use an input which is not in the above mentioned list, feel free to contribute or reach out to infra team for support.

Upgrade Guide

From v1.4.x to v1.5.x

We have added support to exclude paths in v1.4 where we relied on a common truffleignore file in this repository to filter findings. We no longer do that in versions >=v1.5.x and instead rely on repo specific .truffleignore file at the root of your repository.

If you were using truffleignore to exclude paths, you need to move your paths to .truffleignore file at the root of your repository. All your paths should follow gitignore pattern format

If you are not using exclude paths feature, you don't have to do anything.

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages