Skip to content

Instantly share code, notes, and snippets.

[
{
"name": "exclude-applications-credentials-in-configuration-files-for-kube-root-ca",
"policyType": "postureExceptionPolicy",
"actions": [
"alertOnly"
],
"resources": [
{
"designatorType": "Attributes",
2021-12-14T11:54:00.037Z INFO Detected OS: debian
2021-12-14T11:54:00.037Z INFO Detecting Debian vulnerabilities...
2021-12-14T11:54:00.053Z INFO Number of language-specific files: 1
2021-12-14T11:54:00.053Z INFO Detecting jar vulnerabilities...
2021-12-14T11:54:00.053Z WARN maven constraint error ([10.5-alpha0,10.5.3.0_1]): failed to new comparer: 2 errors occurred:
* improper constraint: [10.5-alpha0,10.5.3.0_1]
* improper requirements: []
┌────────────────────────┐
│ │
│ common-configmap │
┌─────────────────┤ ├────────────────────┐
│ │ govukAssetRoot: foo │ │
│ │ govukAssetHost: bar │ │
│ │ │ │
│ └────────────────────────┘ │
│ │
# module.vpc.aws_eip.nat[0]:
resource "aws_eip" "nat" {
domain = "vpc"
id = "eipalloc-0019409e6a452d71f"
network_border_group = "eu-west-1"
public_dns = "ec2-54-194-159-48.eu-west-1.compute.amazonaws.com"
public_ip = "54.194.159.48"
public_ipv4_pool = "amazon"
tags = {
"Name" = "eks-test-eu-west-1a"
@kerin
kerin / values.yaml
Created July 29, 2021 14:17
jupyterhub on k8s helm values
proxy:
secretToken: "supersecret"
singleuser:
defaultUrl: /lab
image:
name: jupyter/minimal-notebook
tag: latest
# imagePullPolicy: Always
profileList:
- default: true
@kerin
kerin / gist:4eb8a99a9694e37cc3937711eb715d1b
Created July 29, 2021 14:16
jupyter on k8s helm commands
$ helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
$ helm upgrade --cleanup-on-fail --install jupyterhub jupyterhub/jupyterhub --version=1.0.1 --values values.yaml
# coding=utf-8
import os
import csv
import re
import logging
import optparse
import dedupe
from unidecode import unidecode
class LegalBasisDataWorkspaceSerializer(serializers.ModelSerializer):
def __init__(self, *args, **kwargs):
"""
Create {consent_type}_consent field for each Consent type.
This flattens consent status in the API response, rather than returning
nested serialized Consent objects
"""
super(LegalBasisDataWorkspaceSerializer, self).__init__(*args, **kwargs)
$ bandit -x ./.venv,./tests -r .
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 3.7.6
Run started:2020-01-07 16:40:42.356244
Test results:
>> Issue: [B105:hardcoded_password_string] Possible hardcoded password: 'django.contrib.auth.password_validation'
#!/usr/bin/env python3
from faker import Faker
import csv
import random
fake = Faker("en_GB")
org_types = [
"charity",