Skip to content

Instantly share code, notes, and snippets.

View felipecosta09's full-sized avatar
:octocat:
Focusing

Felipe Costa felipecosta09

:octocat:
Focusing
View GitHub Profile
@felipecosta09
felipecosta09 / tmfs_install.sh
Created November 30, 2023 22:34
tmfs_install.sh
#!/bin/bash
# Check if JQ is installed.
if ! command -v jq &> /dev/null
then
echo "JQ could not be found."
exit
fi
# Check if curl is installed.
@felipecosta09
felipecosta09 / tmas_install.sh
Last active March 11, 2024 11:08
tmas_install.sh
#!/bin/bash
# Check if JQ is installed.
if ! command -v jq &> /dev/null
then
echo "JQ could not be found."
exit
fi
# Check if curl is installed.
import http.client
import json
import os
# Define Global Variables for the FSS
apikey = str(os.environ.get("apikey"))
region = str(os.environ.get("region"))
def getExternalId(apikey, region):
conn = http.client.HTTPSConnection('filestorage.'+region+'.cloudone.trendmicro.com')
@felipecosta09
felipecosta09 / group_mover.js
Last active May 21, 2022 22:28
Moving your Group Structure from Deep Security to Cloud One Workload Security
const inquirer = require('inquirer');
const fs = require('fs');
const http = require("https");
const service = 'workload.'
const cloudOneUrl = '.cloudone.trendmicro.com'
const path = "./parameters.json"
if (fs.existsSync(path)) {
@felipecosta09
felipecosta09 / Cloud One Conformity Scan Security.yml
Last active July 29, 2020 12:39
Example of How to Scan your Templates using the GitHub Action 🔍
#---------------------------------------------------------------------
# GitHub Actions to Scan your Cloud Formation Templates in your CI/CD
# Pipeline
#
# Version Date Info
# 1.0 2020 Initial Version
#
# Made by Felipe Costa and Raphael Bottino
#---------------------------------------------------------------------
@felipecosta09
felipecosta09 / deploy.yml
Last active July 20, 2020 12:29
K8s Deploy
apiVersion: v1
kind: Service
metadata:
name: webserver
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 80
selector:
@felipecosta09
felipecosta09 / ContainerScan.yml
Created June 2, 2020 10:50
Container Scan in GitHub Actions
# Container Scan
- name: Cloud One Container Scan in AWS ECR
uses: felipecosta09/Deep-Security-Smart-Check-Scan-Action@v1.0.2
with:
DSSC_IMAGE_NAME: 650143975734.dkr.ecr.us-east-1.amazonaws.com/myapp:latest
DSSC_SMARTCHECK_HOST: ${{ secrets.DSSC_SMARTCHECK_HOST }}
DSSC_SMARTCHECK_USER: ${{ secrets.DSSC_SMARTCHECK_USER }}
DSSC_SMARTCHECK_PASSWORD: ${{ secrets.DSSC_SMARTCHECK_PASSWORD }}
DSSC_IMAGE_PULL_AUTH: ${{ secrets.DSSC_IMAGE_PULL_AUTH }}
DSSC_FINDINGS_THRESHOLD: ${{ secrets.DSSC_FINDINGS_THRESHOLD }}
@felipecosta09
felipecosta09 / myapp.yml
Last active June 2, 2020 10:31
myapp Action
name: Trend-Micro-Container-Security-for-CI-CD
on:
push:
branches:
- master
jobs:
Build_and_Push:
runs-on: ubuntu-latest
steps:
# Code Checkout
@felipecosta09
felipecosta09 / ElasticBeanstalk_in_VPC.template
Last active May 21, 2020 13:08
Example of Cloud Formation Template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template ElasticBeanstalk_in_VPC: Sample template showing how to create an Elastic Beanstalk environment in a VPC. The stack contains 2 subnets: the first subnet is public and contains the load balancer, a NAT device for internet access from the private subnet and a bastion host to allow SSH access to the Elastic Beanstalk hosts. The second subnet is private and contains the Elastic Beanstalk instances. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"BastionKeyName": {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the bastion host",
"Type": "AWS::EC2::KeyPair::KeyName",
@felipecosta09
felipecosta09 / kopsdelete.sh
Last active April 11, 2020 08:08
Delete KOPS Cluster
# Delete KOPS Cluster
kops delete cluster --name ${NAME} --yes