Giter Site home page Giter Site logo

infra-action-sysdig-scan's Introduction

infra-action-sysdig-scan

GitHub Action to scan container images with Sysdig scan

Inputs

Required

  • image_tag: The tag of the local image to scan. Example: "sysdiglabs/dummy-vuln-app:latest"
  • sysdig-secure-token: API token for Sysdig Scanning auth.
  • scan-type: "Type of scan to perform. Possible values: "legacy","new", "both". Default: "legacy"
  • sysdig-secure-url: Sysdig Secure URL. Example: https://secure-sysdig.svc.cluster.local

Optional

  • sysdig-skip-tls: Skip TLS verification when calling secure endpoints.
  • severity: "Severity level to fail the build"
  • input-type: If specified, where should we scan the image from.
  • policy-list: Comma separated list of policies to include

Ignore failed scans

You can ignore failed Sysdig scans by creating a docker label named com.sysdig.ignore-failed-scan. If the label isn't present the action will fail.

Example workflow

Perform all checks on pull requests

name: Scan image
on: [pull_request]

jobs:

  build:
    runs-on: self-hosted
    steps:
    - uses: actions/checkout@v2
    - uses: draios/infra-action-buildnpush@v1
      with:
        push_to_quay: true
        image_name: "redis-6"
        image_description: "sysdig image for redis-6"
        context_path: "containers/redis"
        dockerfile: "Dockerfile"
        dry_run: ${{ ! ((github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')) }}
        artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
        artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
        quay_username: ${{ secrets.QUAY_USERNAME }}
        quay_password: ${{ secrets.QUAY_PASSWORD }}
        github_token: ${{ secrets.GITHUB_TOKEN }}

  scan:
    runs-on: self-hosted
    needs: build
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Scan image
        uses: draios/infra-action-sysdig-scan@v1
        with:
          image-tag: "${{ needs.build.outputs.names }}"
          sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
          scan-type: "legacy"
          severity: "high"

infra-action-sysdig-scan's People

Contributors

dependabot[bot] avatar mbovo avatar rperezcr avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.