Skip to content

Commit

Permalink
feat: trivy workloflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bibek4699 committed Nov 4, 2024
1 parent 8fd0c1a commit c03e17d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/repository-trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# yamllint disable rule:line-length
# Use template from https://github.com/honestbank/workflows/tree/main/examples/repository-workflows
---
name: "repository-trivy"
permissions:
contents: read

on: # yamllint disable-line rule:truthy
pull_request:
branches:
- test
- dev
- qa
- prod
- main
push:
branches:
- test
- dev
- qa
- prod
- main

jobs:
repository-checkov:
name: repository-trivy
uses: honestbank/workflows/.github/workflows/shared-repository-trivy.yaml@bibek/devop-5320-create-trivy-shared-workflow
secrets: inherit
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ role in the shared VPC host project.

| Name | Version |
|------|---------|
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.2 |
| <a name="provider_random"></a> [random](#provider\_random) | n/a |

## Modules

Expand Down
19 changes: 19 additions & 0 deletions trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
scan:
skip-dirs:
- test
- .terraform

misconfiguration:
exclude-downloaded-modules: true # Exclude third-party downloaded modules from scanning

# Specify the ignore file for ignored checks or vulnerabilities
ignoreFile: .trivyignore

# Define the severities to focus on (UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL)
severity:
- HIGH
- CRITICAL
- MEDIUM

# Exit with code 1 if vulnerabilities or misconfigurations are found default to 0
exit-code: 1

0 comments on commit c03e17d

Please sign in to comment.