How custom checks work
A custom check has three parts:- Primary asset type: The kind of asset the check judges, such as
AWS::S3::BucketorGCP::Storage::Bucket. Each finding belongs to one asset of this type. - Additional asset types (optional): Other asset types the policy can read, for rules that look across assets. For example, a check on Lambda functions can also read IAM roles.
- Policy: Rego code that receives the assets and returns a verdict for each one it judges:
FAILEDorPASSED.
- As soon as you publish it, and again each time you change it.
- After every scan of each integration from the matching cloud provider.
- Within minutes of a change to a target asset, when continuous scanning is on.
CustomCheck:Read permission. To create, change, preview, or delete checks, it needs CustomCheck:Modify.
Steps to create a custom check
This walkthrough builds a check that fails every S3 bucket without all four S3 Block Public Access settings. Buckets taggedPublicAccess=approved are left out.
1
Go to Settings > Custom checks
The page lists every custom check in the tenant with its asset type, default severity, run status, and number of findings. Click 
New check.
2
Start from an example (optional)
To begin from a working policy, pick one under Examples. The example fills in the whole form, which you can then change. The examples are:
- Match every asset (test): Fails every asset of the chosen type. Use it to see findings flow end to end before you write real logic.
- OIDC trust constraint — GitHub Actions: Fails IAM roles that trust GitHub Actions without limiting which repository can assume them.
- S3 buckets must have versioning + KMS encryption: Fails buckets missing either control.
- EBS volumes must be encrypted: Fails unencrypted EBS volumes.

3
Fill in the details
- Title: What the check enforces, written as a rule. For example,
S3 buckets must block public access. - Slug: A short ID shown on findings and in exports. Plerion fills it in from the title. Use lowercase letters, numbers, and hyphens. The slug must be unique in the tenant.
- Description (optional): More detail on what the check enforces and why.
- Default severity: The severity of each finding, unless the policy sets one: Informational, Low, Medium, High, or Critical.
- Default remediation (optional): How to fix a failing asset. It’s shown on the check’s failed findings.

4
Choose the asset types
In Primary asset type, search by name or type and pick the type the check judges. Here, it’s S3 Bucket (
AWS::S3::Bucket). The list covers every asset type Plerion collects across AWS, Azure, and GCP.If the policy needs other assets, add their types in Additional asset types. Plerion collects these from the same cloud account.
5
Write the policy
Enter the policy in the Rego policy editor. This one returns a failed verdict for each bucket with a Block Public Access setting turned off, and names the settings in the finding’s message:A bucket with no Block Public Access configuration at all fails on all four settings. That’s because 
not is true when a field is missing.
6
Preview the findings
Under Preview, pick an integration in Run against integration and click 
Run preview. Plerion runs the policy against the assets from that integration’s latest scan and shows the findings it would create. Nothing is saved.If the policy has an error, the preview shows the error and the line it’s on. If it produces no findings, check the asset type, the field paths, and the conditions.
7
Click Publish
Plerion saves the check and runs it against every integration from the matching cloud provider. You go back to the list, where the check’s Status shows the run’s progress:
- Running: At least one integration is still being evaluated.
- Completed: The check has run on every integration.
- Error: The run failed on at least one integration.
- Pending: The check hasn’t run yet, or no integration has assets of its type.
See a check’s results
On the custom checks page:- Click a check’s Status to see how its last run went on each integration, with the number of findings and the time of the run.
- Click the number in Findings to open the check’s findings. To open them on the Findings page instead, open the link in a new tab.


What a policy receives and returns
A policy must declarepackage custom and define a rule named result. Plerion evaluates the rule and reads its value as a list of verdicts.
The policy receives:
Each asset has these fields:
Each verdict in
result is an object:
Some rules for verdicts:
- Every verdict becomes a finding. An asset left out of
resulthas no finding, and leaving out an asset that had a finding removes that finding. - Return one verdict per asset. Gather every reason an asset fails into one verdict, as the examples below do.
- A
PASSEDverdict without amessagegets the check’s default message, which reads as a violation. Set a message on passed verdicts, or return failed verdicts only. - If any verdict has another
status, names an asset that isn’t ininput.assets, or lists arelatedAssetIdsentry that isn’t ininput.additionalAssets, Plerion rejects the whole evaluation.
relatedAssetIds to also re-evaluate a verdict when one of the additional assets it names changes. Without it, a change to an additional asset updates the verdict at the next scheduled scan.
Examples
Paste an example into a new check, set the asset types it names, and preview it.Require tags on Lambda functions
Primary asset type:AWS::Lambda::Function
Reports every function, passing those with all the required tags and failing the rest. The message names the missing tags. The check reads tags from meta.resource.providerTags, so it works on any asset type once you change the primary asset type.
Flag IAM roles that trust unapproved accounts
Primary asset type:AWS::IAM::Role
Fails roles that another AWS account can assume when that account isn’t on your allow list. A trust policy that lets in any AWS account, with the principal "*" or {"AWS": "*"}, shows as * in the message. The policy sets each finding’s severity itself:
- Critical when a statement lets in an unapproved account without an
sts:ExternalIdcondition, so anyone in that account can assume the role. - Medium when every statement that lets in an unapproved account requires an external ID.
trusted_accounts with your own.
Find Lambda functions that run with administrator access
Primary asset type:AWS::Lambda::Function
Additional asset types: AWS::IAM::Role
Fails each function whose execution role has the AWS managed AdministratorAccess policy attached. The function only names its role by ARN, so the policy finds the role among the additional assets. It returns the role in relatedAssetIds, so a change to the role updates the finding too.
Manage custom checks outside the app
- Customer API: create, list, change, and delete checks, and preview a check’s findings with a dry run, from your own scripts and pipelines. See the custom checks API reference.
- Terraform: keep checks in code, review policy changes in pull requests, and preview findings during
terraform plan. See Manage with Terraform. - CLI: run one-off tasks from a terminal with the
plerion custom-checkscommands.