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
33 changes: 33 additions & 0 deletions .github/workflows/dev-preflight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This is a basic workflow to help you get started with Actions

name: DEVCD-Checkov

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Test with Checkov
id: checkov
uses: bridgecrewio/checkov-action@master
with:
directory: kustomize/overlays/dev
framework: kustomize
35 changes: 35 additions & 0 deletions .github/workflows/prod-preflight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is a basic workflow to help you get started with Actions

name: PRODCD-Checkov

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths: 'kustomize/overlays/prod/**'
pull_request:
branches: [ main ]
paths: 'kustomize/overlays/prod/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Test with Checkov
id: checkov
uses: bridgecrewio/checkov-action@master
with:
directory: kustomize/overlays/prod
framework: kustomize
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- repo: https://github.com/bridgecrewio/checkov.git
rev: '2.0.809' # change to tag or sha
hooks:
- id: checkov
entry: checkov -d kustomize/overlays/prod
verbose: true
files: \.yaml$
args: ["--framework","kustomize"]
5 changes: 2 additions & 3 deletions kustomize/overlays/prod/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ metadata:
namespace: kustomizegoat
spec:
template:
metadata:
annotations:
seccomp.security.alpha.kubernetes.io/pod: "docker/default"
spec:
affinity:
podAntiAffinity:
Expand Down Expand Up @@ -59,6 +56,8 @@ spec:
name: pid-volume
automountServiceAccountToken: false
securityContext:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 10014
runAsGroup: 10014
Expand Down