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

feat: Trivy Security #76

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8e65a98
feat: Trivy Security
segraef Sep 10, 2024
5abe495
feat: Add Trivy vulnerability scanning in IaC mode
segraef Sep 10, 2024
7a7de78
feat: Update Trivy vulnerability scanning in IaC mode
segraef Sep 10, 2024
d0f6581
feat: Update Trivy vulnerability scanning in IaC mode
segraef Sep 10, 2024
71ad0a2
refactor: Update Trivy vulnerability scanning in IaC mode
segraef Sep 10, 2024
599ca70
refactor: Rename job name in scanning.yml to "scan"
segraef Sep 10, 2024
69f96da
refactor: Remove progress hiding in Trivy vulnerability scanning job
segraef Sep 10, 2024
9ef5953
refactor: Remove Trivy vulnerability scanning in IaC mode
segraef Sep 10, 2024
f97d7ab
refactor: Update Trivy vulnerability scanning format to 'table'
segraef Sep 10, 2024
82dbdf9
refactor: Update Trivy vulnerability scanning format to 'github'
segraef Sep 10, 2024
e74b74b
refactor: Update Trivy vulnerability scanning format to 'github' and …
segraef Sep 10, 2024
e4be5d2
refactor: Update Trivy vulnerability scanning format to 'table' and r…
segraef Sep 10, 2024
4cec01e
refactor: Update Trivy vulnerability scanning format to 'github' and …
segraef Sep 10, 2024
88611b7
refactor: Update Trivy vulnerability scanning format to 'sarif'
segraef Sep 10, 2024
7bb7138
refactor: Update Trivy vulnerability scanning format to 'sarif' and u…
segraef Sep 10, 2024
e1e85a9
.
segraef Sep 10, 2024
7722740
refactor: Remove Trivy vulnerability scanning and update tfsec action
segraef Sep 10, 2024
ff7d8ab
refactor: Remove Docker image build step and update Trivy vulnerabili…
segraef Sep 10, 2024
2ac4444
refactor: Update dependencies to fix known vulnerabilities
segraef Sep 10, 2024
11b6bfb
refactor: Update tfsec action to use version v0.1.4
segraef Sep 10, 2024
97c32fd
refactor: Update scanning workflow to include full repository scan
segraef Sep 10, 2024
58948bd
refactor: Update tf_simulation_unsecure.tf
segraef Sep 10, 2024
391cdf9
refactor: Update scanning workflow to include full repository scan an…
segraef Sep 10, 2024
7d8cf87
refactor: Update Trivy vulnerability scanner workflow to include conf…
segraef Sep 11, 2024
48e54e6
refactor: Update Trivy vulnerability scanner workflow to include sepa…
segraef Sep 11, 2024
4e0e782
refactor: Update Trivy vulnerability scanner workflow to include sepa…
segraef Sep 11, 2024
d9fec4c
refactor: Update Trivy vulnerability scanner workflow to include sepa…
segraef Sep 11, 2024
7296da7
refactor: Update Trivy vulnerability scanner workflow to include sepa…
segraef Sep 11, 2024
2deb713
refactor: Update Trivy vulnerability scanner workflow to use table fo…
segraef Sep 11, 2024
93aea2c
refactor: Comment out unused Trivy report upload steps in GitHub work…
segraef Sep 11, 2024
58fc715
refactor: Update Trivy vulnerability scanner workflow to use JSON for…
segraef Sep 11, 2024
ef79b2b
refactor: Comment out unused Trivy report upload steps in GitHub work…
segraef Sep 11, 2024
4865453
refactor: Update Trivy vulnerability scanner workflow to use table fo…
segraef Sep 11, 2024
cd243b1
refactor: Update Trivy vulnerability scanner workflow to use SARIF fo…
segraef Sep 11, 2024
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
37 changes: 37 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: trivy

on:
pull_request:
types: ['opened', 'reopened', 'synchronize']
merge_group:
workflow_dispatch:

permissions:
actions: read
contents: read
security-events: write

jobs:
build:
name: 'trivy scan'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner (file system)
uses: aquasecurity/trivy-action@0.24.0
with:
scan-type: 'fs'
ignore-unfixed: true
scan-ref: .
format: 'sarif'
scanners: 'vuln,secret,config'
output: report-fs.sarif

- name: Upload Trivy report (fs) GitHub Security
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: report.sarif
category: 'fs'
33 changes: 33 additions & 0 deletions unsecure.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
provider "aws" {
access_key = "AKIAIOSFODNN7EXAMPLE"
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
region = "us-west-2"
}

resource "aws_security_group_rule" "my-rule" {
type = "ingress"
cidr_blocks = ["0.0.0.0/0"]
}

resource "aws_alb_listener" "my-alb-listener"{
port = "80"
protocol = "HTTP"
}

resource "azurerm_managed_disk" "source" {
encryption_settings {
enabled = var.enableEncryption
}
}

resource "aws_api_gateway_domain_name" "outdated_security_policy" {
security_policy = "TLS_1_0"
}

resource "aws_api_gateway_domain_name" "valid_security_policy" {
security_policy = "TLS_1_2"
}

variable "enableEncryption" {
default = false
}
Loading