Policies¶
trustcheck separates evidence collection from policy enforcement.
That means a report can collect package evidence first, then apply either a built-in or custom policy to decide whether the result should block automation.
Built-in policies¶
default¶
The default profile is advisory. It does not enforce verification or vulnerability blocking by itself.
strict¶
The strict profile is conservative and is what --strict enables.
It sets:
require_verified_provenance = "all"allow_metadata_only = falsevulnerability_mode = "any"fail_on_severity = "high"
internal-metadata¶
This profile is suitable when you intentionally accept metadata-only outcomes and want an informational posture.
Policy file format¶
A policy file is a top-level JSON object.
Example:
{
"profile": "release-gate",
"require_verified_provenance": "all",
"allow_metadata_only": false,
"require_expected_repository_match": true,
"vulnerability_mode": "any",
"fail_on_severity": "medium"
}
Supported policy settings¶
profile: free-form name for reportingrequire_verified_provenance:noneorallallow_metadata_only:trueorfalserequire_expected_repository_match:trueorfalsevulnerability_mode:ignoreoranyfail_on_severity:none,medium, orhigh
CLI overrides¶
CLI flags can override both built-in policy profiles and policy-file settings.
Example:
trustcheck inspect sampleproject \
--version 4.0.0 \
--policy-file ./policy.json \
--fail-on-risk-severity high