This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import datetime | |
import requests | |
from time import sleep | |
import json | |
from re import search | |
import argparse | |
logger = logging.getLogger() | |
logging.basicConfig(level=logging.INFO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import environ | |
import logging | |
import requests | |
logging.basicConfig(level=logging.INFO) | |
logger = logging.getLogger(__name__) | |
VULNCHECK_TOKEN = environ.get("VULNCHECK_TOKEN") | |
def retrieve_vulncheck_kev() -> list[dict]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import json | |
from botocore.config import Config | |
# Dynamic Retries & Exponential Backoff | |
config = Config( | |
retries = { | |
'max_attempts': 10, | |
'mode': 'adaptive' | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
https://github.com/Yelp/detect-secrets | |
pip3 install --upgrade pip | |
pip3 install --upgrade awscli | |
pip3 install --upgrade boto3 | |
pip3 install --upgrade detect-secrets | |
''' | |
import json | |
import boto3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## pip3 install --upgrade pip | |
## pip3 install --upgrade requests | |
## pip3 install --upgrade awscli | |
## pip3 install --upgrade boto3 | |
## pip3 install --upgrade pandas | |
import boto3 | |
import json | |
import pandas as pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os # For environmental variables when running in CodeBuild, Fargate, Lambda, etc. | |
import boto3 # Because you need it lol | |
import botocore # For Error Handling | |
import json # To parse "stringified" JSON Policy documents | |
import time # to create Unix timestamps for DynamoDB TTL | |
import multiprocessing | |
import hashlib # To create unique IDs for places where AWS doesn't have them | |
from botocore.config import Config | |
# Boto3 Client Configuration for retries. AWS Defaults to 4 Max Attempts in "Normal Mode" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
import os | |
import json | |
import boto3 | |
import ipaddress | |
import socket | |
import base64 | |
import zlib | |
import datetime |