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 December 9, 2024 08:30
Git LFS Track Multiple Files
git lfs install \
&& git lfs track \
"*.bmp" \
"*.doc" \
"*.docx" \
"*.drawio" \
"*.gif" \
"*.jpg" \
"*.pdf" \
"*.png" \
@adriantorrie
adriantorrie / .pre-commit-config.yaml
Last active December 8, 2024 13:52
Pytest pre-commit hook
# Pre-commit rules
#
# Notes
# -----
# - Ensure you have installed the hooks, see the README for instructions.
# - When you add a new hook you must run:
# - `pre-commit run --all-files`
#
# References
# ----------
@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]...