Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add checkov #140

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/checkov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Checkov
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
scan:
permissions:
contents: read
Comment on lines +11 to +12

Check failure

Code scanning / checkov

Ensure top-level permissions are not set to write-all Error

Ensure top-level permissions are not set to write-all
security-events: write
actions: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkov GitHub Action
uses: bridgecrewio/checkov-action@v12
with:
output_format: sarif
output_file_path: results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: results.sarif
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "CodeQL"
on:
workflow_call:
push:
branches: main
pull_request:
branches: main
permissions:
contents: read
jobs:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Runs security scans
# This workflow can be used as needed and is triggered manually to consolidate the security scans.

name: Security
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
Expand All @@ -19,3 +16,6 @@ jobs:
codeql-analysis:
uses: ./.github/workflows/codeql-analysis.yml
secrets: inherit
checkov:
uses: ./.github/workflows/checkov.yml
secrets: inherit
8 changes: 5 additions & 3 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Reusable workflow that scans a repository for vulnerabilities using Trivy and uploads the results to the GitHub Security tab.
# Triggered by a workflow call event from the Security workflow.
name: Trivy Scan
on:
push:
branches:
- main
pull_request:
workflow_call:
jobs:
trivy_scan:
Expand All @@ -18,7 +20,7 @@ jobs:
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL'
severity: 'CRITICAL,HIGH'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
Expand Down
Loading