For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customize terminal output

Prisma Cloud lets you create rules that block access to resources or block the deployment of non-compliant containers.

For example, you might create a rule that blocks the deployment of any image that has critical severity vulnerabilities. By default, when you try to run non-compliant image, Prisma Cloud returns a terse response:

# docker -H :9998 --tls run -ti morello/docker-whale
docker: Error response from daemon: [Prisma Cloud] operation blocked by policy: (test-compliance), host has 19 compliance issues.

To help the operator better understand how to handle a blocked action, you can enhance Prisma Cloud’s default response by

  • Appending a custom message to the default message. For example, you could tell operators where to go to open a ticket.

  • Configuring Prisma Cloud to return an itemized list of compliance issues rather than just a summary. This way, the operator does not need to contact the security team to determine which issues are preventing deployment. They are explicitly listed in the response.

Enhanced terminal output is available for rules created under:

  • Defend > Vulnerabilities > Policy

  • Defend > Compliance > Policy

  • Defend > Access (Kubernetes access control rules)

Specify a Custom Message

You can create custom rules to audit your Kubernetes cluster and alert when a rule is violated. Refer to the Kubernetes auditing documentation.

Output itemized list of compliance issues

You can configure vulnerability and compliance rules to return a detailed list of issues when Prisma Cloud blocks a deployment.

In this procedure, you create a vulnerability rule that prevents the deployment of any image that contains any type of vulnerable package.

Although this procedure is specific to vulnerability rules, the process for compliance rules is the same.

  1. Open Console.

  2. Create a new vulnerability rule (Defend > Vulnerabilities > Policy) or compliance rule (Defend > Compliance > Policy).

  3. In the new rule dialog, enter the following information:

    1. Enter a rule name.

    2. Specify conditions that trigger a block action.

      For example, for the Image contains vulnerable OS packages condition in a vulnerability rule, set the Action to Block and set the Severity threshold to Low.

    3. Set Terminal output verbosity for blocked requests to Detailed.

    4. Click Save.

  4. Test your setup by deploying an image with vulnerabilities.

    On a host protected by Prisma Cloud, run an image with vulnerabilities.

Last updated

Was this helpful?