This file contains hidden or 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
# Image neeeds to have ssh-client | |
image: docker:git | |
services: | |
- docker:dind | |
stages: | |
- staging | |
before_script: | |
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY |
This file contains hidden or 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
# Had to seperate downloading of each product files instead of providing URL list and finding all links due to laziness to handle relative and absolute linking. Perhaps one day I'll fix it. | |
$start_time = Get-Date | |
$download_folder = "D:\Anti-Virus Patches" | |
# Download URL list | |
$mcafee_page_url = "http://download.nai.com/products/DatFiles/4.x/NAI/" | |
$mcafee_file_path = "http://download.nai.com/products/DatFiles/4.x/NAI/" | |
$clamav_page_url = "https://www.clamav.net/downloads/" | |
$clamav_file_path = "http://database.clamav.net/" | |
$trendmicro_page_url = "http://downloadcenter.trendmicro.com/index.php?clk=tab_pattern&clkval=5®s=NABU&lang_loc=1" |
This file contains hidden or 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
sudo subscription-manager register | |
sudo subscription-manager attach | |
sudo subscription-manager refresh | |
sudo subscription-manager repos --enable=rhel-7-server-satellite-6.3-rpms --enable=rhel-server-rhscl-7-rpms --enable=rhel-7-server-rpms | |
sudo yum clean all | |
sudo yum repolist enabled | |
sudo yum update | |
sudo yum upgrade | |
sudo yum install satellite |
This file contains hidden or 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
nginx:1.15 | |
registry:2 | |
python:3.7-stretch | |
node:8.12-jessie |
This file contains hidden or 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
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install adobereader vlc git 7zip teamviewer mremoteng telegram whatsapp vmware-powercli-psmodule bosh-cli vmwarevsphereclient govc kubernetes-cli docker-compose docker-desktop vault kubernetes-helm vscode vscode-gitlens vscode-docker scode-gitignore vscode-icons vscode-ansible microsoft-windows-terminal terraform |
This file contains hidden or 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
apiVersion: app/v1 | |
kind: Deployment | |
metadata: | |
name: carts-db | |
labels: | |
app: carts-db | |
namespace: sock-shop | |
spec: | |
replicas: 1 | |
template: |
This file contains hidden or 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
#!/bin/bash | |
# 'Checking for string "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" in entrypoint' | |
echo "taskDefinitionArn, patchStatus" | |
aws ecs list-task-definitions | jq --raw-output 'map(.[])| .[]' | while read -r i; do | |
echo -n "$i, " | |
if aws ecs describe-task-definition --task-definition "$i" | grep -q "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" | |
then | |
echo patched | |
else | |
echo not patched |
This file contains hidden or 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
#!/bin/bash | |
aws ecs list-clusters | jq --raw-output 'map(.[])| .[]' | while read -r CLUSTER; do | |
aws ecs list-tasks --cluster "$CLUSTER" --desired-status RUNNING --launch-type FARGATE --no-paginate | jq --raw-output 'map(.[])| .[]' | while read -r TASK; do | |
aws ecs describe-tasks --cluster "$CLUSTER" --tasks "$TASK" | jq ".tasks | .[] | .taskDefinitionArn" | awk -F "/" '{print $NF}' | tr -d '"' | while read -r RUNNINGTASKDEFINITION; do | |
echo "cluster, taskDefinitionArn, patchStatus" | |
echo -n "$CLUSTER, $RUNNINGTASKDEFINITION, " | |
# 'Checking for string "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" in entrypoint' | |
if aws ecs describe-task-definition --task-definition "$RUNNINGTASKDEFINITION" | grep -q "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" | |
then | |
echo patched |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "InventoryPermissions", | |
"Effect": "Allow", | |
"Action": [ | |
"eks:ListFargateProfiles", | |
"eks:DescribeFargateProfile" | |
], |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "QualysCustomPolicyPermissions", | |
"Effect": "Allow", | |
"Action": [ | |
"states:DescribeStateMachine", | |
"elasticfilesystem:DescribeFileSystemPolicy", | |
"qldb:ListLedgers", |
OlderNewer