Skip to content

Commit 14f82af

Browse files
committed
Gate publication in three levels
First half of Phase 5, and the security-relevant core of it. The security model defines hard block, overridable soft block, and clear; nothing implemented them, so readiness collapsed every concern into one boolean where incomplete evidence and confirmed danger looked identical. PublicationGate evaluates a readiness assessment, findings, host capability, and preview outcome into a content-addressed PublicationDecision. A verified secret or an unacknowledged critical vulnerability is a hard block that accept_override refuses outright. Incomplete scanner coverage, a failed preview, a missing execution plan, or an unverified build is a soft block, clearable by an explicit human decision that records exactly which codes it covers so the pull request can name what was skipped. A host with no container runtime is a soft block rather than a refusal. Refusing there would put deployment out of reach for anyone unable to install a runtime without making any project safer, which is the tradeoff the roadmap's delivery tracks exist to preserve. Reasons sort strongest first, so a reader sees a refusal before the noise, and evaluation is deterministic so a digest can bind the decision.
1 parent 1553010 commit 14f82af

4 files changed

Lines changed: 537 additions & 0 deletions

File tree

crates/launchguard-core/src/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ pub enum LaunchGuardError {
163163
#[error("deployment intent unavailable: {0}")]
164164
DeploymentIntentUnavailable(String),
165165

166+
/// Policy refuses publication and no override applies.
167+
#[error("publication refused: {0}")]
168+
PublicationRefused(String),
169+
166170
/// A generated deployment artifact failed local validation.
167171
#[error("invalid generated artifact {path}: {message}")]
168172
GeneratedArtifact {

crates/launchguard-core/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ mod model;
1313
mod plan;
1414
mod provider;
1515
mod provision;
16+
mod publication;
1617
mod readiness;
1718
mod scanner;
1819

@@ -54,6 +55,10 @@ pub use provision::{
5455
OSV_SCANNER_VERSION, PROVISIONED_TOOL_SCHEMA_JSON, PROVISIONED_TOOL_SCHEMA_VERSION,
5556
ProvisionedTool, Provisioner, TRIVY_VERSION,
5657
};
58+
pub use publication::{
59+
GateLevel, GateReason, PUBLICATION_DECISION_SCHEMA_JSON, PUBLICATION_DECISION_SCHEMA_VERSION,
60+
PreviewOutcome, PublicationDecision, PublicationGate,
61+
};
5762
pub use readiness::{
5863
DimensionScore, READINESS_POLICY_VERSION, READINESS_SCHEMA_JSON, READINESS_SCHEMA_VERSION,
5964
ReadinessAssessment, ReadinessCheck, ReadinessDimension, ReadinessEngine, ReadinessScores,

0 commit comments

Comments
 (0)