Apache Pulsar multi-tenant backlog quarantine and priority event router
Drain a multi-tenant Pulsar topic and route each batch by tenant priority tier, logging ENTERPRISE traffic and quarantining the rest, with a Slack report per run.
Promote a Kyverno policy from Audit to Deny with workload impact checks, human approval, live admission proof, and guarded rollback.
id: kyverno-audit-to-enforce-admission-proof
namespace: company.platform
description: Approve a namespace-scoped Kyverno rollout and prove live admission
decisions without persisting probe Pods.
labels:
team: platform
use-case: policy-rollout
concurrency:
limit: 1
behavior: QUEUE
inputs:
- id: mode
type: SELECT
values:
- PREVIEW
- ROLLOUT
defaults: PREVIEW
- id: target_namespace
type: STRING
defaults: policy-rollout-demo
- id: policy_name
type: STRING
defaults: require-owner-data
- id: notify_slack
type: BOOL
defaults: false
- id: kestra_url
type: STRING
defaults: http://localhost:8080
- id: report_api
type: SELECT
defaults: wgpolicyk8s.io/v1alpha2
values:
- wgpolicyk8s.io/v1alpha2
- openreports.io/v1alpha1
- id: max_report_age_seconds
type: INT
defaults: 3600
min: 60
max: 86400
- id: allowed_manifest
type: FILE
required: false
description: JSON CREATE manifest expected to be admitted; required for ROLLOUT.
- id: denied_manifest
type: FILE
required: false
description: JSON CREATE manifest expected to be denied by this policy; required
for ROLLOUT.
variables:
client: |-
import base64, copy, hashlib, json, os, re, ssl, time
from datetime import datetime
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
namespace, policy_name = os.environ['NAMESPACE'], os.environ['POLICY_NAME']
assert re.fullmatch(r'[a-z0-9]([-a-z0-9]*[a-z0-9])?', namespace)
assert namespace not in ('default', 'kube-system', 'kube-public', 'kyverno')
assert len(policy_name)<=253 and re.fullmatch(r'[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*',policy_name)
base = f'/apis/policies.kyverno.io/v1/namespaces/{namespace}/namespacedvalidatingpolicies/{policy_name}'
marker = 'blueprints.kestra.io/rollout-id'
context = ssl.create_default_context(cadata=base64.b64decode(os.environ['CA']).decode())
def api(path, method='GET', data=None):
headers = {'Authorization':'Bearer ' + os.environ['TOKEN'], 'Content-Type':'application/json'}
for attempt in range(3):
try:
req = Request(os.environ['SERVER'].rstrip('/') + path, headers=headers,
method=method, data=None if data is None else json.dumps(data).encode())
with urlopen(req, context=context, timeout=20) as response:
return response.status, json.load(response)
except HTTPError as error:
body = json.loads(error.read())
if error.code not in (429, 500, 502, 503, 504) or attempt == 2:
return error.code, body
except (URLError, TimeoutError):
if attempt == 2:
raise
time.sleep(2 ** attempt)
def get(path):
code, body = api(path)
assert code == 200, f'GET {path}: {code}: {body}'
return body
def digest(value):
return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(',', ':')).encode()).hexdigest()
def save(name, value):
with open(name, 'w') as output:
json.dump(value, output, indent=2)
def snapshot():
policy = get(base)
assert policy.get('status', {}).get('conditionStatus', {}).get('ready'), 'Policy is not ready'
actions = policy['spec'].get('validationActions', [])
assert actions and set(actions) <= {'Audit','Warn','Deny'}, 'Unsupported validation actions'
assert ('Audit' in actions or 'Deny' in actions) and not ('Deny' in actions and 'Warn' in actions)
assert policy['spec'].get('evaluation', {}).get('admission', {}).get('enabled', True), 'Admission is disabled'
group = os.environ['REPORT_API']
assert group in ('wgpolicyk8s.io/v1alpha2', 'openreports.io/v1alpha1')
resource = 'policyreports' if group.startswith('wgpolicy') else 'reports'
reports = get(f'/apis/{group}/namespaces/{namespace}/{resource}?limit=501')
assert not reports.get('metadata', {}).get('continue') and len(reports['items']) <= 500, 'Report inventory exceeds 500'
results = []
for report in reports['items']:
for result in report.get('results', []):
if result.get('policy') != namespace + '/' + policy_name or 'kyverno' not in result.get('source','').lower():
continue
results.append({'report':report['metadata']['name'], 'resource':report.get('scope', result.get('resources', [])),
'rule':result.get('rule',result.get('properties',{}).get('cel.validationIndex','')), 'result':result.get('result',''),
'message':result.get('message',''), 'timestamp':result.get('timestamp',{})})
assert len(results) <= 1000, 'More than 1000 policy results; narrow the audit scope'
results.sort(key=digest)
max_age = int(os.environ['MAX_AGE'])
assert 60 <= max_age <= 86400, 'max_report_age_seconds must be 60..86400'
created = datetime.fromisoformat(policy['metadata']['creationTimestamp'].replace('Z','+00:00')).timestamp()
stale = [row for row in results if not created <= float(row['timestamp'].get('seconds',0)) <= time.time()+60
or time.time() - float(row['timestamp'].get('seconds',0)) > max_age]
blockers = [row for row in results if row['result'] not in ('pass','skip')]
eligible = bool(results) and any(row['result']=='pass' for row in results) and not stale and not blockers
plan = {'namespace_uid':get('/api/v1/namespaces/' + namespace)['metadata']['uid'],
'policy_uid':policy['metadata']['uid'], 'spec':policy['spec'],
'owner':policy['metadata'].get('annotations',{}).get(marker), 'results':results}
reviewed = dict(plan)
reviewed['results'] = sorted([{k:v for k,v in row.items() if k!='timestamp'} for row in results],key=digest)
return {'plan':plan, 'sha256':digest(reviewed), 'resource_version':policy['metadata']['resourceVersion'],
'action':'Deny' if 'Deny' in actions else 'Audit', 'eligible':eligible,
'counts':{name:sum(row['result']==name for row in results) for name in ('pass','fail','warn','error','skip')},
'stale_results':len(stale), 'annotations_exist':'annotations' in policy['metadata']}
def probes():
pair = {}
for case in ('allowed','denied'):
raw = open(case + '.json').read(1048577)
assert len(raw.encode()) <= 1048576, 'Probe manifest exceeds 1 MiB'
manifest = json.loads(raw)
version, kind = manifest.get('apiVersion',''), manifest.get('kind','')
assert re.fullmatch(r'(?:[a-z0-9][a-z0-9.-]*/)?v[0-9][a-z0-9]*',version), 'Invalid apiVersion'
prefix = '/apis/' + version if '/' in version else '/api/' + version
resources = get(prefix)['resources']
matches = [v for v in resources if v['kind']==kind and v.get('namespaced') and '/' not in v['name'] and 'create' in v.get('verbs',[])]
assert len(matches)==1, 'Probe must be a discoverable namespaced CREATE resource'
meta = manifest.setdefault('metadata',{})
assert meta.get('namespace',namespace)==namespace, 'Probe namespace differs from target'
meta['namespace'] = namespace
assert meta.get('name') or meta.get('generateName'), 'Probe needs a unique name or generateName'
pair[case] = {'path':prefix + '/namespaces/' + namespace + '/' + matches[0]['name'] + '?dryRun=All', 'manifest':manifest}
assert pair['allowed']['manifest'] != pair['denied']['manifest'], 'Provide distinct positive and negative probes'
return pair
def decisions(pair):
result = {}
for case, probe in pair.items():
code, body = api(probe['path'],'POST',probe['manifest'])
result[case] = {'code':code,'message':body.get('message',''),'dry_run':'All'}
return result
tasks:
- id: assess
type: io.kestra.plugin.scripts.python.Script
description: Read the selected policy unchanged and derive impact from its real
Kyverno Audit reports.
script: |-
from client import *
from kestra import Kestra
report = snapshot()
if '{{ inputs.mode }}' == 'ROLLOUT':
pair = probes()
report['probe_sha256'] = digest(pair)
if report['action']=='Audit':
report['baseline'] = decisions(pair)
save('impact.json',report)
Kestra.outputs({'action':report['action'],'sha256':report['sha256'],'violations':report['counts']['fail']})
print(json.dumps(report,indent=2))
if '{{ inputs.mode }}' == 'ROLLOUT':
assert report['eligible'], 'No fresh clean Audit evidence: inspect counts, stale_results and results'
if report['action']=='Audit':
assert all(v['code']==201 for v in report['baseline'].values()), 'Both probes must be admitted before promotion'
outputFiles:
- impact.json
containerImage: python:3.13-slim
dependencies:
- kestra==1.1.0
env:
SERVER: '{{ secret(''K8S_MASTER_URL'') }}'
TOKEN: '{{ secret(''K8S_TOKEN'') }}'
CA: '{{ secret(''K8S_CA_CERT'') }}'
NAMESPACE: '{{ inputs.target_namespace }}'
POLICY_NAME: '{{ inputs.policy_name }}'
EXECUTION: '{{ execution.id }}'
REPORT_API: '{{ inputs.report_api }}'
MAX_AGE: '{{ inputs.max_report_age_seconds }}'
inputFiles:
client.py: '{{ render(vars.client) }}'
allowed.json: '{{ inputs.allowed_manifest ?? ''{}'' }}'
denied.json: '{{ inputs.denied_manifest ?? ''{}'' }}'
- id: request_rollout
type: io.kestra.plugin.core.flow.If
condition: '{{ inputs.mode == ''ROLLOUT'' and outputs.assess.vars.action ==
''Audit'' }}'
then:
- id: review
type: io.kestra.plugin.core.flow.Pause
description: Review impact.json, policy spec and Audit coverage. Expiry fails
without promotion.
pauseDuration: PT24H
behavior: FAIL
onResume:
- id: approved
type: BOOL
defaults: false
- id: plan_sha256
type: STRING
defaults: ''
description: Copy the SHA-256 from impact.json to bind approval to this plan.
- id: note
type: STRING
defaults: ''
- id: audit_confirmed
type: BOOL
defaults: false
description: Confirm the selected reports cover the reviewed policy revision and
intended workload scope.
- id: approved
type: io.kestra.plugin.core.flow.If
condition: '{{ outputs.review.onResume.approved }}'
then:
- id: recheck
type: io.kestra.plugin.scripts.python.Script
description: Recheck the exact policy/report snapshot and probe files; prepare a
conditional action-only patch.
script: |-
from client import *
from kestra import Kestra
previous = json.load(open('impact.json'))
current = snapshot()
assert open('approval.txt').read()==previous['sha256'], 'Wrong approval fingerprint'
assert open('coverage.txt').read().lower()=='true', 'Audit coverage acknowledgement is required'
assert current['sha256']==previous['sha256'] and current['eligible'], 'Policy or Audit evidence changed; review again'
assert digest(probes())==previous['probe_sha256'], 'Probe files changed after assessment'
annotation = '/metadata/annotations/blueprints.kestra.io~1rollout-id'
ownership = {'op':'add','path':annotation,'value':os.environ['EXECUTION']}
if not current['annotations_exist']:
ownership = {'op':'add','path':'/metadata/annotations','value':{marker:os.environ['EXECUTION']}}
patch = [{'op':'test','path':'/metadata/uid','value':current['plan']['policy_uid']},
{'op':'test','path':'/metadata/resourceVersion','value':current['resource_version']},
{'op':'replace','path':'/spec/validationActions','value':['Deny']},ownership]
Kestra.outputs({'patch':json.dumps(patch)})
containerImage: python:3.13-slim
dependencies:
- kestra==1.1.0
env:
SERVER: '{{ secret(''K8S_MASTER_URL'') }}'
TOKEN: '{{ secret(''K8S_TOKEN'') }}'
CA: '{{ secret(''K8S_CA_CERT'') }}'
NAMESPACE: '{{ inputs.target_namespace }}'
POLICY_NAME: '{{ inputs.policy_name }}'
EXECUTION: '{{ execution.id }}'
REPORT_API: '{{ inputs.report_api }}'
MAX_AGE: '{{ inputs.max_report_age_seconds }}'
inputFiles:
client.py: '{{ render(vars.client) }}'
impact.json: '{{ outputs.assess.outputFiles[''impact.json''] }}'
approval.txt: '{{ outputs.review.onResume.plan_sha256 }}'
allowed.json: '{{ inputs.allowed_manifest ?? ''{}'' }}'
denied.json: '{{ inputs.denied_manifest ?? ''{}'' }}'
coverage.txt: '{{ outputs.review.onResume.audit_confirmed }}'
- id: promote
type: io.kestra.plugin.kubernetes.kubectl.Patch
description: Atomically change Audit to Deny, only if the reviewed policy
revision still matches.
patch: '{{ outputs.recheck.vars.patch }}'
connection:
masterUrl: '{{ secret(''K8S_MASTER_URL'') }}'
oauthToken: '{{ secret(''K8S_TOKEN'') }}'
caCertData: '{{ secret(''K8S_CA_CERT'') }}'
namespace: '{{ inputs.target_namespace }}'
resourceType: namespacedvalidatingpolicies
resourceName: '{{ inputs.policy_name }}'
apiGroup: policies.kyverno.io
apiVersion: v1
patchStrategy: JSON_PATCH
retry:
type: constant
interval: PT2S
maxAttempts: 2
- id: verify_rollout
type: io.kestra.plugin.core.flow.If
condition: '{{ inputs.mode == ''ROLLOUT'' and (outputs.assess.vars.action ==
''Deny'' or (outputs.review.onResume.approved ?? false)) }}'
then:
- id: prove_admission
type: io.kestra.plugin.scripts.python.Script
description: Test user-supplied positive/negative CREATE manifests against live
admission with dryRun=All.
script: |-
from client import *
from kestra import Kestra
initial = json.load(open('impact.json'))
expected = copy.deepcopy(initial['plan']['spec'])
expected['validationActions'] = ['Deny'] if initial['action']=='Audit' else expected['validationActions']
pair = probes()
assert digest(pair)==initial['probe_sha256'], 'Probe files changed'
proof = {'outcome':'FAILED','execution':os.environ['EXECUTION'],'policy':namespace+'/'+policy_name,'attempts':[]}
try:
for attempt in range(12):
policy = get(base)
assert policy['metadata']['uid']==initial['plan']['policy_uid'] and policy['spec']==expected, 'Policy changed'
observed = decisions(pair)
proof['attempts'].append(observed)
denial = observed['denied']
identified = 'nvpol.validate.kyverno.' in denial['message'].lower() and ('Policy '+policy_name+' failed:') in denial['message']
if observed['allowed']['code']==201 and denial['code'] in (400,403) and identified:
break
assert observed['allowed']['code']==201 and denial['code']==201, 'API/RBAC or unrelated denial is not enforcement proof'
time.sleep(2)
else:
raise AssertionError('Policy did not enforce the expected negative probe')
final = get(base)
assert final['metadata']['uid']==policy['metadata']['uid'] and final['spec']==expected, 'Policy changed during verification'
proof.update(outcome='ENFORCED',policy_uid=policy['metadata']['uid'],spec_sha256=digest(expected))
Kestra.outputs({'outcome':'ENFORCED'})
finally:
save('admission-proof.json',proof)
print(json.dumps(proof,indent=2))
outputFiles:
- admission-proof.json
containerImage: python:3.13-slim
dependencies:
- kestra==1.1.0
env:
SERVER: '{{ secret(''K8S_MASTER_URL'') }}'
TOKEN: '{{ secret(''K8S_TOKEN'') }}'
CA: '{{ secret(''K8S_CA_CERT'') }}'
NAMESPACE: '{{ inputs.target_namespace }}'
POLICY_NAME: '{{ inputs.policy_name }}'
EXECUTION: '{{ execution.id }}'
REPORT_API: '{{ inputs.report_api }}'
MAX_AGE: '{{ inputs.max_report_age_seconds }}'
inputFiles:
client.py: '{{ render(vars.client) }}'
impact.json: '{{ outputs.assess.outputFiles[''impact.json''] }}'
allowed.json: '{{ inputs.allowed_manifest ?? ''{}'' }}'
denied.json: '{{ inputs.denied_manifest ?? ''{}'' }}'
- id: summary
type: io.kestra.plugin.scripts.python.Script
description: Publish whether this run previewed, rejected, or verified enforcement.
script: |-
import json
from kestra import Kestra
mode = '{{ inputs.mode }}'
verified = '{{ outputs.prove_admission.vars.outcome ?? "" }}'
outcome = verified or ('PREVIEWED' if mode == 'PREVIEW' else 'REJECTED')
report = {'outcome':outcome, 'plan_sha256':'{{ outputs.assess.vars.sha256 }}',
'violations':{{ outputs.assess.vars.violations }}, 'execution':'{{ execution.id }}'}
open('outcome.json','w').write(json.dumps(report,indent=2))
Kestra.outputs({'outcome':outcome})
print(json.dumps(report,indent=2))
outputFiles:
- outcome.json
containerImage: python:3.13-slim
dependencies:
- kestra==1.1.0
env:
SERVER: '{{ secret(''K8S_MASTER_URL'') }}'
TOKEN: '{{ secret(''K8S_TOKEN'') }}'
CA: '{{ secret(''K8S_CA_CERT'') }}'
NAMESPACE: '{{ inputs.target_namespace }}'
POLICY_NAME: '{{ inputs.policy_name }}'
EXECUTION: '{{ execution.id }}'
REPORT_API: '{{ inputs.report_api }}'
MAX_AGE: '{{ inputs.max_report_age_seconds }}'
inputFiles:
client.py: '{{ render(vars.client) }}'
errors:
- id: alert_if_enabled
type: io.kestra.plugin.core.flow.If
condition: '{{ inputs.notify_slack }}'
then:
- id: alert
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
allowFailure: true
description: An unavailable alert destination must not prevent policy recovery.
url: '{{ secret(''SLACK_WEBHOOK'') }}'
retry:
type: constant
interval: PT2S
maxAttempts: 3
messageText: 'Kyverno rollout failed: {{ flow.namespace }}.{{ flow.id }},
execution {{ execution.id }}, task {{ (errorLogs() | length) > 0 ?
errorLogs()[0].taskId : ''approval/flow'' }}. Inspect recovery: {{
inputs.kestra_url }}/ui/main/executions/{{ flow.namespace }}/{{
flow.id }}/{{ execution.id }}'
- id: recover_if_owned
type: io.kestra.plugin.core.flow.If
condition: '{{ outputs.assess.outputFiles[''impact.json''] is defined and
outputs.assess.vars.action == ''Audit'' }}'
then:
- id: recovery_plan
type: io.kestra.plugin.scripts.python.Script
description: Only roll back a policy still owned by this execution and matching
its expected enforced spec.
script: |-
from client import *
from kestra import Kestra
before = json.load(open('impact.json'))['plan']
current = get(base)
metadata = current['metadata']
expected = copy.deepcopy(before['spec'])
expected['validationActions'] = ['Deny']
owned = metadata['uid']==before['policy_uid'] and metadata.get('annotations',{}).get(marker)==os.environ['EXECUTION']
safe = owned and current['spec']==expected
annotation = '/metadata/annotations/blueprints.kestra.io~1rollout-id'
restore_owner = {'op':'remove','path':annotation} if before['owner'] is None else {'op':'replace','path':annotation,'value':before['owner']}
patch = [{'op':'test','path':'/metadata/uid','value':metadata['uid']},
{'op':'test','path':'/metadata/resourceVersion','value':metadata['resourceVersion']},
{'op':'test','path':annotation,'value':os.environ['EXECUTION']},
{'op':'replace','path':'/spec/validationActions','value':before['spec']['validationActions']},restore_owner]
outcome = 'ROLLBACK_PLANNED' if safe else ('CONFLICT_REQUIRES_REVIEW' if owned else 'NO_OWNED_CHANGE')
save('recovery.json',{'outcome':outcome,'policy_uid':metadata['uid']})
Kestra.outputs({'safe':safe,'patch':json.dumps(patch)})
print(outcome)
outputFiles:
- recovery.json
containerImage: python:3.13-slim
dependencies:
- kestra==1.1.0
env:
SERVER: '{{ secret(''K8S_MASTER_URL'') }}'
TOKEN: '{{ secret(''K8S_TOKEN'') }}'
CA: '{{ secret(''K8S_CA_CERT'') }}'
NAMESPACE: '{{ inputs.target_namespace }}'
POLICY_NAME: '{{ inputs.policy_name }}'
EXECUTION: '{{ execution.id }}'
REPORT_API: '{{ inputs.report_api }}'
MAX_AGE: '{{ inputs.max_report_age_seconds }}'
inputFiles:
client.py: '{{ render(vars.client) }}'
impact.json: '{{ outputs.assess.outputFiles[''impact.json''] }}'
- id: rollback_if_safe
type: io.kestra.plugin.core.flow.If
condition: '{{ outputs.recovery_plan.vars.safe }}'
then:
- id: rollback
type: io.kestra.plugin.kubernetes.kubectl.Patch
description: Return only this execution’s unchanged policy to Audit; conflicts
remain failures.
patch: '{{ outputs.recovery_plan.vars.patch }}'
connection:
masterUrl: '{{ secret(''K8S_MASTER_URL'') }}'
oauthToken: '{{ secret(''K8S_TOKEN'') }}'
caCertData: '{{ secret(''K8S_CA_CERT'') }}'
namespace: '{{ inputs.target_namespace }}'
resourceType: namespacedvalidatingpolicies
resourceName: '{{ inputs.policy_name }}'
apiGroup: policies.kyverno.io
apiVersion: v1
patchStrategy: JSON_PATCH
retry:
type: constant
interval: PT2S
maxAttempts: 2
- id: confirm_rollback
type: io.kestra.plugin.scripts.python.Script
description: Read back Audit mode; never report rollback from an attempted write
alone.
script: |-
from client import *
before = json.load(open('impact.json'))['plan']
current = get(base)
assert current['metadata']['uid']==before['policy_uid'] and current['spec']==before['spec'], 'Original policy was not restored'
assert current['metadata'].get('annotations',{}).get(marker)==before['owner'], 'Policy ownership changed during rollback'
save('rollback.json',{'outcome':'ROLLED_BACK','policy_uid':current['metadata']['uid']})
print('ROLLED_BACK: original policy actions restored; execution remains failed')
outputFiles:
- rollback.json
containerImage: python:3.13-slim
dependencies:
- kestra==1.1.0
env:
SERVER: '{{ secret(''K8S_MASTER_URL'') }}'
TOKEN: '{{ secret(''K8S_TOKEN'') }}'
CA: '{{ secret(''K8S_CA_CERT'') }}'
NAMESPACE: '{{ inputs.target_namespace }}'
POLICY_NAME: '{{ inputs.policy_name }}'
EXECUTION: '{{ execution.id }}'
REPORT_API: '{{ inputs.report_api }}'
MAX_AGE: '{{ inputs.max_report_age_seconds }}'
inputFiles:
client.py: '{{ render(vars.client) }}'
impact.json: '{{ outputs.assess.outputFiles[''impact.json''] }}'
triggers:
- id: preview_webhook
type: io.kestra.plugin.core.trigger.Webhook
key: '{{ secret(''KYVERNO_PREVIEW_WEBHOOK_KEY'') }}'
outputs:
- id: impact
type: STRING
value: '{{ outputs.assess.outputFiles[''impact.json''] ?? '''' }}'
- id: admission_proof
type: STRING
value: '{{ outputs.prove_admission.outputFiles[''admission-proof.json''] ?? ''''
}}'
- id: outcome
type: STRING
value: '{{ outputs.summary.vars.outcome ?? ''FAILED'' }}'
Promote an existing namespace-scoped Kyverno validation policy using its Audit evidence and your own admission probes.
{{ outputs.assess.outputFiles['impact.json'] }}.{{ outputs.prove_admission.outputFiles['admission-proof.json'] }}.{{ outputs.summary.outputFiles['outcome.json'] }}; failures retain recovery artifacts.Platform engineers promoting their own validation rules.
Separate evidence, human review, conditional promotion, live verification and recovery.
Kyverno 1.19.2 (tested), NamespacedValidatingPolicy with webhook admission, Audit reporting, Kubernetes and Docker. Grant namespace get, policy get/patch, report list and probe-kind discovery/create. Reports must identify namespace/name. CREATE permissions allow real creates; this flow always uses dryRun=All.
K8S_MASTER_URL: HTTPS API URL.K8S_TOKEN: service-account token.K8S_CA_CERT: base64 PEM CA.KYVERNO_PREVIEW_WEBHOOK_KEY: preview key.SLACK_WEBHOOK: optional failure alert.Reports are asynchronous snapshots; missing evidence never means compliant. Review coverage explicitly. Limits: 500 reports, 1000 results, 1 MiB/probe. Hard termination/API outage may leave Deny active. Legacy or cluster-scoped policies need a separate scope/report design.
Drain a multi-tenant Pulsar topic and route each batch by tenant priority tier, logging ENTERPRISE traffic and quarantining the rest, with a Slack report per run.
Policy ratchet around pulumi preview that issues, alerts, and holds for approval before applying violating plans.
Continuously push your Kestra flows and namespace files to a Git repository on a schedule for GitOps version control.
Detect Apache Pulsar subscriptions with no consumers that still pin a large backlog, then clear or remove them behind a dry run, an approval pause and a live re-read that fails the run.
Detect pending operations and a held lock on a Pulumi stack after an interrupted update, then clear them with pulumi cancel and pulumi refresh behind an approval, then verify the stack is clean.
Read the public PyPI project API when a GitHub release is published and block the run with a GitHub issue, a Slack alert, and a failed execution when the tag, the files, or the provenance metadata do not line up.