Skip to content

Instantly share code, notes, and snippets.

@skuenzli
skuenzli / example.simulate-bucket-policy.json
Last active June 26, 2021 18:21
Bucket Policy for IAM Policy Simulator Tutorial
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyInsecureCommunications",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<bucket-name>",
@skuenzli
skuenzli / k9diff
Last active April 20, 2021 20:33
Prototype - k9 AWS IAM access summary diff tool
#!/opt/local/bin/bash
#set -x
set -e
report_name=$1
acct=$2
date_1=$3
date_2=$4
# find summaries with a command like
@skuenzli
skuenzli / book-list.md
Last active May 7, 2025 03:46
Stephen's startup book list

This is a list of books that helped me the most in the early stages of k9 Security (which is still in early stages).

It's the list I wish I had when starting out.

Background

I'm a technical founder with +20 years experience as an engineer, architect, and independent consultant. I've also written 2 technical books and +125 blog posts.

Building solutions is easy.

But building a company that solves problems people are willing to pay for is hard.

@skuenzli
skuenzli / unverified.1.yaml
Created May 27, 2025 23:02
Vendor AWS Account Verification Output
- accounts:
- '165736516723'
name: Cloudability
source:
- https://github.com/edrans/tf-aws-iam-cloudability
- https://developers.cloudability.com/docs/vendor-credentials-end-point
- accounts:
- '507897595701'
- '530014582677'
name: Rackspace
@skuenzli
skuenzli / analyze_security_findings.py
Created September 11, 2025 02:20
Analyze Issues in Security Hub
@tool
def analyze_security_findings(findings: List[Dict[str, Any]],
max_important_findings: int = 10) -> Dict[str, Any]:
"""
Analyze and prioritize security findings based on severity, resource type, and impact.
Args:
findings: List of security findings in OCSF format
max_important_findings: Maximum number of 'important' findings to return from the analysis (default 10)
@skuenzli
skuenzli / export_ocsf_findings.py
Created September 23, 2025 21:44
Export Findings from Security Hub in OCSF format
#!/usr/bin/env python3
"""
Get findings from Security Hub in OCSF format.
Example usage:
python3 export_ocsf_findings.py --account 123456789012 --status New --severity Fatal --severity Critical --severity High
python3 export_ocsf_findings.py --days-ago 30 --severity Critical
"""
import argparse