Skip to content

Instantly share code, notes, and snippets.

View arfevrier's full-sized avatar

Arnaud FEVRIER arfevrier

  • Orange Business
  • France
View GitHub Profile
@arfevrier
arfevrier / ai_prompt_ocm_scan.md
Created April 10, 2026 21:45
AI prompt use for a security analysis on a Kubernetes cluster.

You are a senior Kubernetes security expert and offensive security specialist.

Your task is to perform an in-depth security review and threat modeling analysis of the OCM kubernetes operator, with a strong focus on logic flaws and privilege escalation risks.

Limits your analyses to the pkg/registration/register golang package only.

⚠️ CRITICAL CONTEXT:

  • The full controller source code (Go, controller-runtime) is available and MUST be treated as the primary source of truth.
  • Go test files are available and MUST be analyzed to understand real-world usage, expected behaviors, and hidden assumptions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
acl localnet src all
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 443
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
---
services:
wireguard:
build: .
container_name: wireguard
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
# Adapt the tag <latest> to a version
FROM linuxserver/wireguard:latest
ARG WGCF_VERSION=2.2.27
ARG WGCF_ARCH=amd64
RUN wget "https://github.com/ViRb3/wgcf/releases/download/v${WGCF_VERSION}/wgcf_${WGCF_VERSION}_linux_$WGCF_ARCH" -O /usr/local/bin/wgcf; \
chmod +x /usr/local/bin/wgcf; \
mkdir -p /config/wg_confs; \
echo "/etc/s6-overlay/s6-rc.d/init-config/run" > /etc/s6-overlay/s6-rc.d/init-config/up; \
@arfevrier
arfevrier / k3s-agent-compose.yaml
Created December 21, 2024 11:54
Docker compose for K3s Agentless server and worker
version: '3'
services:
k3s-server-1:
image: rancher/k3s:v1.30.6-k3s1
container_name: k3s-server-1
hostname: k3s-server-1
privileged: false
ports:
- "6443:6443"
@arfevrier
arfevrier / tobin.py
Created October 28, 2024 20:13
Stdin converter to binary
import sys
def main():
while True:
byte = sys.stdin.buffer.read1()
if not byte:
break
sys.stdout.buffer.write(bytes.fromhex(byte.decode()))
sys.stdout.buffer.flush()
@arfevrier
arfevrier / tohex.py
Created October 28, 2024 20:12
Stdin converter to hex
import sys
def main():
while True:
byte = sys.stdin.buffer.read1()
if not byte:
break
sys.stdout.write(byte.hex())
sys.stdout.flush()
@arfevrier
arfevrier / squid_dns_resolution.conf
Created August 8, 2024 17:20
Squid proxy configuration based on failure of DNS resolution
## Squid configuration
# Listen port
http_port 8080
# My local network
acl localnet src 192.168.0.0/24
# Any destination with valid IPv4
acl destip dst 0.0.0.0/0.0.0.0
acl Safe_ports port 80
Host internal01
HostName internal01.arfevrier.fr
User user
Port 22
IdentityFile ~/.ssh/id_rsa
ProxyCommand ssh arfevrier.fr exec 3<>/dev/tcp/%h/%p 2<&- ; cat <&3 & cat >&3 ; kill $!