Require a PCI sign-off for applications in production
π― Goal: record which applications are in PCI scope as part of your catalog, and let that one fact decide the friction. Production deploys of PCI applications wait for a security reviewer who isn't the requester, with the change ticket on record. Everything else ships to production on its own.
Introductionβ
Most organizations have a short list of applications that handle cardholder data, and a much longer list that doesn't. A blanket "every production deploy needs approval" rule treats both the same: reviewers rubber-stamp the low-risk ones, and the reviews that matter get the same thirty seconds of attention.
Nullplatform lets you describe what an application is once, in its catalog, and have your guardrails read it. In this tutorial that fact is PCI scope:
- The catalog records whether each application is in PCI scope, its owner, and its SLO, validated against a schema so nobody types "yes" in one app and "Y" in another
- A checklist on production deploys holds one sign-off that only applies to PCI applications. For the rest of your portfolio, it never shows up
- The sign-off itself enforces who can give it: someone with the security role, never the person who requested the deploy, and with a change ticket attached
The result is an audit trail auditors can read: every PCI production deploy names its reviewer, their comment, and the ticket that covered it.
What you'll set upβ
- A catalog specification on the
applicationentity withowner,pci_scope, andslo - A checklist on
deployment:createin production with one manual item, scoped withapplies_whento PCI applications and guarded by two validations: four-eyes and role - Automatic execution: approved deploys start on their own, whether nobody had to sign or the reviewer just did
Prerequisitesβ
- Checklists enabled in your organization (early release)
- An
environmentdimension with aproductionvalue - One of these, depending on how you want to work:
- Coding assistant: the np-api and np-checklist skills, part of the nullplatform AI plugins. See Set up the AI plugins
- Infrastructure as code: Terraform or OpenTofu with the nullplatform provider v0.0.106 or later, and an API key with the
adminrole at organization level
Creating catalog specifications and checklist specs takes the secops, ops, or admin role.
Step 1: Describe your applications in the catalogβ
Guardrails can only read what your catalog records. Declare the fields once, and every application gets a validated place to hold them.
- Coding assistant
- Terraform
- API
/np-api create a "compliance" metadata specification for applications in
my account with three fields: owner (string, required), pci_scope (boolean,
required), and slo (critical, high, medium, low). Then set pci_scope to true
on payments-api and false on the rest of my applications.
resource "nullplatform_metadata_specification" "compliance" {
name = "Compliance"
description = "Owner, PCI scope, and SLO for applications"
nrn = "organization=1:account=2"
entity = "application"
metadata = "compliance"
schema = jsonencode({
type = "object"
properties = {
owner = { type = "string", description = "Team or person accountable for the application" }
pci_scope = { type = "boolean", description = "Does the application handle cardholder data?" }
slo = { type = "string", enum = ["critical", "high", "medium", "low"] }
}
required = ["owner", "pci_scope"]
additionalProperties = false
})
}
Send a POST request to create the specification:
curl -L 'https://api.nullplatform.com/metadata/metadata_specification' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"name": "Compliance",
"description": "Owner, PCI scope, and SLO for applications",
"nrn": "organization=1:account=2",
"entity": "application",
"metadata": "compliance",
"schema": {
"type": "object",
"properties": {
"owner": { "type": "string" },
"pci_scope": { "type": "boolean" },
"slo": { "type": "string", "enum": ["critical", "high", "medium", "low"] }
},
"required": ["owner", "pci_scope"],
"additionalProperties": false
}
}'
Then set the values on each existing application with a POST request:
curl -L 'https://api.nullplatform.com/metadata/application/4/compliance' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{ "owner": "payments-team", "pci_scope": true, "slo": "critical" }'
Catalog specifications aren't applied retroactively. New applications ask for the fields when they're created, but existing ones need their values set once, as the prompt and the API tab do.
β Checkpointβ
Open any application in the nullplatform UI: its catalog shows owner, pci_scope, and slo, and payments-api reads pci_scope: true.
Step 2: Create the checklist that reads itβ
Now the guardrail. Describe it to the skill, or declare it in Terraform:
- Coding assistant
- Terraform
/np-checklist create a checklist named pci-production-review with one
manual item, "PCI reviewer sign-off":
- It applies only when the application's compliance.pci_scope is true.
- It requires a comment and a change ticket matching CHG-<digits>.
- Validations: someone other than the requester must sign, and only
people with the secops or admin role can sign.
Set execution_trigger: any_approval, so approved deploys start on their
own. Connect it to deployment:create in production across my account,
and deny the deploy if the reviewer rejects it.
resource "nullplatform_checklist_specification" "pci_production_review" {
nrn = "organization=1:account=2"
name = "pci-production-review"
definition = jsonencode({
execution_trigger = "any_approval"
items = [
{
id = "pci_review"
type = "manual"
behavior = "gate"
severity = "critical"
title = "PCI reviewer sign-off"
description = "This application handles cardholder data. Confirm the change is covered by an approved change ticket."
require_comment = true
applies_when = { "application.metadata.compliance.pci_scope" = true }
inputs = {
schema = {
type = "object"
required = ["change_ticket"]
properties = {
change_ticket = { type = "string", title = "Change ticket", pattern = "^CHG-\\d+$" }
}
}
}
validations = [
{
id = "four_eyes"
message = "Someone other than the requester must sign off."
rule = { "actor.user_id" = { "$ne" = "$approval.requested_by" } }
},
{
id = "security_role"
message = "Requires the secops or admin role."
rule = { "actor.effective_roles" = { "$in" = ["secops", "admin"] } }
}
]
}
]
})
}
resource "nullplatform_approval_action" "production_deploys" {
nrn = "organization=1:account=2"
entity = "deployment"
action = "deployment:create"
dimensions = {
environment = "production"
}
on_checklist_fail = "deny"
}
resource "nullplatform_approval_action_checklist_specification_association" "production_deploys" {
approval_action_id = nullplatform_approval_action.production_deploys.id
checklist_specification_id = nullplatform_checklist_specification.pci_production_review.current_version_id
}
The association follows current_version_id, so changing the definition publishes a new version and relinks the action in the same apply.
Three parts of that spec carry the design:
applies_whenkeeps the list honest. For an application outside PCI scope, the item is marked not applicable and never blocks. Developers on those teams don't see a gate that doesn't concern them.- Validations decide whose signature counts. The four-eyes rule stops the requester from approving or rejecting their own deploy, and the role rule keeps the sign-off with people who actually hold the security role. Anyone else gets the rule's message instead of a generic error.
- The change ticket becomes part of the record. It's validated against the pattern when the reviewer submits, and stored on the item, so "which ticket covered this deploy?" has an answer months later.
on_checklist_fail: deny closes the loop: a rejected sign-off denies the deploy outright instead of leaving it open for a second opinion.
An approval action runs on a checklist or on policies, never both. If your production deployment:create action already has policies attached, the connection fails with a 409. Reach out to the nullplatform team to move it onto a checklist.
β Checkpointβ
Dry-run the spec from both sides before a real deploy faces it:
dry-run pci-production-review for a production deploy of payments-api,
then for a production deploy of an application outside PCI scope
payments-api comes back with the sign-off pending for a user. The other application comes back with the item not applicable and the run already approved.
Step 3: See it on a real deployβ
Deploy any application to production. What happens next depends only on its catalog:
Try it with the requester's own account first: the sign-off refuses them with the four-eyes message. Then sign in as a reviewer with the secops role, open the deploy, and approve with a comment and a ticket like CHG-4821.
β Checkpointβ
The PCI deploy went out right after the sign-off, and its run shows approve with the reviewer's name, comment, and ticket. A deploy of a non-PCI application went out with no one involved.
Make it yoursβ
- Add the evidence your auditors ask for. The
inputsschema takes any field: a risk level, a link to the security review, a rollback plan. The form is rendered from the schema and validated on submit. - Let the catalog drive more than PCI. The same
applies_whenpattern readsslo: require an on-call acknowledgment only forcriticalapplications, in the same checklist. - Combine it with automated gates. Add the coverage and vulnerability conditions from Enforce build quality gates to this same spec, so one production checklist holds both the automated checks and the human ones.
What you just builtβ
The complete checklist spec
{
"name": "pci-production-review",
"definition": {
"execution_trigger": "any_approval",
"items": [
{
"id": "pci_review",
"type": "manual",
"behavior": "gate",
"severity": "critical",
"title": "PCI reviewer sign-off",
"description": "This application handles cardholder data. Confirm the change is covered by an approved change ticket.",
"require_comment": true,
"applies_when": { "application.metadata.compliance.pci_scope": true },
"inputs": {
"schema": {
"type": "object",
"required": ["change_ticket"],
"properties": {
"change_ticket": { "type": "string", "title": "Change ticket", "pattern": "^CHG-\\d+$" }
}
}
},
"validations": [
{
"id": "four_eyes",
"message": "Someone other than the requester must sign off.",
"rule": { "actor.user_id": { "$ne": "$approval.requested_by" } }
},
{
"id": "security_role",
"message": "Requires the secops or admin role.",
"rule": { "actor.effective_roles": { "$in": ["secops", "admin"] } }
}
]
}
]
}
}
The condition language is the one policies use, with the same field paths. What a checklist adds is everything around the verdict: whose signature counts, what they must attach, and a run that records it item by item.
What's nextβ
- Enforce build quality gates for prod deployments: gate production on coverage and vulnerabilities, with an attributable override
- Require stage deployment before production: make every build prove itself in stage first