Skip to content

Instantly share code, notes, and snippets.

View anthonygrees's full-sized avatar
🏠
Working from home

Anthony Rees anthonygrees

🏠
Working from home
View GitHub Profile
{
"reportName": "AWS Reesy Test 1",
"reportType": "COMPLIANCE",
"subReportType": "AWS",
"reportDefinition": {
"sections": [
{
"category": "1",
"title": "1: Identity and Access Management",
"policies": [
@anthonygrees
anthonygrees / lw_proxy_scanner_k8s.yml
Created September 29, 2022 22:08
Lacework Proxy Scanner deployment yml to K8s
apiVersion: v1
kind: Service
metadata:
name: lacework-proxy-scanner
namespace: proxy-scanner
labels:
app: lacework-proxy-scanner
spec:
type: LoadBalancer
ports:
@anthonygrees
anthonygrees / google_api_list.txt
Created August 12, 2022 03:33
Google API List - googleapis
NAME TITLE
abusiveexperiencereport.googleapis.com Abusive Experience Report API
acceleratedmobilepageurl.googleapis.com Accelerated Mobile Pages (AMP) URL API
accessapproval.googleapis.com Access Approval API
accesscontextmanager.googleapis.com Access Context Manager API
actions.googleapis.com Actions API
adexchangebuyer-json.googleapis.com Ad Exchange Buyer API
adexchangebuyer.googleapis.com Ad Exchange Buyer API II
adexchangeseller.googleapis.com Ad Exchange Seller API
adexperiencereport.googleapis.com Ad Experience Report API
@anthonygrees
anthonygrees / policy.json
Last active May 24, 2023 00:42
AWS Inventory - A policy to define the LW inventory script permissions required
## You can use `arn:aws:iam::aws:policy/ReadOnlyAccess `
##
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"elasticloadbalancing:DescribeLoadBalancers",

Splunk AD account lockout dashboard

index=windows eventtype="msad-account-lockout" (host=*) 
| eval src_nt_host=if(isnull(src_nt_host),host,src_nt_host) 
| eval lockout=if(EventCode==644 OR EventCode==4740,"Yes","No")
| stats latest(_time) AS time, latest(src_nt_host) AS host, latest(lockout) AS lockout by dest_nt_domain, user
| search lockout="Yes"
| eval ltime=strftime(time,"%c")
| table ltime, user, host
@anthonygrees
anthonygrees / aib.md
Created November 5, 2020 08:24
Removing Ruby 2.5 (core/ruby) AND Chef Infra Server and Workflow from the AIB

Removing Ruby 2.5 (core/ruby) AND Chef Infra Server and Workflow from the AIB

Creating the AIB

  1. Clone the Automate source with git
git clone https://github.com/chef/automate.git
cd automate
  1. Checkout the branch that updates InSpec to a version that uses Ruby 2.6
@anthonygrees
anthonygrees / AWS Images.md
Last active March 1, 2024 10:34
How to find AWS AMI's for Terraform

Centos

aws ec2 describe-images \
    --owners aws-marketplace \
    --filters '[
        {"Name": "name",                "Values": ["CentOS Linux 7*"]},
        {"Name": "virtualization-type", "Values": ["hvm"]},
        {"Name": "architecture",        "Values": ["x86_64"]},
        {"Name": "image-type",          "Values": ["machine"]}
@anthonygrees
anthonygrees / Lambda.MD
Created March 20, 2020 00:07
InSpec on AWS Lambda

aws_lambda

Use the aws_lambda resource to test a specific lambda.

Syntax

    describe aws_lambda do
      it { should exist}    
      its ('handler') { should eq 'main.on_event'}
 its ('version') { should eq '$LATEST' }