Skip to content

Instantly share code, notes, and snippets.

View paraddise's full-sized avatar

Bulat paraddise

  • 05:14 (UTC +03:00)
View GitHub Profile
@paraddise
paraddise / SecureCodeBox - Overview.md
Last active November 5, 2024 07:16
SecureCodeBox - Overview.md

Installation

Deploy operator with scan types

helm -n securecodebox-system upgrade --install --create-namespace securecodebox-operator oci://ghcr.io/securecodebox/helm/operator --version 4.9.0
helm upgrade -n securecodebox-system --install persistence-defectdojo oci://ghcr.io/securecodebox/helm/persistence-defectdojo --version 4.6.0
helm upgrade -n securecodebox-system --install trivy oci://ghcr.io/securecodebox/helm/trivy --version 4.9.0
@paraddise
paraddise / zipslip.sh
Created December 24, 2023 20:20
ZipSlip sample
#!/usr/bin/env bash
#set -x
# Usage: zipslip <host_to_send_and_read> <zip_file_name> <entry_name> <symlink_path>
# This scripts is just a sample, edit to fit your needs
host=$1
file_name=$2
entry_name=$3
spath=$4
@paraddise
paraddise / ESO-SharedSecretStore.md
Last active December 24, 2023 20:21
Writing Kyvenro policy to disallow acccess for not permitted keys in Shared Secret Store

Problem

Sometimes you need to dynamically get acces to secrets from different namespaces.

For example: You have dynamically created namespaces, so you need individual token for each namespace to access secret by individual key.

The easiest, but unscalable solution to create SecretStore in each namespace, but for that, you need to create one more token in Vault.

One more solution

@paraddise
paraddise / Kubernetes: restore deleted manifests wuth auger from etcd backup.md
Last active November 15, 2023 04:55
Kubernetes: restore deleted manifests wuth auger from etcd backup
@paraddise
paraddise / Linstor snapshots in kubernetes with piraeus operator.md
Last active October 13, 2023 11:00
Linstor snapshots in kubernetes with piraeus operator

Linstor snapshots in kubernetes with piraeus operator

Snapshots allow you to remember state of the disk (block device/filesystem) and give you ability restore or create new volumes from it in the future.

What is snapshots

Volume managers that supports snapshots: LVM thin and ZFS. Snapshots there works almost similarly, but have nuances. When we create snapshot, we create new volume with zero size (metadata doesn't count), when you rewrite block in original volume, volume manager copies old block to snapshot volume and writes new block to original volume. With that strategy you now blocks, that was replaced after snapshot creation and that blocks lie in snapshot volume. When you create new volume from snapshot you copy original volume with replace of changed block from snapshot volume.