policy section of attesta.yaml controls how Attesta responds to different risk levels. It defines the challenge type for each risk tier, minimum review durations, multi-party approval requirements, and what happens when things go wrong.
Default Challenge Mappings
When no policy is configured, Attesta uses these defaults:
These mappings are configured via the
challenge_map field on the Policy dataclass.
Configuration
attesta.yaml
Minimum Review Seconds
Theminimum_review_seconds setting enforces a mandatory waiting period before an operator can approve an action. This is Attesta’s primary defense against rubber-stamping — approving actions without actually reading them.
Programmatic Access
ThePolicy dataclass exposes minimum review times through the min_review_time() method:
Multi-Party Approval
Therequire_multi_party setting specifies how many independent approvers are needed for each risk level. Only risk levels listed in this mapping trigger multi-party review.
Fail Mode
Thefail_mode setting controls what happens when a challenge times out or the system cannot reach a human operator.
- deny (default)
- allow
- escalate
TIMED_OUT. The gate decorator raises AttestaDenied. This is the safest option and the recommended setting for production.Timeout
Thetimeout_seconds setting defines the maximum time (in seconds) to wait for the operator to complete a challenge. After this duration, the fail_mode policy takes effect.
Policy Dataclass
The fullPolicy dataclass provides programmatic access to all policy settings and several convenience methods:
Method Reference
Example: Strict Production Policy
attesta.yaml
- 15-second minimum review for HIGH-risk actions
- 60-second minimum review for CRITICAL actions
- 3 independent approvers for CRITICAL, 2 for HIGH
- 10-minute timeout before actions are denied
- All timeouts result in denial (never auto-allow)
Next Steps
Risk Section
Force risk levels and amplify scores with patterns
Challenges
Learn how each challenge type works