If you would like to propose a new testability pattern to be added to the GitHub repository, please:
-
Raise a GitHub issue following our contribution guidelines using the
New Testability Pattern Proposal
issue template. -
Wait for the proposal to be approved by the maintainers.
-
Create the new testability pattern with the help of the guide below, and then submit a PR following the contribution guidelines.
Thank you again for your contribution.
A pattern can be created for a SAST catalog either manually or via the tp-framework (see here). In both the cases the pattern needs first to be created based on the format specified in testability patterns structure:
00_pattern_name
|-- 00_pattern_name.json
|-- README.md
|-- 1_instance_00_pattern_name
| |-- 1_instance_00_pattern_name.json
| |-- pattern_src_code // (file or dir)
| |-- pattern_discovery_rule.sc // scala query
| |-- lib/dep folders // (optional)
| |-- other_files // (optional)
|
|-- 2_instance_00_pattern_name
|-- 3_instance_00_pattern_name
|-- ...
You can find a starter template of a simple testability pattern here.
Note: the pattern folder shall be self-contained as files and folders outside it will be neglected by the tp-framework. For example, dependencies should not point outside the pattern folder.