Policy tests and exceptions
Test the policy before use
For each requirement, test valid inputs, known violations, absent or malformed fields and boundaries. A rule that always denies can look secure but blocks legitimate work; a rule that always permits is unsafe. Test both. Record policy version and input schema so decisions can be reproduced. Test the integration as well: a correct rule is ineffective if a pipeline ignores its result.
Define bounded exceptions
An exception is an explicit temporary acceptance of a specific risk, not a global bypass. Record the exact resource and rule, owner, independent approval, rationale, compensating controls and expiry. At the expiry instant the exception is no longer valid. Reassess rather than silently renew. Some rules, such as verified artifact identity in this classroom, are non-exemptible.
Approval binds a change
A release approval identifies the exact artifact digest, environment, reviewer, expiry and change ticket. If the artifact or target changes, obtain a new review. Separate proposer and approver where feasible; emergency procedures still need accountable authorization and follow-up. Store minimal audit records without credentials.
Plan safe rollback
Rollback is a controlled change to a previously approved and currently acceptable state. Check compatibility with database changes, current vulnerabilities and secrets; test recovery and monitoring before sign-off. If a rollback cannot safely restore data or authorization, pause and use the approved recovery plan instead. Observe runtime controls after deployment and compare with the baseline.
Practice an expiry boundary
A mock exception for resource R1 and rule LOG expires at minute 60. At minute 59 it may be valid with approval and compensating control; at 60 it is expired; it never covers R2 or the artifact-identity rule. Explain how the release gate should behave when exception evidence is missing. In the lab, compare fixed fictional cases, not real CI jobs.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Policy tests and exceptions — knowledge check
Review CI trust, configuration policy, evidence and approvals.
When is an exception expiring at minute 60 invalid?
What should an approval identify?
Which test reveals an always-deny rule?
Can an exception for R1 and LOG cover R2?
What is needed before rollback?