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
#!/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. |
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
#!/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. |
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 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') |
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
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)) { |
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
#--------------------------------------------------------------------- | |
# 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 | |
#--------------------------------------------------------------------- |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: webserver | |
spec: | |
type: LoadBalancer | |
ports: | |
- port: 80 | |
targetPort: 80 | |
selector: |
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
# 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 }} |
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
name: Trend-Micro-Container-Security-for-CI-CD | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
Build_and_Push: | |
runs-on: ubuntu-latest | |
steps: | |
# Code Checkout |
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
{ | |
"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", |
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
# Delete KOPS Cluster | |
kops delete cluster --name ${NAME} --yes |
NewerOlder