Skip to content

Instantly share code, notes, and snippets.

View hackerzhut's full-sized avatar

Sara hackerzhut

View GitHub Profile
@hackerzhut
hackerzhut / pod-baseline.yaml
Created February 3, 2024 14:23 — forked from liggitt/pod-baseline.yaml
pod security proof-of-concept
kind: Pod
apiVersion: v1
metadata:
name: baseline-pod
spec:
containers:
- name: default
image: k8s.gcr.io/pause:3.2
@hackerzhut
hackerzhut / oidc_azure.go
Created January 19, 2024 03:41
OIDC Token Validation Demo - Azure AD
package main
import (
"context"
"fmt"
"github.com/coreos/go-oidc/v3/oidc"
)
type (
@hackerzhut
hackerzhut / scan-gitlab.go
Created December 16, 2022 14:47
scan gitlab for libraries used
package main
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"time"
@hackerzhut
hackerzhut / scan_github.go
Created December 16, 2022 14:38
scan github for libraries used
package main
import (
"context"
"fmt"
"strings"
"github.com/google/go-github/v32/github"
"golang.org/x/oauth2"
)
@hackerzhut
hackerzhut / github.go
Created December 16, 2022 14:35
find language of the repo - github
package main
import (
"context"
"fmt"
"github.com/google/go-github/v32/github"
"golang.org/x/oauth2"
)
@hackerzhut
hackerzhut / gitlab.go
Created December 16, 2022 14:34
find language of the repo - gitlab
package main
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
@hackerzhut
hackerzhut / Commands.md
Last active June 29, 2020 14:24
kubernetes commands

#k8s

kubectl get
kubectl create
kubectl describe

#See cluster set

@hackerzhut
hackerzhut / trace.go
Created May 14, 2020 00:56
Sample Trace Id function
// traceID returns random traceID in uuid format.
func traceID() string {
traceID := uuid.NewV4()
hi, low := binary.LittleEndian.Uint64(traceID[:8]), binary.LittleEndian.Uint64(traceID[8:])
return fmt.Sprintf("%016x%016x", hi, low)
}
@hackerzhut
hackerzhut / golang-tls.md
Created October 22, 2019 12:32 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@hackerzhut
hackerzhut / main.workflow
Created September 9, 2019 01:06 — forked from pahud/main.workflow
Github Actions with Amazon EKS CI/CD
workflow "Demo workflow" {
on = "push"
resolves = ["SNS Notification"]
}
action "Build Image" {
uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6"
runs = ["/bin/sh", "-c", "docker build -t $IMAGE_URI ."]
env = {
IMAGE_URI = "xxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/github-action-demo:latest"