How to Write a Rule Book?

Rule Books are how you teach Stakpak to follow your way of doing things. In this tutorial, we will learn how to create our own rule books:

  1. Go to stakpak.dev and sign in

  2. On the left tab choose rule books and then press "Create Rule Books"

  1. Here all the magic happens

    1. URI: The unique link or path where the agent fetches and runs your rule book.

    2. Public: You can share the URI of your rule book, and other people will be able to use it Private: Only you will have access to the rule book

    3. Description: Write a description for the rule book

    4. Tags: Add tags the agent uses to decide when to pull the rule book.

    5. Content: Add the main content of your rule book here. It's just a simple Markdown file.

  2. That's it, press "Create Rule Book"

Tips for Writing Stakpak Rule Books?

  • Use a clear structure

  • Describe what needs to be automated rather than giving manual step by step instructions.

  • You can add requirements

    • Only run if there is Terraform code, for example

  • You can ask it to follow certain standards and guidelines

    • Principle of least privilege

    • OWASP Guidelines

    • AWS Well Architected Framework

    • Or even your internal company guidelines

  • Add references

Last updated