Skip to content

Instantly share code, notes, and snippets.

View bugcy013's full-sized avatar
🪄
Focusing

Dhanasekaran Anbalagan bugcy013

🪄
Focusing
View GitHub Profile
@bugcy013
bugcy013 / limit_asyncio_concurrency_example.py
Created August 16, 2024 06:18 — forked from benfasoli/limit_asyncio_concurrency_example.py
Limit concurrency with Python asyncio
import asyncio
from typing import Coroutine, List, Sequence
def _limit_concurrency(
coroutines: Sequence[Coroutine], concurrency: int
) -> List[Coroutine]:
"""Decorate coroutines to limit concurrency.
Enforces a limit on the number of coroutines that can run concurrently in higher

GitLab Security Pipeline Demo

This READMEexplains the whole process, from start to finish, on how to setup a custom Security Pipeline using GitLab. The starting point is a an already vulnerable application, for this example https://github.com/appsecco/dvna will be used.

The repo is cloned and pushed as-is in a new GitLab Project (empty). The first thing to do is enable a runner for our pipeline, this can be done in the Settings -> CI/CD section of the project

Table of Contents

  1. Add default SAST
  2. Customize Stages
@bugcy013
bugcy013 / 238-cue.sh
Created December 21, 2023 06:26 — forked from vfarcic/238-cue.sh
# Source: https://gist.github.com/vfarcic/a5cb2e8dcd1cf9c14194db3310d5c282
#########################################################
# Is CUE The Perfect Language For Kubernetes Manifests? #
# https://youtu.be/Z-fdFEvgNss #
#########################################################
# Additional Info:
# - Cue: https://cuelang.org
# - Helm vs Kustomize - The Fight Between Templating and Patching in Kubernetes: https://youtu.be/ZMFYSm0ldQ0
var res = pm.response.json();
pm.environment.set('token', res.token);
DemoHandler
---
def lambda_handler(event, context):
print(event)
return "hello, world!!"
DemoAuthorizer
---
@bugcy013
bugcy013 / gh_inactive_user.py
Created October 3, 2022 17:26 — forked from psa-jforestier/user.py
List all inactive user of a GitHub organization using GitHub API
'''
List all inactive user of a GitHub organization
See user.py --help for usage.
Partially inspired by https://gist.github.com/morido/9817399
'''
import sys # to use sys.stdout
import os
from datetime import datetime
from time import strftime
import datetime
@bugcy013
bugcy013 / Security Acronyms.md
Created September 9, 2022 06:50
People in the security space love acronyms! Just saying some of these out loud makes your infrastructure more secure.

AI

Asset Identification, part of the SCAP standard, is a language that provides a data model for identifying assets, methods for identifying assets, and guidance on how to use asset identification.

ARF

The Asset Reporting Format, part of the SCAP standard, is a language that expresses the transport format of information about assets, and the relationships between assets and reports. It is also often called Result DataStream because it is complementary to Source DataStream.

CCE

Common Configuration Enumeration, part of the SCAP standard, is an enumeration of security relevant configuration elements for applications and operation systems.

CCSS

# This is a basic workflow to help you get started with Actions
name: Workflow-1
# Controls when the workflow will run
on:
workflow_dispatch:
inputs:
workflow2_name:
description: 'Workflow2 Name for Triggering'
#!/usr/bin/env bash
# Begin Standard 'imports'
set -e
set -o pipefail
gray="\\e[37m"
blue="\\e[36m"
red="\\e[31m"
yellow="\\e[33m"