Skip to content

Commit

Permalink
Limit scope of changes that are monitored by Trivy scan
Browse files Browse the repository at this point in the history
Do not start Trivy scan if changes not related to dependencies.
Run Trivy on daily bases.
Add badge to follow cycle Trivy scans
Enable scans on request

Doc-only: true

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Sep 26, 2024
1 parent 0dfe144 commit 766d9e1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
# Copyright (C) 2024 Intel Corporation.

name: Trivy scan

on:
pull_request:
workflow_dispatch:
schedule:
- cron: '45 8 * * *'
push:
branches: ["master", "release/**"]
pull_request:
paths:
- '**/go.mod'
- '**/pom.xml'
- '**/requirements.txt'
- '**/*trivy*'

# Declare default permissions as nothing.
permissions: {}
Expand All @@ -11,6 +23,8 @@ jobs:
build:
name: Build
runs-on: ubuntu-20.04
permissions:
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Build](https://github.com/daos-stack/daos/actions/workflows/ci2.yml/badge.svg)](https://github.com/daos-stack/daos/actions/workflows/ci2.yml)
[![Codespell](https://github.com/daos-stack/daos/actions/workflows/spelling.yml/badge.svg)](https://github.com/daos-stack/daos/actions/workflows/spelling.yml)
[![Doxygen](https://github.com/daos-stack/daos/actions/workflows/doxygen.yml/badge.svg)](https://github.com/daos-stack/daos/actions/workflows/doxygen.yml)
[![Trivy scan](https://github.com/daos-stack/daos/actions/workflows/trivy.yml/badge.svg)](https://github.com/daos-stack/daos/actions/workflows/trivy.yml)

<a href="https://docs.daos.io/">
<img src="https://avatars.githubusercontent.com/u/20561043?s=400&u=db7cd0ada987ba59c21c3de5f9e7cffba73c3325&v=4" width="200" height="200">
Expand Down
3 changes: 1 addition & 2 deletions utils/trivy/trivy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cache:
backend: fs
clear: false
backend: memory
dir:
redis:
ca: ""
Expand Down

0 comments on commit 766d9e1

Please sign in to comment.