Skip to content
Open
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
38 changes: 38 additions & 0 deletions .github/workflows/sysdig-iac-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Sysdig IaC Scan

on:
workflow_dispatch:
pull_request:
paths:
- '**/*.tf'
- '**/*.yaml'
- '**/*.yml'
- '.github/workflows/sysdig-iac-scan.yaml'
push:
branches:
- main
paths:
- '**/*.tf'
- '**/*.yaml'
- '**/*.yml'
- '.github/workflows/sysdig-iac-scan.yaml'

jobs:
iac-scan:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Sysdig IaC Scan
uses: sysdiglabs/scan-action@v6
with:
iac-scan: true
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
sysdig-secure-url: https://app.us4.sysdig.com
stop-on-failed-policy-eval: false
stop-on-processing-error: true
65 changes: 65 additions & 0 deletions .github/workflows/sysdig-image-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Sysdig Image Scan

on:
workflow_dispatch:
pull_request:
paths:
- 'vote/**'
- 'worker/**'
- 'result/**'
- '.github/workflows/sysdig-image-scan.yaml'
push:
branches:
- main
paths:
- 'vote/**'
- 'worker/**'
- 'result/**'
- '.github/workflows/sysdig-image-scan.yaml'

jobs:
image-scan:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build vote image
run: docker build -t examplevotingapp_vote:ci ./vote

- name: Build worker image
run: docker build -t examplevotingapp_worker:ci ./worker

- name: Build result image
run: docker build -t examplevotingapp_result:ci ./result

- name: Scan vote image
uses: sysdiglabs/scan-action@v6
with:
image-tag: examplevotingapp_vote:ci
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
sysdig-secure-url: https://app.us4.sysdig.com
stop-on-failed-policy-eval: false
stop-on-processing-error: true

- name: Scan worker image
uses: sysdiglabs/scan-action@v6
with:
image-tag: examplevotingapp_worker:ci
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
sysdig-secure-url: https://app.us4.sysdig.com
stop-on-failed-policy-eval: false
stop-on-processing-error: true

- name: Scan result image
uses: sysdiglabs/scan-action@v6
with:
image-tag: examplevotingapp_result:ci
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}
sysdig-secure-url: https://app.us4.sysdig.com
stop-on-failed-policy-eval: false
stop-on-processing-error: true
7 changes: 7 additions & 0 deletions k8s-specifications/vote-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ spec:
ports:
- containerPort: 80
name: vote
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "256Mi"