-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Added templating documentation
- Loading branch information
1 parent
47890a0
commit 827cd20
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _Templating: | ||
|
||
Templating | ||
========== | ||
|
||
In order to increase the security there is a `simple templating` mechanism that allows to inject variables into | ||
parameters you define that are passed to the checks. | ||
|
||
**Example:** | ||
|
||
.. code:: yaml | ||
{ | ||
"type": "ssh-command", | ||
"input": { | ||
"user": "thesecurityman", | ||
"host": "iwa-ait.org", | ||
"port": 6200, | ||
"password": "${ENV.IWA_SECURITY_MAN_PASSWD}", | ||
"command": "/usr/bin/some-security-check --is-secure", | ||
"expected_exit_code": 0, | ||
"timeout": 30 | ||
} | ||
} | ||
Reference table | ||
--------------- | ||
|
||
+--------------+------------------------------+--------------------------------------------------+ | ||
| Pattern | Example | Description | | ||
+==============+==============================+==================================================+ | ||
| ${ENV.*} | ${ENV.USER} | Injects an environment variable from the host | | ||
+--------------+------------------------------+--------------------------------------------------+ | ||
| ${checkName} | http | Name of the currently executed check | | ||
+--------------+------------------------------+--------------------------------------------------+ | ||
| ${date} | 2019-10-31T07:53:45.380307 | Current date and time | | ||
+--------------+------------------------------+--------------------------------------------------+ |