How to distribute recipes

With Sensei you can store your recipes in numerous places and configure Sensei to load these. Configuring Sensei can also be done in two different ways.

Configuring cookbooks

It is important to know that there are two ways to configure which cookbooks should be loaded. This can be configured locally and inside our platform. The first option will mostly be used by users that write their own recipes. And the second option will likely be used if to distribute your recipes to all your colleagues.

Sensei will automatically fetch the local and remote configuration and combine these, because you can override certain settings that where configured remotely.

Locally

  1. Open your IDE

  2. Open the Cookbook Manager tool window by clicking Tools | Sensei | Cookbook Manager

  3. Here you will see all the configured cookbooks, you can edit / add new ones using this UI.

On the Secure Code Warrior platform

Note

Only company administrators have access to change this configuration

  1. Go to https://portal.securecodewarrior.com

  2. Click on edit preferences

  3. At the bottom of this pop-up there is a section to configure where the recipes should be loaded from.

Where to store the recipes

Recipes can be stored at different places, which makes it very easy to distribute these the way you like. The only important thing to keep in mind is that not all these places are writable. Only storing recipes locally (on a absolute path) or inside the project (using the project-url) allows editing.

Local

Choose any path you like on the system to store the recipes. This has to point to a folder where Sensei has the permission to create the cookbook metadata file (cookbook.yaml). Also inside this directory, subfolders can be created to group recipes or to create a place for html description files.

/home/scw/recipes/java
c:\users\scw\documents\recipes\java

Http(s) server

Recipes can also be stored at a http(s) server. The location should point to a ZIP file that has the same structure as described in the Local section

http://webserver.local/recipes.zip
https://public.webserver.com/recipes.zip

Note that when you choose to upload your recipes ZIP file to our platform, an HTTPS link will be created behind the scenes.

Project

This behaves the same as the Local option. The only difference is that you don't need to specify the absolute path to the location, but rather the relative path starting from the project's root directory.

project://recipes

Git

Lastly you can also specify a git repository to load the recipes from. It is important to note that if you choose to use a private git repository, then the clients are forced to use ssh-authentication when loading recipes from that location. Currently this is the only supported authentication mechanism in Sensei.

With this configuration you can also choose which branch you'd like to use and where the recipes are stored at this repository.

git@github.com:SecureCodeWarrior/recipes.git
git@github.com:SecureCodeWarrior/recipes.git|develop|path/to/recipes/