Official library of StackPulse steps

stackpulse-logo StackPulse Steps

Build Contributors Stargazers Issues License

This repository is the official library of StackPulse steps.

StackPulse steps are containerized applications that can be composed together to form a playbook. Steps can perform any arbitrary computational task but are most often calls to different services and APIs, allowing the playbook composer to interact with their stack in an automated way. This enables faster and more streamlined handling of alerts and remediation of incidents.

Just like any other container, steps can receive input in the form of run arguments or environment variables and have output directed to stdout and stderr. The standard form for a step to issue its output is as a JSON object as defined in the StackPulse steps Golang SDK.

Development

Build tool

The build tool used by the steps repository is called baur. You must install it on your machine from here.

Baur requires PostgreSQL to operate. After building a step once, the step's file hashes will be stored into postgres. Subsequent attempts to build the step will not do anything unless one of the files the step depends on are changed.

Building all steps locally

In order to start postgres docker container on you must run make pg. This will start a docker container on your machine listening on port 15432. Baur is configured to use postgres running on that port to store its data.

You can build all steps by executing make local command. This process takes a while. Once all steps are built you will enjoy faster subsequent builds.

Building a specific step locally

If you want to build a single step you can run baur run step/name, for example baur run redis/get. If the step or its dependencies were changed the step will be rebuilt. The result of a successful build is a docker image with a tag named of the current branch (i.e: us-docker.pkg.dev/stackpulse/public/redis/keys:MyNewStep)

Step directory structure

Step normally belongs to a family, a family (i.e redis) will contain several steps that are related to it. It will normally be grouped by some common service all steps operate on.

Often times, there will be shared code for all the steps. It can either be a base Docker image that all steps inherit from, some common Go code, etc.

./steps/redis
|-- base
|   |-- base.go
|   |-- go.mod
|   `-- go.sum
|-- bigkeys
|   |-- Dockerfile
|   |-- big-keys.py
|   `-- manifest.yaml
|-- client-list
|   |-- Dockerfile
|   |-- go.mod
|   |-- go.sum
|   |-- main.go
|   `-- manifest.yaml

Any change to base will result all sibling steps to be rebuilt. A change to a specific step (get) will rebuild only that particular step.

Creating a new step

  1. Decide to which family the step belongs, does such family already exist? Check the ./steps/ directory
  2. If such directory already exists, review steps currently in that family. Aknowledge the base directory and see what is already implemented there.
  3. Create a your step under ./steps/family/, it should contain a Dockerfile.
  4. Once your step contains Dockerfile run make apps to generate baur application file for the newly created steps, the file created will be called .app.toml
  5. After running the command you should be able to run baur run family/my-new-step to build it.

Contributing

Pull requests adding new steps and submitting bug fixes are welcome.

Please note that all new steps must use the StackPulse steps Golang SDK and be submitted with a step manifest containing input and output examples.

In the case of bug fixes, where appropriate, please provide an accompanying unit test that validates and verifies the proposed fix.

Troubleshooting

Please feel free to open an issue for any problem or you may encounter while using one of the steps in the repo. We welcome requests and suggestions for new steps as well.

License

Distributed under the BSD-3-Clause License. See LICENSE for more information.

Similar Resources

Coraza WAF is a golang modsecurity compatible web application firewall library

Coraza WAF is a golang modsecurity compatible web application firewall library

Coraza Web Application Firewall, this project is a Golang port of ModSecurity with the goal to become the first enterprise-grade Open Source Web Application Firewall, flexible and powerful enough to serve as the baseline for many projects.

Jan 9, 2023

golang users friendly linux hacking library.

golang users friendly linux hacking library.

go-cheat users friendly linux hacking library

Nov 9, 2022

Golang library to make sandboxing AppImages easy

aisap AppImage SAndboxing Project: a Golang library to help sandbox AppImages with bwrap What is it? aisap intends to be a simple way to implement And

Nov 16, 2022

linenoise is a library that generates strings of random characters that can be used as reasonably secure passwords.

linenoise linenoise is a library that generates strings of random characters (herein called a "noise") that can be used as reasonably secure passwords

Dec 7, 2022

Go library to create/verify armored SSH signatures

Armored ssh signatures in go Package sshsig implements signing/verifying armored SSH signatures. You can use this package to sign data and verify sign

Sep 18, 2022

Go library for the Giphy API

giphy Go library for the Giphy API Command line tool Installation go get -u github.com/sechanakira/giphy/cmd/giphy Usage Commands: search, s

Nov 25, 2021

Redactionschemes - Golang Library for Redactable Signatures

Golang Library for Redactable Signatures ⚠️ WARNING ⚠️ THIS LIBRARY HAS NOT BEEN

Feb 17, 2022

You had one job, or more then one, which can be done in steps

Leprechaun Leprechaun is tool where you can schedule your recurring tasks to be performed over and over. In Leprechaun tasks are recipes, lets observe

Nov 23, 2022

Default godoc generator - make your first steps towards better code documentation

godoc-generate Overview godoc-generate is a simple command line tool that generates default godoc comments on all exported types, functions, consts an

Sep 14, 2022

Flugel Test Documentation for steps to run and test the automatio

Flugel Test Documentation for steps to run and test the automatio

Flugel Test Documentation Documentation for steps to run and test the automation #Test-01 1 - Local Test Using Terratest (End To End) 1- By runing " t

Nov 13, 2022

A reverse engineered github actions compatible self-hosted runner using nektos/act to execute your workflow steps

github-act-runner A reverse engineered github actions compatible self-hosted runner using nektos/act to execute your workflow steps. Unlike the offici

Dec 24, 2022

Bitrise step to parse a JaCoCo generated report and output the code coverage percentages to be used by other steps.

JaCoCo Report Parser This step parses a JaCoCo generated XML report in the jacoco_report_path and outputs the coverage percentages in a String format

Dec 6, 2021

Simulated oscillators using discrete steps

Simulated oscillators using discrete steps

oscillator simulated oscillators using discrete steps. Overview/docs: Installation: go get github.com/splace/oscillator/discrete Example image of a

Nov 2, 2022

Kube-step-podautoscaler - Controller to scale workloads based on steps

Kube-step-podautoscaler - Controller to scale workloads based on steps

Refer controller/*controller.go for implementation details and explanation for a better understanding.

Sep 5, 2022

The Official Twilio SendGrid Led, Community Driven Golang API Library

The Official Twilio SendGrid Led, Community Driven Golang API Library

NEW: Subscribe to email notifications for releases and breaking changes. The default branch name for this repository has been changed to main as of 07

Dec 15, 2022

Mongo Go Models (mgm) is a fast and simple MongoDB ODM for Go (based on official Mongo Go Driver)

Mongo Go Models (mgm) is a fast and simple MongoDB ODM for Go (based on official Mongo Go Driver)

Mongo Go Models Important Note: We changed package name from github.com/Kamva/mgm/v3(uppercase Kamva) to github.com/kamva/mgm/v3(lowercase kamva) in v

Jan 2, 2023

Qmgo - The Go driver for MongoDB. It‘s based on official mongo-go-driver but easier to use like Mgo.

Qmgo English | 简体中文 Qmgo is a Go driver for MongoDB . It is based on MongoDB official driver, but easier to use like mgo (such as the chain call). Qmg

Dec 28, 2022

The official Go package for NSQ

go-nsq The official Go package for NSQ. Docs See godoc and the main repo apps directory for examples of clients built using this package. Tests Tests

Jan 5, 2023

GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way to say thanks to the maintainers of the modules you use and the contributors of Go itself.

GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way  to say thanks to the maintainers of the modules you use and the contributors of Go itself.

Give thanks (in the form of a GitHub ★) to your fellow Go modules maintainers. About GoThanks performs the following operations Sends a star to Go's r

Dec 24, 2022
Let's Encrypt client and ACME library written in Go
Let's Encrypt client and ACME library written in Go

Let's Encrypt client and ACME library written in Go. Features ACME v2 RFC 8555 Register with CA Obtain certificates, both from scratch or with an exis

Dec 27, 2022
:key: Idiotproof golang password validation library inspired by Python's passlib

passlib for go Python's passlib is quite an amazing library. I'm not sure there's a password library in existence with more thought put into it, or wi

Dec 30, 2022
A convenience library for generating, comparing and inspecting password hashes using the scrypt KDF in Go 🔑

simple-scrypt simple-scrypt provides a convenience wrapper around Go's existing scrypt package that makes it easier to securely derive strong keys ("h

Dec 22, 2022
An authorization library that supports access control models like ACL, RBAC, ABAC in Golang
An authorization library that supports access control models like ACL, RBAC, ABAC in Golang

Casbin News: still worry about how to write the correct Casbin policy? Casbin online editor is coming to help! Try it at: https://casbin.org/editor/ C

Jan 6, 2023
Let's Encrypt client and ACME library written in Go
Let's Encrypt client and ACME library written in Go

Let's Encrypt client and ACME library written in Go. Features ACME v2 RFC 8555 Register with CA Obtain certificates, both from scratch or with an exis

Dec 30, 2022
Idiomatic nmap library for go developers
Idiomatic nmap library for go developers

nmap This library aims at providing idiomatic nmap bindings for go developers, in order to make it easier to write security audit tools using golang.

Jan 6, 2023
Secure Remote Password library for Go

go-srp NOTE: This is a port of node-srp to Go. I recommend reading their README for general information about the use of SRP. Installation go get gith

Aug 8, 2022
A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.

age age is a simple, modern and secure file encryption tool, format, and library. It features small explicit keys, no config options, and UNIX-style c

Dec 28, 2022
A Go Library For Generating Random, Rule Based Passwords. Many Random, Much Secure.
A Go Library For Generating Random, Rule Based Passwords. Many Random, Much Secure.

Can Haz Password? A Go library for generating random, rule based passwords. Many random, much secure. Features Randomized password length (bounded). T

Dec 6, 2021