GSL Builder
The GSL Builder is a sandbox that helps you write and test GSL rules. Some parts of the GSL Builder appear as a GSL Editor when you start to create a new rule for your environment. The GSL Builder provides an interactive graphical interface for all supported entities. CloudGuard constantly updates the list of entities and attributes.
Building a New Rule
To build a GSL rule, follow the steps below:
In CloudGuard, you can build GSL posture management rules for multiple cloud platforms.
-
Navigate to the GSL Builder page in the CSPM menu.
-
Select a cloud platform to run the rule on: AWS Amazon® Web Services. Public cloud platform that offers global compute, storage, database, application and other cloud services., Azure Collection of integrated cloud services that developers and IT professionals use to build, deploy, and manage applications through a global network of data centers managed by Microsoft®., or other.
The platforms with the Preview tag are at Early Availability.
All GSL rules and rulesets are platform-specific, so you can run a rule only on the platform it is created for.
Platforms can be static or dynamic:
-
Static platforms - AWS, Azure, GCP Google® Cloud Platform - a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, Google Drive, and YouTube., Alibaba Cloud Cloud computing platform that provides cloud computing services to online businesses and Alibaba's own e-commerce ecosystem., Kubernetes Kubernetes, often abbreviated as “K8s”, orchestrates containerized applications to run on a cluster of hosts., Image Assurance, and Source Code Assurance. CloudGuard recognizes all supported resources (entities, services, and so on) on static platforms.
-
Dynamic platforms - Terraform An infrastructure as code tool that lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share., AWS CloudFormation. CloudGuard cannot predict which resources an IaC plan contains until you upload the plan files. Then after CloudGuard reads and analyzes the script, it builds a set of entities based on data that the script provides. To build rules on a dynamic platform, see Compliance Assessment of Infrastructure as Code.
Because of different naming conventions, the entity's names on the static and dynamic platforms are not the same.
-
Select the mode:
-
Builder - Enter the new rule interactively with hints.
-
Free text - Enter the rule as text.
-
-
Optionally, change Builder to Free text to make small changes before you test the rule.
|
Important - Make sure not to change back from Free text to Builder. If you do, CloudGuard erases the expression in the field. |
For each cloud platform, CloudGuard provides a set of applicable entities. You build a rule with one entity, which is the rule Target, and a combination of the entity attributes, which are the rule Condition.
|
Note - The New tag indicates that recently CloudGuard started to support the entity. |
-
Select an entity from the list.
CloudGuard shows possible actions below, in the interactive section. The attributes (properties) for this type of entity appear on the right below Context Preview.
-
Select one of the actions. CloudGuard shows applicable operators and properties in the interactive section.
-
Select an operator or a property to continue to build a rule. Use the context preview on the right to expand properties and see their structure.
Note - Some asset properties have the indication External, for example, ExternalObject or ExternalArray. These properties are brought by CloudGuard from another entity to help you write GSL rules easier.
Note - Context preview contains information on static elements only. Information on dynamic elements, such as objects, is not available.
-
To continue with the rule, add more operators, properties, and functions as the context suggests. To learn more about the GSL syntax, see Governance Specification Language (GSL).
-
To delete one or more elements in the rule, put the cursor on these elements, and click (this gives approval to the deletion).
-
Below Test Rule, select one or more environments to test the rule on and click TEST.
CloudGuard runs the rule and shows the Result Details, almost the same as the Assessment Results (see Running an Assessment). The Test History shows the ten last instances when the rule was run.
-
Click clear result to erase the test result.
-
Click clear tests history to erase the history.
After a successful test, select Free text, copy the GSL expression, and paste it into the GSL section of a new rule (see Adding Rules to a Ruleset).
Actions
You can export information about protected assets to a CSV file.
To export protected asset information:
-
Click Export in the upper right and select the detailed view by asset type.
-
Select an applicable platform, environment or OU, and the asset type.
-
Click Done.