Skip to content

Instantly share code, notes, and snippets.

View adriantorrie's full-sized avatar

Adrian Torrie adriantorrie

View GitHub Profile
@adriantorrie
adriantorrie / trivy_commands.sh
Created October 18, 2024 01:16
Trivy commands
# View all report types available
kubectl get crds | grep aquasecurity
# Get vulnerability reports
kubectl get vulnerabilityreports -A -o table
# Get compliance report configs
kubectl get clustercompliancereports -o wide -n trivy-system
kubectl get clusterconfigauditreports -o wide -n trivy-system
kubectl get clusterinfraassessmentreports -o wide -n trivy-system
@adriantorrie
adriantorrie / trivy_reports.sh
Created October 18, 2024 00:36
Export Trivy reports using kubectl
# Create the security_reports directory if it doesn't exist
mkdir -p security_reports
# Vulnerability summary
kubectl get vulnerabilityreports -A -o wide | \
awk 'NR==1{print $0}
NR>1{
critical+=$7; high+=$8; medium+=$9; low+=$10; unknown+=$11;
print $0
}
@adriantorrie
adriantorrie / trivy.sh
Created October 18, 2024 00:35
Trviy Operator install options
# Enable compliance reports every hour
# - `serviceMonitor.enabled=true`
helm repo add aqua https://aquasecurity.github.io/helm-charts/
helm repo update
helm install aqua/trivy-operator \
--generate-name \
--create-namespace \
--namespace trivy-system \
--set="compliance.reportType=all" \
--set="compliance.cron=* 1 * * *" \
@adriantorrie
adriantorrie / git-lfs-track.sh
Last active June 20, 2024 06:37
Git LFS Track Multiple Files
git lfs track \
"*.jpg" \
"*.png" \
"*.pdf" \
"*.xls" \
"*.xlsx"
@adriantorrie
adriantorrie / .pre-commit-config.yaml
Created November 18, 2020 03:19
Pytest pre-commit hook
# https://github.com/pre-commit/pre-commit/issues/761#issuecomment-394167542
- repo: local
hooks:
- id: pytest
name: pytest
entry: venv/bin/pytest
language: script
pass_filenames: false
# alternatively you could `types: [python]` so it only runs when python files change
# though tests might be invalidated if you were to say change a data file
@adriantorrie
adriantorrie / gist:9156a0389de849ca635e8d7bfd2173f6
Created May 13, 2020 09:09 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@adriantorrie
adriantorrie / gist:f579918c9c6dededd4bbb3eb89e50af1
Created May 13, 2020 09:09 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adriantorrie
adriantorrie / deployment.yml
Created April 15, 2020 11:00 — forked from troyharvey/deployment.yml
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@adriantorrie
adriantorrie / apk flags.md
Created January 28, 2020 04:39 — forked from sgreben/apk flags.md
apk flags

apk

apk-tools 2.8.2, compiled for x86_64.

usage: apk COMMAND [-h|--help] [-p|--root DIR] [-X|--repository REPO] [-q|--quiet] [-v|--verbose] [-i|--interactive] [-V|--version] [-f|--force]
           [--force-binary-stdout] [--force-broken-world] [--force-non-repository] [--force-old-apk] [--force-overwrite] [--force-refresh] [-U|--update-cache]
           [--progress] [--progress-fd FD] [--no-progress] [--purge] [--allow-untrusted] [--wait TIME] [--keys-dir KEYSDIR] [--repositories-file REPOFILE]
           [--no-network] [--no-cache] [--cache-dir CACHEDIR] [--arch ARCH] [--print-arch] [ARGS]...