Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
51b36f2
Create checkov.yml
danielma911 Jul 14, 2025
8c1a3f8
Create checkov.yaml
danielma911 Aug 12, 2025
2215ed9
Create yor.yaml
danielma911 Aug 12, 2025
075b671
Update tags (by Yor)
github-actions[bot] Aug 12, 2025
f92fd8e
Delete .github/workflows/checkov.yml
danielma911 Aug 12, 2025
090d651
Create s3.tf
danielma911 Aug 13, 2025
6f20805
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
6766c94
Delete code/s3.tf
danielma911 Aug 13, 2025
d45bb66
Create s33.tf
danielma911 Aug 13, 2025
8e080ff
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
9807579
Merge pull request #3 from danielma911/danielma911-patch-3
danielma911 Aug 13, 2025
5c9e391
added
danielma911 Aug 13, 2025
c363143
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
346a7b8
Update gcs.tf
danielma911 Aug 13, 2025
3f41314
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
f308a50
Update gcs.tf
danielma911 Aug 13, 2025
eb17b6f
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
b7e29b7
Update gcs.tf
danielma911 Aug 13, 2025
1d25aaf
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
ceadcbe
Update gcs.tf 2
danielma911 Aug 13, 2025
fdc9e1c
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
1577b38
Create gcs2.tf
danielma911 Aug 13, 2025
188985b
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
599832f
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
d4e46b1
Delete code/build/gcs.tf
danielma911 Aug 13, 2025
f62a651
Delete code/build/gcs.tf
danielma911 Aug 13, 2025
8b993ae
Update gcs2.tf
danielma911 Aug 13, 2025
a6ce865
Update tags (by Yor)
github-actions[bot] Aug 13, 2025
35587fd
Merge pull request #7 from danielma911/danielma911-patch-5
danielma911 Aug 14, 2025
46c49d7
Create gcs.tf
danielma911 Aug 18, 2025
c601f9b
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
3524c98
Update gcs.tf
danielma911 Aug 18, 2025
9120b52
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
750b0e7
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
a799eef
Delete code/build/gcs2.tf
danielma911 Aug 18, 2025
f273db0
Update gcs.tf
danielma911 Aug 18, 2025
d35c2db
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
7bb7bd9
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
7f91e04
Update gcs.tf
danielma911 Aug 18, 2025
55d585d
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
e30bd85
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
df26f63
Update gcs.tf
danielma911 Aug 18, 2025
2c2926f
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
9ed82b2
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
1312da7
Update gcs.tf
danielma911 Aug 18, 2025
5dabc91
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
1e10b0e
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
1b5901f
Update gcs.tf
danielma911 Aug 18, 2025
b97ecf4
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
c75a745
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
8b01968
Update gcs.tf
danielma911 Aug 18, 2025
6faca15
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
a5019c2
Update tags (by Yor)
github-actions[bot] Aug 18, 2025
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
35 changes: 35 additions & 0 deletions .github/workflows/checkov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: checkov
on:
pull_request:
push:
branches:
- main
jobs:
scan:
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for GitHub/codeql-action/upload-sarif to upload SARIF results

steps:
- uses: actions/checkout@v2

- name: Run checkov
id: checkov
uses: bridgecrewio/checkov-action@master
with:
directory: code/
#soft_fail: true
#api-key: ${{ secrets.BC_API_KEY }}
#env:
#PRISMA_API_URL: https://api4.prismacloud.io

- name: Upload SARIF file
uses: GitHub/codeql-action/upload-sarif@v3

# Results are generated only on a success or failure
# this is required since GitHub by default won't run the next step
# when the previous one has failed. Alternatively, enable soft_fail in checkov action.
if: success() || failure()
with:
sarif_file: results.sarif
19 changes: 19 additions & 0 deletions .github/workflows/yor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: IaC tag and trace

on:
push:
pull_request:

jobs:
yor:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v2
name: Checkout repo
with:
fetch-depth: 0
- name: Run yor action
uses: bridgecrewio/yor-action@main
32 changes: 32 additions & 0 deletions code/build/gcs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
provider "google" {
project = "qwiklabs-gcp-03-fa7edfd03d8e"
region = "us-central1"
}

resource "google_storage_bucket" "Example" {
name = "demo2-${random_id.Rand_suffix.hex}"
location = "us-central1"
force_destroy = true

uniform_bucket_level_access = false

labels = {
git_commit = "8b01968a3ab2b9a1c8f4f38b1d51f999c85df31d"
git_file = "code__build__gcs_tf"
git_last_modified_at = "2025-08-18-07-26-48"
git_last_modified_by = "52453932danielma911"
git_modifiers = "52453932danielma911"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "Example"
yor_trace = "f1afb72e-2fec-49e9-bd3f-03fef6f3075a"
}
}

resource "random_id" "Rand_suffix" {
byte_length = 4
}

output "Bucket_name" {
value = google_storage_bucket.Example.name
}
150 changes: 141 additions & 9 deletions code/deployment_ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,55 @@ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMAAAKEY
export AWS_DEFAULT_REGION=us-west-2
echo "<h1>Deployed via Terraform</h1>" | sudo tee /var/www/html/index.html
EOF


tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web_host"
yor_trace = "900a5a4e-d50a-489d-bca1-cb5d0388451d"
}
}

resource "aws_ebs_volume" "web_host_storage" {
# unencrypted volume
availability_zone = "${var.region}a"
#encrypted = false # Setting this causes the volume to be recreated on apply
size = 1


tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web_host_storage"
yor_trace = "c0d5f6d7-73b0-4605-830f-9322f4e0821f"
}
}

resource "aws_ebs_snapshot" "example_snapshot" {
# ebs snapshot without encryption
volume_id = "${aws_ebs_volume.web_host_storage.id}"
description = "${local.resource_prefix.value}-ebs-snapshot"


tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "example_snapshot"
yor_trace = "0edc82cd-9a76-40b4-b3cf-84103c5e1be3"
}
}

resource "aws_volume_attachment" "ebs_att" {
Expand Down Expand Up @@ -69,14 +102,36 @@ resource "aws_security_group" "web-node" {
"0.0.0.0/0"]
}
depends_on = [aws_vpc.web_vpc]


tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web-node"
yor_trace = "bae57cc2-b69a-42f7-b161-4604df0db619"
}
}

resource "aws_vpc" "web_vpc" {
cidr_block = "172.16.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true


tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web_vpc"
yor_trace = "3b7b6467-c268-46f4-b137-c922181a1624"
}
}

resource "aws_subnet" "web_subnet" {
Expand All @@ -85,7 +140,18 @@ resource "aws_subnet" "web_subnet" {
availability_zone = "${var.region}a"
map_public_ip_on_launch = true



tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web_subnet"
yor_trace = "e792eebf-4140-4079-ba8f-f93196c0c337"
}
}

resource "aws_subnet" "web_subnet2" {
Expand All @@ -94,20 +160,53 @@ resource "aws_subnet" "web_subnet2" {
availability_zone = "${var.region}b"
map_public_ip_on_launch = true



tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web_subnet2"
yor_trace = "59d7c428-1542-4c3f-a18e-5ef39b8885d1"
}
}


resource "aws_internet_gateway" "web_igw" {
vpc_id = aws_vpc.web_vpc.id



tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web_igw"
yor_trace = "ba67901a-5f34-41d2-94de-c110406976ab"
}
}

resource "aws_route_table" "web_rtb" {
vpc_id = aws_vpc.web_vpc.id



tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web_rtb"
yor_trace = "2d2cd15f-db35-4960-9ba9-0db40418264e"
}
}

resource "aws_route_table_association" "rtbassoc" {
Expand All @@ -134,6 +233,17 @@ resource "aws_network_interface" "web-eni" {
subnet_id = aws_subnet.web_subnet.id
private_ips = ["172.16.10.100"]

tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "web-eni"
yor_trace = "f5d866ee-a9a6-49f2-b696-62ddb36586ba"
}
}

# VPC Flow Logs to S3
Expand All @@ -144,12 +254,34 @@ resource "aws_flow_log" "vpcflowlogs" {
vpc_id = aws_vpc.web_vpc.id


tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "vpcflowlogs"
yor_trace = "3ab0449c-0b40-4e2e-bebc-ff0e6693d198"
}
}

resource "aws_s3_bucket" "flowbucket" {
bucket = "${local.resource_prefix.value}-flowlogs"
force_destroy = true

tags = {
git_commit = "d4c35e0270bfd542051278ca30b4b3872c1ae0b2"
git_file = "code/deployment_ec2.tf"
git_last_modified_at = "2024-01-26 23:01:56"
git_last_modified_by = "tprendervill@paloaltonetworks.com"
git_modifiers = "tprendervill"
git_org = "danielma911"
git_repo = "prisma-cloud-devsecops-workshop"
yor_name = "flowbucket"
yor_trace = "5384bbb2-d0a0-42ae-8242-bc57d3f53478"
}
}

# OUTPUTS
Expand Down
Loading