Skip to content

Add run every morning #23

Add run every morning

Add run every morning #23

Workflow file for this run

name: Scan all images
on:
- workflow_dispatch
- schedule:
- cron: '30 2 * * *'
jobs:
image_list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.7.1
- name: Install grype
run: curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
- name: Install deps
run: poetry install
- name: Generate image names
id: scan
run: poetry run python stack_scanner/main.py
outputs:
matrix: ${{ steps.scan.outputs.matrix }}
scan:
needs: image_list
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
product_version: ${{ fromJson(needs.image_list.outputs.matrix) }}
steps:
- name: Run Grype image
uses: MaibornWolff/secobserve_actions_templates/actions/SCA/grype_image@main
with:
target: docker.stackable.tech/stackable/${{ matrix.product_version.product }}:${{ matrix.product_version.version }}-stackable${{ matrix.product_version.release }}
report_name: 'dd_import_grype_image.json'
so_product_name: ${{ matrix.product_version.product }}
so_branch_name: ${{ matrix.product_version.version }}-stackable${{ matrix.product_version.release }}
so_api_base_url: https://secobserve.stackable.tech
so_api_token: ${{ secrets.SECOBSERVE_API_TOKEN }}
- name: Run Trivy image
uses: MaibornWolff/secobserve_actions_templates/actions/SCA/trivy_image@main
with:
target: 'maibornwolff/dd-import:latest'
report_name: 'dd_import_trivy_image.json'
so_api_base_url: https://secobserve.stackable.tech
so_api_token: ${{ secrets.SECOBSERVE_API_TOKEN }}
so_product_name: ${{ matrix.product_version.product }}
so_branch_name: ${{ matrix.product_version.version }}-stackable${{ matrix.product_version.release }}
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: secobserve
path:
- dd_import_grype_image.json
- dd_import_trivy_image.json