story 2-14-openapi-support-matrix-regression-corpus: implemented and reviewed via bmad-loop

This commit is contained in:
bsodfather committed 2026-09-29 20:48:40 +03:00
1 parent 16dc777911
commit 194cac169f
84 files changed
+23255 -1

No files matched your search

+1
View File
@@ -13,5 +13,6 @@ crank-schema = { path = "../crank-schema" }
serde.workspace = true
serde_json.workspace = true
serde_yaml.workspace = true
sha2.workspace = true
thiserror.workspace = true
url.workspace = true
+1
View File
@@ -12,6 +12,7 @@ mod normalize_finding_validation;
mod normalize_limits;
mod normalize_projection;
mod normalize_schema;
mod normalize_security;
mod openapi3;
mod openapi3_findings;
mod payload;
@@ -146,6 +146,7 @@ pub fn normalize_verified_bundle(
}
None => return Err(ImportParseError::UnsupportedDocument),
};
super::normalize_security::append_security_requirement_findings(&mut parsed, &root);
super::metadata_findings::collect_secret_like_examples(
&root,
"",
@@ -238,6 +239,8 @@ fn preview_from_operations<'a>(
.push(candidate);
}
super::normalize_security::attach_operation_findings(&mut groups, &findings);
sort_findings(&mut findings);
ImportPreview {
source: source.clone(),
@@ -57,6 +57,10 @@ pub(super) fn matches_source(
pointer.contains("/example") && matches!(&node.value, CanonicalSourceValue::String(value) if secret_like(pointer, value))
}
"invalid_server" if is_error => invalid_server(pointer, node),
"unsupported_security_requirement" if is_error => {
matches!(&node.value, CanonicalSourceValue::Object(fields) if !fields.is_empty())
|| invalid_security_requirement(pointer, node)
}
_ => false,
}
}
@@ -201,6 +205,31 @@ fn secret_like(pointer: &str, value: &str) -> bool {
|| value.starts_with("sk-")
}
/// Accepts malformed `security` shapes at their scoped source location only:
/// the document `security` member, an operation `security` member, or a
/// non-object item of the corresponding security array. An object is valid
/// only as an array item, including the empty `{}` public alternative.
fn invalid_security_requirement(pointer: &str, node: &CanonicalSourceNode) -> bool {
const METHODS: &[&str] = &[
"get", "post", "put", "patch", "delete", "head", "options", "trace", "connect",
];
let is_index = |part: &str| !part.is_empty() && part.bytes().all(|b| b.is_ascii_digit());
let segments: Vec<&str> = pointer.split('/').collect();
match segments.as_slice() {
["", "security"] => true,
["", "security", index] => {
is_index(index) && !matches!(&node.value, CanonicalSourceValue::Object(_))
}
["", "paths", _, method, "security"] => METHODS.contains(method),
["", "paths", _, method, "security", index] => {
METHODS.contains(method)
&& is_index(index)
&& !matches!(&node.value, CanonicalSourceValue::Object(_))
}
_ => false,
}
}
fn invalid_server(pointer: &str, node: &CanonicalSourceNode) -> bool {
if pointer == "/host" {
return !matches!(&node.value, CanonicalSourceValue::String(host) if !host.is_empty() && !host.contains('@') && !host.chars().any(char::is_whitespace));
@@ -0,0 +1,166 @@
//! Effective per-operation security scopes for the OpenAPI importer.
use serde_json::Value;
use super::{
model::{
ImportFinding, ImportFindingSeverity, ImportGroupPreview, RestImportDocument,
RestImportOperation, SourceLocation,
},
normalize_coverage,
};
pub(super) fn attach_operation_findings(
groups: &mut std::collections::BTreeMap<String, ImportGroupPreview>,
findings: &[ImportFinding],
) {
for group in groups.values_mut() {
for candidate in &mut group.operations {
let additions = findings
.iter()
.filter(|finding| {
finding.severity == ImportFindingSeverity::Error
&& finding.operation_key.as_deref() == Some(candidate.key.as_str())
&& !candidate.findings.iter().any(|existing| {
existing.code == finding.code
&& existing.severity == finding.severity
&& existing.message == finding.message
})
})
.cloned()
.collect::<Vec<_>>();
candidate.findings.extend(additions);
}
}
}
/// Computes the effective security requirements for every candidate operation
/// and attaches source-located blockers to precisely the affected candidates.
///
/// Effective requirements follow the OpenAPI semantics: an operation that
/// declares its own `security` member wins over the document root; an empty
/// array (`security: []`) explicitly disables inheritance. Within a
/// requirement array the items are alternatives (OR): an empty requirement
/// object `{}` is the public alternative and makes the whole operation
/// public, so no blocker is produced for that operation.
///
/// A malformed security shape — a non-array `security` value or a non-object
/// array item — must never be discarded silently: the affected operation
/// receives one blocker with the exact source location. A supported non-empty
/// requirement remains a blocker until an administrator binds a compatible
/// Auth Profile.
pub(super) fn append_security_requirement_findings(parsed: &mut RestImportDocument, root: &Value) {
let operations = &parsed.operations;
let findings = &mut parsed.findings;
let locations = &mut parsed.internal_finding_locations;
let root_security = root.get("security");
for operation in operations {
let Some(path_item) = root
.pointer(&format!(
"/paths/{}",
normalize_coverage::escape_pointer(&operation.path)
))
.and_then(|item| item.get(method_as_lower(operation)))
else {
continue;
};
let Some(security) = path_item
.get("security")
.or_else(|| root_security.filter(|_| path_item.get("security").is_none()))
else {
continue;
};
let base_pointer = if path_item.get("security").is_some() {
format!(
"/paths/{}/{}/security",
normalize_coverage::escape_pointer(&operation.path),
method_as_lower(operation)
)
} else {
"/security".to_owned()
};
let alternatives = match security.as_array() {
Some(alternatives) => alternatives,
None => {
push_security_blocker(
findings,
locations,
operation,
&base_pointer,
"security имеет некорректный формат: ожидается массив требований; операции с незапакованным блоком безопасности не публикуются.",
);
continue;
}
};
// Validate the item shapes first: only a fully well-formed array may
// use the empty requirement object `{}` as its public OR alternative.
if !alternatives
.iter()
.all(|requirement| requirement.as_object().is_some())
{
for (index, requirement) in alternatives.iter().enumerate() {
let pointer = format!("{base_pointer}/{index}");
match requirement.as_object() {
Some(schemes) if schemes.is_empty() => {
// In a malformed array the empty alternative does
// not make the operation public, but it also cannot
// block on its own.
continue;
}
Some(_) => push_security_blocker(
findings,
locations,
operation,
&pointer,
"Требование безопасности должно быть привязано к настроенному Auth Profile перед публикацией этой операции; остальные операции не блокируются.",
),
None => push_security_blocker(
findings,
locations,
operation,
&pointer,
"security содержит альтернативу без объекта требований: формат не поддерживается, операция не публикуется.",
),
}
}
continue;
}
if alternatives.iter().any(|requirement| {
requirement
.as_object()
.is_some_and(serde_json::Map::is_empty)
}) {
continue;
}
for (index, _) in alternatives.iter().enumerate() {
push_security_blocker(
findings,
locations,
operation,
&format!("{base_pointer}/{index}"),
"Требование безопасности должно быть привязано к настроенному Auth Profile перед публикацией этой операции; остальные операции не блокируются.",
);
}
}
}
fn push_security_blocker(
findings: &mut Vec<ImportFinding>,
locations: &mut Vec<Option<SourceLocation>>,
operation: &RestImportOperation,
pointer: &str,
message: &str,
) {
findings.push(ImportFinding {
code: "unsupported_security_requirement".to_owned(),
severity: ImportFindingSeverity::Error,
message: message.to_owned(),
operation_key: Some(operation.key.clone()),
});
locations.push(Some(SourceLocation {
pointer: pointer.to_owned(),
}));
}
fn method_as_lower(operation: &RestImportOperation) -> String {
format!("{:?}", operation.method).to_ascii_lowercase()
}
@@ -0,0 +1,29 @@
{
"actionable_count": 50,
"content_digest": "296bb06a311615952c4688089515f514d417bf75b05645fb82ffaa41b92c73ad",
"content_digest_algorithm": "sha256",
"content_digest_definition": "SHA-256 of compact key-sorted JSON before the content_digest field is added.",
"corpus_version": "1.0.3",
"denominator": 50,
"evidence_identity": "be17fbf86429a8953acba4f3e8114d47c088305c0b1720678c4ffea8476f4f24",
"evidence_version": "1.0.0",
"exclusions": [],
"manifest_digest": "2abf220447fc73547583eab65370b84d1f3353a203909e16216d48b055919b47",
"matrix_contract": {
"construct_rows": 384,
"semantic_probes": "AC-1 runs a generated normalizer probe for every matrix row, including every 2xx status in all three formats."
},
"matrix_digest": "29f1e93850b057bb374895d60a8b2dacc8d01371b53d579f558c9dd2b85aa209",
"matrix_version": "1.0.2",
"method": "real normalize_verified_document + preview_from_ir; every NormalizedIr passed validate_normalized_ir",
"raw_counts": {
"covered_source_constructs": 1837,
"documents": 63,
"findings": 0,
"representative_operations": 50,
"semantic_coverage_entries": 514,
"source_constructs": 1837
},
"silent_loss_count": 0,
"uncovered_source_constructs": []
}
+973
View File
@@ -0,0 +1,973 @@
//! Offline regression gates for the versioned OpenAPI support matrix and corpus.
use crank_import::rest::model::CoverageDisposition;
use crank_import::rest::model::{CanonicalSourceNode, CanonicalSourceValue};
use crank_import::rest::{
ImportParseError, NormalizationConfig, SourceDigest, normalize_verified_document,
preview_from_ir, validate_normalized_ir,
};
use serde::Deserialize;
use serde_json::{Value, json};
use sha2::{Digest, Sha256};
use std::{
fs,
path::{Path, PathBuf},
};
#[path = "corpus/matrix.rs"]
mod matrix;
fn tests_root() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR")).join("tests")
}
fn hex(bytes: impl AsRef<[u8]>) -> String {
Sha256::digest(bytes)
.iter()
.map(|b| format!("{b:02x}"))
.collect()
}
fn canonical_json(value: &Value) -> Vec<u8> {
serde_json::to_vec(value).expect("JSON values serialize")
}
fn escape_pointer(value: &str) -> String {
value.replace('~', "~0").replace('/', "~1")
}
fn source_ledger(
value: &Value,
pointer: &str,
ledger: &mut std::collections::BTreeMap<String, Value>,
) {
assert!(ledger.insert(pointer.to_owned(), value.clone()).is_none());
match value {
Value::Array(items) => {
for (index, item) in items.iter().enumerate() {
source_ledger(item, &format!("{pointer}/{index}"), ledger);
}
}
Value::Object(fields) => {
for (key, item) in fields {
source_ledger(item, &format!("{pointer}/{}", escape_pointer(key)), ledger);
}
}
_ => {}
}
}
fn canonical_source_ledger(
node: &CanonicalSourceNode,
ledger: &mut std::collections::BTreeMap<String, Value>,
) -> Value {
let value = match &node.value {
CanonicalSourceValue::Null => Value::Null,
CanonicalSourceValue::Boolean(value) => json!(value),
CanonicalSourceValue::Number(value) => {
serde_json::from_str(value).expect("canonical number")
}
CanonicalSourceValue::String(value) => json!(value),
CanonicalSourceValue::Array(items) => Value::Array(
items
.iter()
.map(|item| canonical_source_ledger(item, ledger))
.collect(),
),
CanonicalSourceValue::Object(items) => {
let mut fields = serde_json::Map::new();
for (key, item) in items {
fields.insert(key.clone(), canonical_source_ledger(item, ledger));
}
Value::Object(fields)
}
};
assert!(
ledger
.insert(node.location.pointer.clone(), value.clone())
.is_none()
);
value
}
#[derive(Debug, Deserialize)]
struct Manifest {
corpus_version: String,
matrix_version: String,
compatibility_impact: String,
documents: Vec<Document>,
}
#[derive(Debug, Deserialize)]
struct Document {
id: String,
file: String,
sha256: String,
canonical_digest: Option<String>,
origin: String,
license: String,
specification_version: String,
classification: String,
expected_preview: Value,
}
fn manifest() -> Manifest {
serde_json::from_slice(
&fs::read(tests_root().join("corpus/manifest.json")).expect("manifest exists"),
)
.expect("manifest JSON is valid")
}
fn normalize(source: &str) -> Result<crank_import::rest::NormalizedIr, ImportParseError> {
let source_digest = SourceDigest::parse(hex(source.as_bytes())).expect("sha256 is valid");
normalize_verified_document(source, source_digest, &NormalizationConfig::default())
}
#[test]
fn ac_2_manifest_covers_fifty_provenanced_specs_with_exact_expectations() {
let manifest = manifest();
assert_eq!(manifest.corpus_version, "1.0.3");
assert_eq!(manifest.matrix_version, "1.0.2");
assert!(!manifest.compatibility_impact.trim().is_empty());
assert!(manifest.documents.len() >= 50);
let root = tests_root().join("corpus");
let mut versions = std::collections::BTreeSet::new();
let mut representative_count = 0;
for document in &manifest.documents {
assert!(!document.id.is_empty());
assert!(
document.origin.starts_with("synthetic:"),
"{} lacks provenance",
document.id
);
assert!(
document.license.contains("CC0"),
"{} lacks license",
document.id
);
assert_eq!(document.sha256.len(), 64);
versions.insert(document.specification_version.as_str());
let source = fs::read(root.join(&document.file))
.unwrap_or_else(|e| panic!("{}: {e}", document.file));
assert_eq!(
hex(&source),
document.sha256,
"checksum mismatch for {}",
document.file
);
if let Ok(value) = serde_json::from_slice::<Value>(&source) {
let digest = hex(canonical_json(&value));
assert_eq!(
document.canonical_digest.as_deref(),
Some(digest.as_str()),
"canonical digest mismatch for {}",
document.file
);
} else {
assert!(
document.canonical_digest.is_none(),
"malformed JSON has no canonical digest"
);
}
if document.classification == "representative" {
representative_count += 1;
let text = std::str::from_utf8(&source).expect("fixtures are UTF-8");
let ir =
normalize(text).unwrap_or_else(|e| panic!("{} failed parser: {e}", document.file));
validate_normalized_ir(&ir).expect("normalized IR has explicit source coverage");
let preview = preview_from_ir(&ir);
let repeated_preview =
preview_from_ir(&normalize(text).expect("repeat normalization succeeds"));
assert_eq!(
serde_json::to_value(&preview).unwrap(),
serde_json::to_value(&repeated_preview).unwrap(),
"deterministic preview diff for {}:\nexpected={}\nactual={}",
document.file,
serde_json::to_string_pretty(&preview).unwrap(),
serde_json::to_string_pretty(&repeated_preview).unwrap(),
);
let candidates = preview
.groups
.iter()
.flat_map(|g| &g.operations)
.collect::<Vec<_>>();
assert_eq!(
candidates.len(),
document.expected_preview["operation_count"]
.as_u64()
.unwrap() as usize,
"operation count in {}",
document.file
);
assert_eq!(
candidates.len(),
1,
"corpus fixtures are single-operation exact oracles"
);
let expected = &document.expected_preview["operations"][0];
let actual_candidate = serde_json::to_value(candidates[0]).unwrap();
assert_eq!(
actual_candidate,
expected["candidate"],
"frozen candidate diff for {}:\nexpected={}\nactual={}",
document.file,
serde_json::to_string_pretty(&expected["candidate"]).unwrap(),
serde_json::to_string_pretty(&actual_candidate).unwrap(),
);
let blocking_codes = candidates[0]
.findings
.iter()
.filter(|finding| {
finding.severity == crank_import::rest::ImportFindingSeverity::Error
})
.map(|finding| finding.code.clone())
.collect::<Vec<_>>();
assert_eq!(json!(blocking_codes), expected["blocker_codes"]);
assert_eq!(
blocking_codes.is_empty(),
expected["actionable"].as_bool().unwrap()
);
assert_eq!(
hex(canonical_json(&actual_candidate)),
expected["candidate_digest"],
"candidate canonical digest in {}",
document.file
);
assert_eq!(
hex(canonical_json(&serde_json::to_value(&preview).unwrap())),
document.expected_preview["canonical_preview_digest"],
"preview canonical digest in {}",
document.file
);
let actual_preview = serde_json::to_value(&preview).unwrap();
assert_eq!(
actual_preview,
document.expected_preview["canonical_preview"],
"frozen readable preview diff for {}:\nexpected={}\nactual={}",
document.file,
serde_json::to_string_pretty(&document.expected_preview["canonical_preview"])
.unwrap(),
serde_json::to_string_pretty(&actual_preview).unwrap(),
);
assert_eq!(
serde_json::to_value(candidates[0].method).unwrap().as_str(),
expected["method"].as_str()
);
assert_eq!(candidates[0].path, expected["path"].as_str().unwrap());
assert_eq!(
candidates[0].operation_id.as_deref(),
expected["operation_id"].as_str()
);
assert!(
preview.findings.is_empty(),
"unexpected preview findings in {}: {:?}",
document.file,
preview.findings
);
let mut actual_findings = candidates[0]
.findings
.iter()
.map(|f| f.code.as_str())
.collect::<Vec<_>>();
let mut expected_findings = document.expected_preview["finding_codes"]
.as_array()
.unwrap()
.iter()
.map(|v| v.as_str().unwrap())
.collect::<Vec<_>>();
actual_findings.sort_unstable();
expected_findings.sort_unstable();
assert_eq!(
actual_findings, expected_findings,
"finding codes in {}",
document.file
);
} else {
assert_eq!(document.classification, "hostile");
let text = std::str::from_utf8(&source).unwrap();
let parsed = normalize(text);
assert_eq!(
parsed,
normalize(text),
"hostile parser result changed on deterministic rerun for {}",
document.file
);
if [
"hostile-empty.json",
"hostile-malformed.json",
"hostile-oversized.json",
"hostile-deep.json",
"hostile-aliases.yaml",
]
.contains(&document.file.as_str())
{
if [
"hostile-oversized.json",
"hostile-deep.json",
"hostile-aliases.yaml",
]
.contains(&document.file.as_str())
{
assert!(
matches!(parsed, Err(ImportParseError::LimitExceeded)),
"{} must fail within configured bounds: {parsed:?}",
document.file
);
} else {
assert!(parsed.is_err(), "{} must be rejected", document.file);
}
} else if document.file == "hostile-trace.json" {
let ir = parsed.expect("TRACE is reported instead of silently discarded");
assert!(
ir.findings
.iter()
.any(|f| f.code == "unsupported_http_method")
);
assert!(ir.coverage.iter().any(|c| c.construct_id.contains("trace")
&& c.disposition == CoverageDisposition::Finding));
} else if document.file == "hostile-xml.json" {
let ir = parsed.expect("XML is represented by an explicit finding");
let preview = preview_from_ir(&ir);
let codes = preview
.groups
.iter()
.flat_map(|g| &g.operations)
.flat_map(|o| &o.findings)
.map(|f| f.code.as_str())
.collect::<Vec<_>>();
assert!(
codes
.iter()
.any(|code| code.contains("xml") || code.contains("media")),
"XML findings: {codes:?}"
);
} else if document.file == "hostile-secret.json" {
let ir = parsed.expect("secret-like examples remain inspectable");
let evidence = serde_json::to_string(&preview_from_ir(&ir)).unwrap();
assert!(
!evidence.contains("sk_test_corpus_secret_canary"),
"secret canary leaked into preview evidence"
);
} else {
let ir = parsed.unwrap_or_else(|error| {
panic!(
"{} must have an explicit finding or bounded rejection: {error}",
document.file
)
});
validate_normalized_ir(&ir).expect("hostile construct coverage remains explicit");
assert!(
!ir.coverage.is_empty(),
"{} has no construct ledger",
document.file
);
let preview = preview_from_ir(&ir);
match document.file.as_str() {
"hostile-cycle.json" => {
assert_eq!(
ir.operations.len(),
1,
"recursive schema must not drop the source operation"
);
assert!(
ir.findings
.iter()
.chain(ir.operations.iter().flat_map(|op| &op.findings))
.all(|finding| {
finding.severity
!= crank_import::rest::ImportFindingSeverity::Error
}),
"bounded cycle policy must not yield an unexplained blocker: {:?} {:?}",
ir.findings,
ir.operations.iter().map(|op| &op.findings)
);
assert!(
ir.unresolved_references.is_empty(),
"resolved recursion must not be reported as unresolvable: {:?}",
ir.unresolved_references
);
let cycle_edge = |recursive: bool| {
ir.reference_graph.edges.iter().any(|edge| {
edge.recursive == recursive
&& edge.source.location.pointer
== "/components/schemas/Node/properties/next/$ref"
&& edge.target.location.pointer == "/components/schemas/Node"
})
};
assert!(
cycle_edge(false) && cycle_edge(true),
"Node.next must resolve through both bounded and recursive edges: {:?}",
ir.reference_graph.edges
);
let response = ir.operations[0]
.response_variants
.iter()
.find(|variant| variant.status_code == 200)
.expect("200 response is retained");
assert!(
matches!(
&response.schema,
Some(schema) if matches!(
&schema.kind,
crank_import::rest::NormalizedSchemaKind::Object {
properties, ..
} if properties.contains_key("next")
)
),
"recursive node schema must be projected: {:?}",
response.schema
);
assert!(
ir.coverage.iter().any(|entry| {
entry.location.pointer
== "/components/schemas/Node/properties/next/properties/next"
&& entry.disposition == CoverageDisposition::Mapped
}),
"bounded recursion must remain Mapped in the resolved source ledger: {:?}",
ir.coverage
);
assert_eq!(
document.expected_preview["mapped_recursive_pointer"].as_str(),
Some("/components/schemas/Node/properties/next/properties/next")
);
assert_eq!(
ir.findings
.iter()
.map(|f| (f.code.clone(), f.severity.clone()))
.collect::<Vec<_>>(),
vec![(
"missing_servers".to_owned(),
crank_import::rest::ImportFindingSeverity::Warning
)],
"cycle fixture must expose only the exact bounded warning set: {:?}",
ir.findings
);
assert_eq!(
document.expected_preview["operation_count"].as_u64(),
Some(1)
);
assert_eq!(
document.expected_preview["recursive_edge"]["source"].as_str(),
Some("/components/schemas/Node/properties/next/$ref")
);
assert_eq!(
document.expected_preview["recursive_edge"]["target"].as_str(),
Some("/components/schemas/Node")
);
assert_eq!(document.expected_preview["blocker_findings"], json!([]));
assert_eq!(
document.expected_preview["unresolved_references"],
json!([])
);
assert_eq!(
document.expected_preview["warning_findings"],
json!([{"code":"missing_servers","severity":"Warning","operation_key":null}])
);
}
"hostile-external-ref.json" => assert!(
ir.findings.iter()
.chain(ir.operations.iter().flat_map(|op| &op.findings))
.any(|finding| finding.code == "external_reference_disabled"
&& finding.location.pointer == "/paths/~1hostile/get/responses/200/content/application~1json/schema/$ref"),
"external ref must be denied at its source: {:?}",
ir.findings
),
"hostile-duplicate-ids.json" => assert_eq!(
ir.operations.len(),
2,
"duplicate IDs must not drop a source operation"
),
"hostile-composition-conflict.json" => {
assert_eq!(
ir.operations.len(),
1,
"conflicting allOf must keep the source operation explicit"
);
let conflict = ir.operations[0]
.findings
.iter()
.find(|finding| finding.code == "all_of_conflict")
.unwrap_or_else(|| {
panic!(
"allOf conflict must be named: {:?}",
ir.operations[0].findings
)
});
assert_eq!(
conflict.severity,
crank_import::rest::ImportFindingSeverity::Error,
"allOf conflict must block the candidate: {:?}",
conflict
);
assert_eq!(
conflict.operation_key.as_deref(),
Some("GET /hostile"),
"conflict must belong to the affected candidate: {:?}",
conflict
);
assert_eq!(
conflict.location.pointer,
"/paths/~1hostile/get/responses/200/content/application~1json/schema/allOf",
"conflict must point at the conflicting allOf: {:?}",
conflict
);
assert!(
ir.coverage
.iter()
.any(|entry| {
entry.location
.pointer
== "/paths/~1hostile/get/responses/200/content/application~1json/schema/allOf"
})
&& ir
.operations[0]
.findings
.iter()
.any(|finding| finding.code == "all_of_conflict"
&& finding.location.pointer
== "/paths/~1hostile/get/responses/200/content/application~1json/schema/allOf"),
"conflicting allOf must stay in the source ledger bound to the explicit finding: {:?}",
ir.coverage
);
let response = ir.operations[0]
.response_variants
.iter()
.find(|variant| variant.status_code == 200)
.expect("200 response is retained");
assert!(
matches!(
&response.schema,
Some(schema) if matches!(
&schema.kind,
crank_import::rest::NormalizedSchemaKind::Composition {
operator, variants
} if operator == "allOf" && variants.len() == 2
)
),
"conflict branches must be preserved verbatim: {:?}",
response.schema
);
assert_eq!(
ir.findings
.iter()
.map(|f| (f.code.clone(), f.severity.clone()))
.collect::<Vec<_>>(),
vec![(
"missing_servers".to_owned(),
crank_import::rest::ImportFindingSeverity::Warning
)],
"composition conflict fixture must keep the exact warning set: {:?}",
ir.findings
);
assert_eq!(
document.expected_preview["operation_count"].as_u64(),
Some(1)
);
assert_eq!(
document.expected_preview["blocker_findings"],
json!([{"code":"all_of_conflict","severity":"Error",
"operation_key":"GET /hostile",
"location":"/paths/~1hostile/get/responses/200/content/application~1json/schema/allOf"}])
);
assert_eq!(
document.expected_preview["composition"],
json!({"operator":"allOf","branch_count":2})
);
assert_eq!(
document.expected_preview["warning_findings"],
json!([{"code":"missing_servers","severity":"Warning","operation_key":null}])
);
}
"hostile-security-scope.json" => {
assert_eq!(
ir.operations.len(),
2,
"security-scope fixture must keep both candidates explicit: {:?}",
ir.operations.iter().map(|op| &op.key).collect::<Vec<_>>()
);
let requirements = ir
.findings
.iter()
.filter(|finding| finding.code == "unsupported_security_requirement")
.collect::<Vec<_>>();
assert_eq!(
requirements.len(),
1,
"exactly the inherited requirement must produce a blocker: {:?}",
ir.findings
);
let requirement = &requirements[0];
assert_eq!(
requirement.severity,
crank_import::rest::ImportFindingSeverity::Error,
"security requirement must block its candidate: {:?}",
requirement
);
assert_eq!(
requirement.operation_key.as_deref(),
Some("GET /secure"),
"blocker must belong only to the inherited secured candidate: {:?}",
requirement
);
assert_eq!(
requirement.location.pointer, "/security/0",
"inherited requirement must point at the document root requirement: {:?}",
requirement
);
let mut by_key = std::collections::BTreeMap::new();
for group in &preview.groups {
for candidate in &group.operations {
by_key.insert(candidate.key.clone(), candidate);
}
}
let public = by_key.get("GET /public").expect("public candidate present");
assert!(
public.findings.iter().all(|finding| finding.severity
!= crank_import::rest::ImportFindingSeverity::Error),
"public operation with security: [] must stay actionable: {:?}",
public.findings
);
assert!(
by_key
.get("GET /secure")
.expect("secured candidate present")
.findings
.iter()
.any(|finding| finding.code == "unsupported_security_requirement"
&& finding.severity
== crank_import::rest::ImportFindingSeverity::Error),
"inherited requirement must block the secured candidate: {:?}",
by_key.get("GET /secure").unwrap().findings
);
assert!(
preview
.findings
.iter()
.all(|finding| finding.operation_key.is_some()),
"no document-global blocker may be produced: {:?}",
preview.findings
);
assert!(
ir.coverage
.iter()
.any(|entry| entry.location.pointer == "/security/0"
&& entry.disposition == CoverageDisposition::Finding),
"inherited requirement must stay in the source ledger bound to the finding: {:?}",
ir.coverage
);
let mut actual_operation_keys = preview
.groups
.iter()
.flat_map(|group| &group.operations)
.map(|op| op.key.clone())
.collect::<Vec<_>>();
actual_operation_keys.sort();
assert_eq!(
json!(actual_operation_keys),
document.expected_preview["operation_keys"],
"security-scope operation oracle for {}",
document.file
);
let actual_blockers = requirements
.iter()
.map(|finding| {
json!({"code": finding.code.clone(), "severity": "Error",
"operation_key": finding.operation_key.clone(),
"location": finding.location.pointer.clone()})
})
.collect::<Vec<_>>();
assert_eq!(
actual_blockers,
document.expected_preview["blocker_findings"]
.as_array()
.unwrap()
.clone(),
"security-scope blocker oracle for {}: actual {actual_blockers:?}",
document.file
);
let actual_warnings = ir
.findings
.iter()
.filter(|finding| {
finding.severity
== crank_import::rest::ImportFindingSeverity::Warning
})
.map(|finding| {
json!({"code": finding.code.clone(), "severity": "Warning",
"operation_key": finding.operation_key.clone()})
})
.collect::<Vec<_>>();
assert_eq!(
actual_warnings,
document.expected_preview["warning_findings"]
.as_array()
.unwrap()
.clone(),
"security-scope warning oracle for {}: actual {actual_warnings:?}",
document.file
);
}
_ => unreachable!("hostile fixture must have a dedicated expectation"),
}
}
}
}
// Exact file set: manifest rows are unique and every corpus data file is
// accounted exactly once, so duplicates or orphan fixtures cannot inflate
// or hide coverage.
let mut ids = std::collections::BTreeSet::new();
let mut files = std::collections::BTreeSet::new();
for document in &manifest.documents {
assert!(
ids.insert(document.id.clone()),
"duplicate manifest document id {}",
document.id
);
assert!(
files.insert(document.file.clone()),
"duplicate manifest file {}",
document.file
);
}
let expected_files = files
.into_iter()
.chain(std::iter::once("manifest.json".to_owned()))
.chain(std::iter::once("matrix.rs".to_owned()))
.collect::<std::collections::BTreeSet<_>>();
let actual_files = fs::read_dir(&root)
.expect("corpus directory exists")
.map(|entry| entry.unwrap().file_name().to_string_lossy().into_owned())
.collect::<std::collections::BTreeSet<_>>();
assert_eq!(
actual_files, expected_files,
"corpus directory must equal the manifest file set exactly"
);
assert_eq!(representative_count, 50);
assert!(
versions
.iter()
.any(|version| version.starts_with("OpenAPI 3.0"))
&& versions
.iter()
.any(|version| version.starts_with("OpenAPI 3.1"))
&& versions.contains("Swagger 2.0")
);
}
#[test]
fn ac_3_evidence_reports_actionable_denominator_exclusions_and_zero_silent_loss() {
let manifest = manifest();
let mut denominator = 0_u64;
let mut actionable_count = 0_u64;
let mut operation_count = 0_u64;
let mut source_construct_count = 0_u64;
let mut covered_source_construct_count = 0_u64;
let mut semantic_coverage_count = 0_u64;
let mut silent_loss = Vec::new();
let mut exclusions = Vec::new();
let mut finding_count = 0_u64;
for document in &manifest.documents {
if document.classification != "representative" {
continue;
}
let source_bytes = fs::read(tests_root().join("corpus").join(&document.file)).unwrap();
let source: Value =
serde_json::from_slice(&source_bytes).expect("representative corpus source is JSON");
let mut raw_ledger = std::collections::BTreeMap::new();
source_ledger(&source, "", &mut raw_ledger);
let source_text = std::str::from_utf8(&source_bytes).unwrap();
let ir = normalize(source_text).unwrap();
validate_normalized_ir(&ir).unwrap();
let mut normalized_ledger = std::collections::BTreeMap::new();
let _ = canonical_source_ledger(&ir.source_tree, &mut normalized_ledger);
assert_eq!(
normalized_ledger, raw_ledger,
"normalizer source-tree ledger differs from raw document for {}",
document.file
);
source_construct_count += raw_ledger.len() as u64;
let coverage_by_id = ir
.coverage
.iter()
.map(|entry| (entry.construct_id.as_str(), entry))
.collect::<std::collections::BTreeMap<_, _>>();
for pointer in raw_ledger.keys() {
let source_id = format!("source:{pointer}");
match coverage_by_id.get(source_id.as_str()) {
Some(entry)
if entry.location.pointer == *pointer
&& entry.disposition == CoverageDisposition::Mapped =>
{
covered_source_construct_count += 1;
}
_ => silent_loss.push(json!({"document":document.id,"source_pointer":pointer,"coverage_id":source_id})),
}
}
let findings = ir
.findings
.iter()
.chain(
ir.operations
.iter()
.flat_map(|operation| &operation.findings),
)
.collect::<Vec<_>>();
for entry in ir
.coverage
.iter()
.filter(|entry| !entry.construct_id.starts_with("source:"))
{
semantic_coverage_count += 1;
assert!(
raw_ledger.contains_key(&entry.location.pointer),
"coverage {} points outside raw source tree for {}",
entry.construct_id,
document.file
);
match entry.disposition {
CoverageDisposition::Mapped => {}
CoverageDisposition::Finding => assert!(
findings
.iter()
.any(|finding| finding.construct_id == entry.construct_id
&& finding.location == entry.location),
"finding coverage {} has no matching finding in {}",
entry.construct_id,
document.file
),
}
}
for operation in &ir.operations {
denominator += 1;
operation_count += 1;
if operation
.findings
.iter()
.all(|f| f.severity != crank_import::rest::ImportFindingSeverity::Error)
{
actionable_count += 1;
} else {
exclusions.push(json!({"document":document.id,"operation":operation.key,"reason":"blocking_finding","findings":operation.findings.iter().map(|f| &f.code).collect::<Vec<_>>()}));
}
}
finding_count += ir.findings.len() as u64;
}
assert!(denominator > 0);
assert!(
actionable_count * 100 >= denominator * 95,
"actionable {actionable_count}/{denominator}; exclusions={exclusions:?}"
);
let silent_loss_count = silent_loss.len() as u64;
assert_eq!(
source_construct_count, covered_source_construct_count,
"independently enumerated raw source constructs lack coverage: {silent_loss:?}"
);
let mut reversed_counts = (0_u64, 0_u64, 0_u64);
for document in manifest
.documents
.iter()
.rev()
.filter(|document| document.classification == "representative")
{
let source = fs::read_to_string(tests_root().join("corpus").join(&document.file)).unwrap();
let ir = normalize(&source).unwrap();
reversed_counts.0 += ir.operations.len() as u64;
reversed_counts.1 += ir
.operations
.iter()
.filter(|operation| {
operation.findings.iter().all(|finding| {
finding.severity != crank_import::rest::ImportFindingSeverity::Error
})
})
.count() as u64;
reversed_counts.2 += ir.findings.len() as u64;
}
assert_eq!(
reversed_counts,
(operation_count, actionable_count, finding_count),
"aggregate evidence must not depend on manifest order"
);
let manifest_bytes = fs::read(tests_root().join("corpus/manifest.json")).unwrap();
let manifest_digest = hex(&manifest_bytes);
let matrix_bytes = fs::read(tests_root().join("support-matrix.yaml")).unwrap();
let matrix_digest = hex(&matrix_bytes);
let matrix_value: serde_yaml::Value = serde_yaml::from_slice(&matrix_bytes).unwrap();
let matrix_row_count = matrix_value["constructs"].as_sequence().unwrap().len();
let evidence_identity = hex(format!(
"{}\n{}\n{}\n{}",
manifest.corpus_version, manifest.matrix_version, manifest_digest, matrix_digest
));
let mut evidence = json!({
"evidence_version":"1.0.0", "corpus_version":manifest.corpus_version, "matrix_version":manifest.matrix_version,
"evidence_identity":evidence_identity,
"content_digest_algorithm":"sha256",
"content_digest_definition":"SHA-256 of compact key-sorted JSON before the content_digest field is added.",
"manifest_digest":manifest_digest,
"matrix_digest":matrix_digest,
"denominator":denominator, "actionable_count":actionable_count, "exclusions":exclusions,
"raw_counts":{"documents":manifest.documents.len(),"representative_operations":operation_count,"findings":finding_count,"source_constructs":source_construct_count,"covered_source_constructs":covered_source_construct_count,"semantic_coverage_entries":semantic_coverage_count},
"matrix_contract":{"construct_rows":matrix_row_count,"semantic_probes":"AC-1 runs a generated normalizer probe for every matrix row, including every 2xx status in all three formats."},
"uncovered_source_constructs":silent_loss,
"silent_loss_count":silent_loss_count,
"method":"real normalize_verified_document + preview_from_ir; every NormalizedIr passed validate_normalized_ir"
});
let content_digest = hex(canonical_json(&evidence));
evidence["content_digest"] = json!(content_digest);
let artifact = Path::new(env!("CARGO_MANIFEST_DIR")).join(format!(
"target/openapi-corpus/evidence-{evidence_identity}.json"
));
let target_dir = artifact.parent().unwrap();
fs::create_dir_all(target_dir).unwrap();
let bytes = serde_json::to_vec_pretty(&evidence).unwrap();
// Each process needs its own temp file: concurrent corpus runs must not
// truncate each other's pending evidence before atomic publication.
let mut nonce = 0u32;
let (publish, mut file) = loop {
let path = target_dir.join(format!(
"evidence.json.tmp-{}-{}-{nonce}",
&evidence_identity[..16],
std::process::id()
));
match fs::OpenOptions::new()
.write(true)
.create_new(true)
.open(&path)
{
Ok(file) => break (path, file),
Err(error) if error.kind() == std::io::ErrorKind::AlreadyExists && nonce < 1024 => {
nonce += 1;
}
Err(error) => panic!(
"cannot create evidence temp file {}: {error}",
path.display()
),
}
};
{
use std::io::Write;
file.write_all(&bytes).unwrap();
file.sync_all().unwrap();
}
// hard_link fails atomically when the final identity already exists.
// Rename would silently overwrite after an exists-check race, while
// create_new on the final path would expose partial bytes after a crash.
let published = match fs::hard_link(&publish, &artifact) {
Ok(()) => true,
Err(error) if error.kind() == std::io::ErrorKind::AlreadyExists => false,
Err(error) => panic!(
"cannot publish immutable evidence artifact {}: {error}",
artifact.display()
),
};
fs::remove_file(&publish).ok();
if !published {
let existing = fs::read(&artifact).unwrap();
assert_eq!(
existing,
bytes,
"immutable evidence identity {evidence_identity} already has conflicting contents at {}",
artifact.display()
);
}
if let Ok(directory) = fs::File::open(target_dir) {
let _ = directory.sync_all();
}
let reread: Value = serde_json::from_slice(&fs::read(artifact).unwrap()).unwrap();
assert_eq!(reread, evidence);
assert_eq!(reread["silent_loss_count"], 0);
assert_eq!(source_construct_count, covered_source_construct_count);
assert_eq!(reread["denominator"], denominator);
assert_eq!(reread["actionable_count"], actionable_count);
}
@@ -0,0 +1,5 @@
openapi: 3.1.0
info: {title: Aliases, version: 1}
paths: {}
x-anchor: &anchor {type: string}
x-aliases: [*anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor, *anchor]
@@ -0,0 +1,43 @@
{
"openapi": "3.1.0",
"info": {
"title": "Hostile generated",
"version": "1"
},
"paths": {
"/hostile": {
"get": {
"operationId": "hostileOperation",
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "integer"
}
}
}
]
}
}
}
}
}
}
}
}
}
@@ -0,0 +1,38 @@
{
"openapi": "3.1.0",
"info": {
"title": "Hostile generated",
"version": "1"
},
"paths": {
"/hostile": {
"get": {
"operationId": "hostileOperation",
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Node"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Node": {
"type": "object",
"properties": {
"next": {
"$ref": "#/components/schemas/Node"
}
}
}
}
}
}
@@ -0,0 +1 @@
{"openapi":"3.1.0","info":{"title":"Hostile generated","version":"1"},"paths":{"/hostile":{"get":{"operationId":"hostileOperation","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"Deep":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"string"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
@@ -0,0 +1,36 @@
{
"openapi": "3.1.0",
"info": {
"title": "Hostile generated",
"version": "1"
},
"paths": {
"/hostile": {
"get": {
"operationId": "hostileOperation",
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "https://external.example.test/schema.json"
}
}
}
}
}
}
},
"/other": {
"post": {
"operationId": "hostileOperation",
"responses": {
"200": {
"description": "ok"
}
}
}
}
}
}
@@ -0,0 +1 @@
{}
@@ -0,0 +1,26 @@
{
"openapi": "3.1.0",
"info": {
"title": "Hostile generated",
"version": "1"
},
"paths": {
"/hostile": {
"get": {
"operationId": "hostileOperation",
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "https://external.example.test/schema.json"
}
}
}
}
}
}
}
}
}
@@ -0,0 +1 @@
{"openapi":
@@ -0,0 +1,12 @@
{
"openapi": "3.1.0",
"info": {"title": "Hostile generated", "version": "1"},
"paths": {"/hostile": {"get": {"operationId": "hostileOperation", "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "string"}}}}}}}},
"x-padding-0": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaLine truncated
}
@@ -0,0 +1,32 @@
{
"openapi": "3.1.0",
"info": {
"title": "Secret hostile",
"version": "1"
},
"paths": {
"/secret": {
"get": {
"operationId": "secretOperation",
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"x-example": "sk_test_corpus_secret_canary"
}
}
},
"servers": [
{
"url": "https://api.example.test"
}
]
}
@@ -0,0 +1,48 @@
{
"openapi": "3.0.3",
"info": {
"title": "Hostile security scope",
"version": "1"
},
"servers": [
{
"url": "https://corpus.example.test"
}
],
"security": [
{
"corpusProbe": []
}
],
"components": {
"securitySchemes": {
"corpusProbe": {
"type": "http",
"scheme": "basic"
}
}
},
"paths": {
"/public": {
"get": {
"operationId": "publicProbe",
"security": [],
"responses": {
"200": {
"description": "ok"
}
}
}
},
"/secure": {
"get": {
"operationId": "secureProbe",
"responses": {
"200": {
"description": "ok"
}
}
}
}
}
}
@@ -0,0 +1,18 @@
{
"openapi": "3.1.0",
"info": {
"title": "TRACE hostile",
"version": "1"
},
"paths": {
"/trace": {
"trace": {
"responses": {
"200": {
"description": "unsupported"
}
}
}
}
}
}
@@ -0,0 +1,31 @@
{
"openapi": "3.1.0",
"info": {
"title": "XML hostile",
"version": "1"
},
"paths": {
"/xml": {
"get": {
"operationId": "xmlOperation",
"responses": {
"200": {
"description": "ok",
"content": {
"application/xml": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.example.test"
}
]
}
File diff suppressed because it is too large. Load diff
+822
View File
@@ -0,0 +1,822 @@
//! Executable normalizer probes for every normative support-matrix row.
use super::*;
use crank_import::rest::{NormalizedSchemaKind, normalize_verified_bundle};
fn assert_actionable(ir: &crank_import::rest::NormalizedIr, context: &str) {
let preview = preview_from_ir(ir);
assert!(
!preview.findings.iter().any(|finding| {
finding.severity == crank_import::rest::ImportFindingSeverity::Error
}),
"{context} has a document blocker: {:?}",
preview.findings
);
assert!(
preview
.groups
.iter()
.flat_map(|group| &group.operations)
.all(|candidate| {
!candidate.findings.iter().any(|finding| {
finding.severity == crank_import::rest::ImportFindingSeverity::Error
})
}),
"{context} unexpectedly blocked: {:?}",
preview.groups
);
}
#[test]
fn ac_1_support_matrix_rows_have_exact_construct_contracts() {
let matrix_text = fs::read_to_string(tests_root().join("support-matrix.yaml"))
.expect("support matrix exists");
let matrix: serde_yaml::Value = serde_yaml::from_str(&matrix_text).expect("valid YAML");
assert_eq!(matrix["matrix_version"].as_str(), Some("1.0.2"));
assert!(
matrix["compatibility_impact"]
.as_str()
.is_some_and(|s| !s.trim().is_empty())
);
let rows = matrix["constructs"].as_sequence().expect("construct rows");
assert!(rows.len() >= 375);
let mut construct_keys = std::collections::BTreeSet::new();
for row in rows {
assert!(
row["specification_version"].as_str().is_some_and(|s| [
"OpenAPI 3.0",
"OpenAPI 3.1",
"Swagger 2.0"
]
.contains(&s))
);
assert!(row["construct_id"].as_str().is_some_and(|s| !s.is_empty()));
assert!(matches!(
row["status"].as_str(),
Some("supported" | "unsupported")
));
assert!(
row["preserved_semantics"]
.as_str()
.is_some_and(|s| !s.trim().is_empty())
);
assert!(
row["expected_finding"]
.as_str()
.is_some_and(|s| !s.trim().is_empty())
);
let key = format!(
"{}:{}",
row["specification_version"].as_str().unwrap(),
row["construct_id"].as_str().unwrap()
);
assert!(
construct_keys.insert(key.clone()),
"duplicate normative construct row: {key}"
);
if row["status"] == "supported" {
assert_eq!(
row["expected_finding"], "none",
"supported construct has a finding: {key}"
);
} else {
assert_ne!(
row["expected_finding"], "none",
"unsupported construct has no finding: {key}"
);
}
}
for version in ["OpenAPI 3.0", "OpenAPI 3.1", "Swagger 2.0"] {
// Exhaustive accounting: every normative row of this format must be
// matched by an executed probe before the loop completes.
let mut unprobed = rows
.iter()
.filter(|row| row["specification_version"] == version)
.map(|row| {
(
version.to_owned(),
row["construct_id"].as_str().unwrap().to_owned(),
)
})
.collect::<std::collections::BTreeSet<_>>();
let mut probed = |construct: &str| {
let taken = unprobed.remove(&(version.to_owned(), construct.to_owned()));
assert!(taken, "{version} double-probes or misses {construct}");
};
let ids = rows
.iter()
.filter(|r| r["specification_version"] == version)
.filter_map(|r| r["construct_id"].as_str())
.collect::<Vec<_>>();
for id in [
"http.method.get",
"http.method.post",
"http.method.put",
"http.method.patch",
"http.method.delete",
"http.method.head",
"http.method.options",
"parameter.location.path",
"parameter.location.query",
"parameter.location.header",
"parameter.location.cookie",
"request_body.application/json",
"request_body.application/x-www-form-urlencoded",
"request_body.multipart/form-data",
"reference.local",
"reference.external_allowlisted",
"composition.allOf",
"composition.oneOf",
"composition.anyOf",
"security.bearer",
"security.basic",
"security.api_key",
"media_type.application_xml.request",
"media_type.application_xml.response",
"http.method.trace",
"http.method.connect",
] {
assert!(ids.contains(&id), "{version} matrix misses {id}");
}
for security_kind in ["bearer", "basic", "api_key"] {
let construct = format!("security.{security_kind}");
let row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap();
let probe = if version == "Swagger 2.0" {
json!({
"swagger":"2.0", "info":{"title":"Security probe","version":"1"},
"securityDefinitions":{"probe": if security_kind == "bearer" {
json!({"type":"oauth2","flow":"implicit","authorizationUrl":"https://auth.example.test","scopes":{}})
} else if security_kind == "api_key" {
json!({"type":"apiKey","name":"X-Key","in":"header"})
} else {
json!({"type":"basic"})
}},
"paths":{"/probe":{"get":{"security":[{"probe":[]}],"operationId":"securityProbe","responses":{"200":{"description":"ok"}}}}}
})
} else {
let scheme = match security_kind {
"bearer" => json!({"type":"http","scheme":"bearer"}),
"basic" => json!({"type":"http","scheme":"basic"}),
"api_key" => json!({"type":"apiKey","name":"X-Key","in":"header"}),
_ => unreachable!(),
};
json!({
"openapi": if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Security probe","version":"1"},
"servers":[{"url":"https://matrix.example.test"}],
"components":{"securitySchemes":{"probe":scheme}},
"paths":{"/probe":{"get":{"security":[{"probe":[]}],"operationId":"securityProbe","responses":{"200":{"description":"ok"}}}}}
})
};
assert_eq!(
row["status"], "unsupported",
"security is not yet persisted as Auth Profile semantics"
);
let source = serde_json::to_string(&probe).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
let expected_finding = row["expected_finding"].as_str().unwrap();
let requirement = ir
.findings
.iter()
.find(|finding| {
finding.code == expected_finding
&& finding.severity == crank_import::rest::ImportFindingSeverity::Error
})
.unwrap_or_else(|| {
panic!(
"{version} {construct} must be explicitly blocked: {:?}",
ir.findings
)
});
assert_eq!(
requirement.operation_key.as_deref(),
Some("GET /probe"),
"{version} {construct} blocker must belong to the affected candidate"
);
assert_eq!(
requirement.location.pointer, "/paths/~1probe/get/security/0",
"{version} {construct} blocker must point at the local requirement"
);
let preview = preview_from_ir(&ir);
let candidate = &preview.groups[0].operations[0];
assert!(
candidate
.findings
.iter()
.any(|finding| finding.code == expected_finding
&& finding.severity == crank_import::rest::ImportFindingSeverity::Error),
"{version} {construct} candidate must be blocked: {:?}",
candidate.findings
);
assert!(
ir.coverage.iter().any(|entry| entry.location.pointer
== "/paths/~1probe/get/security/0"
&& entry.disposition == CoverageDisposition::Finding),
"{version} {construct} has no finding coverage"
);
probed(&construct);
}
{
let construct = "security.override_empty";
let override_probe = |path: &str| {
if version == "Swagger 2.0" {
json!({
"swagger":"2.0", "info":{"title":"Security override probe","version":"1"},
"securityDefinitions":{"probe":{"type":"basic"}},
"security":[{"probe":[]}],
"paths":{path:{"get":{"security":[],"operationId":"securityOverride","responses":{"200":{"description":"ok"}}}}}
})
} else {
json!({
"openapi": if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Security override probe","version":"1"},
"servers":[{"url":"https://matrix.example.test"}],
"components":{"securitySchemes":{"probe":{"type":"http","scheme":"basic"}}},
"security":[{"probe":[]}],
"paths":{path:{"get":{"security":[],"operationId":"securityOverride","responses":{"200":{"description":"ok"}}}}}
})
}
};
let source = serde_json::to_string(&override_probe("/override")).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
assert!(
ir.findings
.iter()
.all(|finding| finding.code != "unsupported_security_requirement"),
"explicit empty security override must disable inheritance: {:?}",
ir.findings
);
let preview = preview_from_ir(&ir);
let candidate = &preview.groups[0].operations[0];
assert!(
candidate
.findings
.iter()
.all(|finding| finding.severity
!= crank_import::rest::ImportFindingSeverity::Error),
"overridden operation must remain actionable: {:?}",
candidate.findings
);
probed(construct);
}
{
let construct = "security.mixed_operations";
let mixed_probe = if version == "Swagger 2.0" {
json!({
"swagger":"2.0", "info":{"title":"Mixed security probe","version":"1"},
"securityDefinitions":{"probe":{"type":"basic"}},
"security":[{"probe":[]}],
"paths":{
"/public":{"get":{"security":[],"operationId":"publicProbe","responses":{"200":{"description":"ok"}}}},
"/secured":{"get":{"operationId":"securedProbe","responses":{"200":{"description":"ok"}}}}
}
})
} else {
json!({
"openapi": if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Mixed security probe","version":"1"},
"servers":[{"url":"https://matrix.example.test"}],
"components":{"securitySchemes":{"probe":{"type":"http","scheme":"basic"}}},
"security":[{"probe":[]}],
"paths":{
"/public":{"get":{"security":[],"operationId":"publicProbe","responses":{"200":{"description":"ok"}}}},
"/secured":{"get":{"operationId":"securedProbe","responses":{"200":{"description":"ok"}}}}
}
})
};
let source = serde_json::to_string(&mixed_probe).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
let expected_finding = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap()["expected_finding"]
.as_str()
.unwrap();
let requirements = ir
.findings
.iter()
.filter(|finding| finding.code == expected_finding)
.collect::<Vec<_>>();
assert_eq!(
requirements.len(),
1,
"exactly the inherited operation must be blocked: {:?}",
requirements
);
assert_eq!(
requirements[0].operation_key.as_deref(),
Some("GET /secured"),
"blocker must belong only to the affected candidate"
);
assert_eq!(requirements[0].location.pointer, "/security/0");
let preview = preview_from_ir(&ir);
let mut by_key = std::collections::BTreeMap::new();
for group in &preview.groups {
for candidate in &group.operations {
by_key.insert(candidate.key.clone(), candidate);
}
}
let public = by_key.get("GET /public").expect("public candidate present");
assert!(
public
.findings
.iter()
.all(|finding| finding.severity
!= crank_import::rest::ImportFindingSeverity::Error),
"public operation must stay actionable: {:?}",
public.findings
);
let secured = by_key
.get("GET /secured")
.expect("secured candidate present");
assert!(
secured
.findings
.iter()
.any(|finding| finding.code == expected_finding
&& finding.severity == crank_import::rest::ImportFindingSeverity::Error),
"secured operation must be blocked: {:?}",
secured.findings
);
assert!(
ir.coverage
.iter()
.any(|entry| entry.location.pointer == "/security/0"
&& entry.disposition == CoverageDisposition::Finding),
"mixed probe has no finding coverage"
);
probed(construct);
}
for method in [
"get", "post", "put", "patch", "delete", "head", "options", "trace", "connect",
] {
let construct = format!("http.method.{method}");
let row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap();
let mut path_item = serde_json::Map::new();
path_item.insert(
method.to_owned(),
json!({
"operationId":"methodProbe", "responses":{"200":{"description":"ok"}}
}),
);
let probe = if version == "Swagger 2.0" {
json!({"swagger":"2.0","info":{"title":"Method probe","version":"1"},"paths":{"/probe":path_item,"/normal":{"get":{"operationId":"normalProbe","responses":{"200":{"description":"ok"}}}}}})
} else {
json!({"openapi":if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Method probe","version":"1"},"servers":[{"url":"https://matrix.example.test"}],"paths":{"/probe":path_item,"/normal":{"get":{"operationId":"normalProbe","responses":{"200":{"description":"ok"}}}}}})
};
let source = serde_json::to_string(&probe).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
if row["status"] == "supported" {
assert!(
ir.operations
.iter()
.any(
|operation| serde_json::to_value(operation.method).unwrap().as_str()
== Some(&method.to_ascii_uppercase())
),
"{version} {construct} was not preserved"
);
assert_eq!(row["expected_finding"], "none");
assert_actionable(&ir, &format!("{version} {construct}"));
} else {
let expected_finding = row["expected_finding"].as_str().unwrap();
assert!(
ir.operations
.iter()
.any(|operation| operation.path == "/normal"),
"{version} {construct} must not discard a supported neighbour"
);
assert!(
ir.findings
.iter()
.any(|finding| finding.code == expected_finding
&& finding.severity
== crank_import::rest::ImportFindingSeverity::Error),
"{version} {construct} missing exact finding {expected_finding}: {:?}",
ir.findings
);
assert!(
ir.coverage
.iter()
.any(|entry| entry.construct_id.ends_with(&format!("/{method}"))
&& entry.disposition == CoverageDisposition::Finding),
"{version} {construct} has no finding coverage"
);
}
probed(&construct);
}
for location in ["path", "query", "header", "cookie"] {
let construct = format!("parameter.location.{location}");
let row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap();
let parameter = if version == "Swagger 2.0" {
json!({"name":"probe","in":location,"required":location == "path","type":"string"})
} else {
json!({"name":"probe","in":location,"required":location == "path","schema":{"type":"string"}})
};
let path = if location == "path" {
"/probe/{probe}"
} else {
"/probe"
};
let operation = json!({"operationId":"parameterProbe","parameters":[parameter],"responses":{"200":{"description":"ok"}}});
let probe = if version == "Swagger 2.0" {
json!({"swagger":"2.0","info":{"title":"Parameter probe","version":"1"},"paths":{path:{"get":operation}}})
} else {
json!({"openapi":if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Parameter probe","version":"1"},"servers":[{"url":"https://matrix.example.test"}],"paths":{path:{"get":operation}}})
};
let source = serde_json::to_string(&probe).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
if row["status"] == "supported" {
let parameter = ir.operations[0]
.parameters
.iter()
.find(|parameter| parameter.name == "probe")
.unwrap();
assert_eq!(
serde_json::to_value(parameter.location).unwrap(),
location,
"{version} {construct} location was changed"
);
assert!(
parameter.schema.is_some(),
"{version} {construct} schema was lost"
);
assert_eq!(parameter.required, location == "path");
let preview = preview_from_ir(&ir);
let candidate = &preview.groups[0].operations[0];
let expected_root = match location {
"path" => "$.request.path.",
"query" => "$.request.query.",
"header" => "$.request.headers.",
"cookie" => "$.request.cookies.",
_ => unreachable!(),
};
assert!(
candidate
.draft
.input_mapping
.rules
.iter()
.any(|rule| rule.source == "$.mcp.probe"
&& rule.target.starts_with(expected_root)),
"{version} {construct} input mapping missing {expected_root}: {:?}",
candidate.draft.input_mapping
);
assert_actionable(&ir, &format!("{version} {construct}"));
} else {
let expected_finding = row["expected_finding"].as_str().unwrap();
assert!(
ir.operations[0].findings.iter().any(|finding| finding.code
== expected_finding
&& finding.severity == crank_import::rest::ImportFindingSeverity::Error
&& finding.location.pointer == "/paths/~1probe/get/parameters/0"),
"{version} {construct} missing exact finding {expected_finding}"
);
}
probed(&construct);
}
for media_type in [
"application/json",
"application/x-www-form-urlencoded",
"multipart/form-data",
] {
let construct = format!("request_body.{media_type}");
let row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap();
let operation = if version == "Swagger 2.0" {
let mut operation =
json!({"operationId":"bodyProbe","responses":{"200":{"description":"ok"}}});
operation["consumes"] = json!([media_type]);
if media_type == "application/json" {
operation["parameters"] = json!([{"name":"body","in":"body","required":true,"schema":{"type":"object","properties":{"value":{"type":"string"}}}}]);
} else {
operation["parameters"] =
json!([{"name":"value","in":"formData","required":true,"type":"string"}]);
}
operation
} else {
json!({"operationId":"bodyProbe","requestBody":{"required":true,"content":{
(media_type):{"schema":{"type":"object","properties":{"value":{"type":"string"}}}}
}},"responses":{"200":{"description":"ok"}}})
};
let probe = if version == "Swagger 2.0" {
json!({"swagger":"2.0","info":{"title":"Body probe","version":"1"},"paths":{"/probe":{"post":operation}}})
} else {
json!({"openapi":if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Body probe","version":"1"},"servers":[{"url":"https://matrix.example.test"}],"paths":{"/probe":{"post":operation}}})
};
let source = serde_json::to_string(&probe).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
if row["status"] == "supported" {
let variant = ir.operations[0]
.request_body_variants
.iter()
.find(|variant| variant.content_type == media_type)
.expect("request body variant retained");
assert!(
variant.schema.is_some(),
"{version} {construct} schema was lost: {:?}",
variant
);
assert!(
variant.required,
"{version} {construct} required request body contract was lost: {variant:?}"
);
let preview = preview_from_ir(&ir);
let contract = preview.groups[0].operations[0]
.draft
.target
.request_contract
.as_ref()
.expect("draft request contract");
assert!(contract.body_required);
assert!(
contract
.variants
.iter()
.any(|variant| variant.media_type == media_type)
);
assert_actionable(&ir, &format!("{version} {construct}"));
} else {
let expected_finding = row["expected_finding"].as_str().unwrap();
assert!(
ir.operations[0].findings.iter().any(|finding| finding.code
== expected_finding
&& finding.severity == crank_import::rest::ImportFindingSeverity::Error)
);
}
probed(&construct);
}
for (construct, is_request) in [
("media_type.application_xml.request", true),
("media_type.application_xml.response", false),
] {
let row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap();
let operation = if version == "Swagger 2.0" {
let mut operation = json!({"operationId":"xmlProbe","responses":{"200":{"description":"ok","schema":{"type":"string"}}}});
if is_request {
operation["consumes"] = json!(["application/xml"]);
operation["parameters"] = json!([{"name":"body","in":"body","required":true,"schema":{"type":"string"}}]);
} else {
operation["produces"] = json!(["application/xml"]);
}
operation
} else if is_request {
json!({"operationId":"xmlProbe","requestBody":{"content":{"application/xml":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"ok"}}})
} else {
json!({"operationId":"xmlProbe","responses":{"200":{"description":"ok","content":{"application/xml":{"schema":{"type":"string"}}}}}})
};
let probe = if version == "Swagger 2.0" {
json!({"swagger":"2.0","info":{"title":"XML probe","version":"1"},"paths":{"/probe":{"post":operation}}})
} else {
json!({"openapi":if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"XML probe","version":"1"},"servers":[{"url":"https://matrix.example.test"}],"paths":{"/probe":{"post":operation}}})
};
let source = serde_json::to_string(&probe).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
let expected_finding = row["expected_finding"].as_str().unwrap();
assert_eq!(row["status"], "unsupported");
let expected_pointer = if version == "Swagger 2.0" {
if is_request {
"/paths/~1probe/post/consumes/0"
} else {
"/paths/~1probe/post/produces/0"
}
} else if is_request {
"/paths/~1probe/post/requestBody/content/application~1xml"
} else {
"/paths/~1probe/post/responses/200/content/application~1xml"
};
assert!(
ir.operations[0]
.findings
.iter()
.any(|finding| finding.code == expected_finding
&& finding.severity == crank_import::rest::ImportFindingSeverity::Error
&& finding.location.pointer == expected_pointer),
"{version} {construct} missing exact blocker {expected_finding}: {:?}",
ir.operations[0].findings
);
probed(construct);
}
for composition in ["allOf", "oneOf", "anyOf"] {
let construct = format!("composition.{composition}");
let row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap();
let schema = json!({(composition):[{"type":"object","properties":{"id":{"type":"string"}}},{"type":"object","properties":{"name":{"type":"string"}}}]});
let response = if version == "Swagger 2.0" {
json!({"description":"ok","schema":schema})
} else {
json!({"description":"ok","content":{"application/json":{"schema":schema}}})
};
let probe = if version == "Swagger 2.0" {
json!({"swagger":"2.0","info":{"title":"Composition probe","version":"1"},"paths":{"/probe":{"get":{"operationId":"compositionProbe","responses":{"200":response}}}}})
} else {
json!({"openapi":if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Composition probe","version":"1"},"servers":[{"url":"https://matrix.example.test"}],"paths":{"/probe":{"get":{"operationId":"compositionProbe","responses":{"200":response}}}}})
};
let source = serde_json::to_string(&probe).unwrap();
let ir = normalize(&source).unwrap();
validate_normalized_ir(&ir).unwrap();
assert_eq!(row["status"], "supported");
assert!(ir.operations[0].response_variants[0].schema.as_ref().is_some_and(|schema|
if composition == "allOf" {
matches!(&schema.kind, NormalizedSchemaKind::Object { properties, .. }
if properties.contains_key("id") && properties.contains_key("name"))
} else {
matches!(&schema.kind, NormalizedSchemaKind::Composition { operator, variants }
if operator == composition && variants.len() == 2
&& matches!(&variants[0].kind, NormalizedSchemaKind::Object { properties, .. }
if properties.contains_key("id"))
&& matches!(&variants[1].kind, NormalizedSchemaKind::Object { properties, .. }
if properties.contains_key("name")))
}),
"{version} {construct} composition was not retained: {:?}", ir.operations[0].response_variants);
assert_eq!(row["expected_finding"], "none");
assert_actionable(&ir, &format!("{version} {construct}"));
probed(&construct);
}
for external in [false, true] {
let construct = if external {
"reference.external_allowlisted"
} else {
"reference.local"
};
let row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap();
let reference = if external {
"https://schemas.example.test/root.yaml#/Item"
} else if version == "Swagger 2.0" {
"#/definitions/Item"
} else {
"#/components/schemas/Item"
};
let schema = json!({"$ref":reference});
let response = if version == "Swagger 2.0" {
json!({"description":"ok","schema":schema})
} else {
json!({"description":"ok","content":{"application/json":{"schema":schema}}})
};
let probe = if version == "Swagger 2.0" {
let mut root = json!({"swagger":"2.0","info":{"title":"Reference probe","version":"1"},"paths":{"/probe":{"get":{"operationId":"referenceProbe","responses":{"200":response}}}}});
if !external {
root["definitions"] =
json!({"Item":{"type":"object","properties":{"id":{"type":"string"}}}});
}
root
} else {
let mut root = json!({"openapi":if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Reference probe","version":"1"},"servers":[{"url":"https://matrix.example.test"}],"paths":{"/probe":{"get":{"operationId":"referenceProbe","responses":{"200":response}}}}});
if !external {
root["components"] = json!({"schemas":{"Item":{"type":"object","properties":{"id":{"type":"string"}}}}});
}
root
};
let source = serde_json::to_string(&probe).unwrap();
let ir = if external {
let external_source =
"Item: { type: object, properties: { id: { type: string } } }";
let snapshot = crank_import::rest::ExternalDocumentSnapshot {
canonical_uri: "https://schemas.example.test/root.yaml".to_owned(),
digest: SourceDigest::parse(hex(external_source.as_bytes())).unwrap(),
document: external_source.to_owned(),
};
let digest = SourceDigest::parse(hex(source.as_bytes())).unwrap();
normalize_verified_bundle(
&source,
digest,
&[snapshot],
&NormalizationConfig::default(),
)
.unwrap()
} else {
normalize(&source).unwrap()
};
validate_normalized_ir(&ir).unwrap();
assert_eq!(row["status"], "supported");
assert!(
!ir.reference_graph.edges.is_empty(),
"{version} {construct} did not resolve through a source-backed edge"
);
assert!(
ir.unresolved_references.is_empty(),
"{version} {construct} remains unresolved"
);
assert!(
matches!(
ir.operations[0].response_variants[0].schema.as_ref().map(|schema| &schema.kind),
Some(NormalizedSchemaKind::Object { properties, .. }) if properties.contains_key("id")
),
"{version} {construct} resolved schema was not projected into the operation"
);
assert_actionable(&ir, &format!("{version} {construct}"));
assert_eq!(row["expected_finding"], "none");
probed(construct);
}
for code in 200..300 {
let construct = format!("response.{code}");
let response_row = rows
.iter()
.find(|row| {
row["specification_version"] == version && row["construct_id"] == construct
})
.unwrap_or_else(|| panic!("{version} matrix misses {construct}"));
assert!(
ids.contains(&construct.as_str()),
"{version} matrix misses {construct}"
);
assert_eq!(response_row["status"], "supported");
assert_eq!(response_row["expected_finding"], "none");
let has_body = !matches!(code, 204 | 205);
let source = if version == "Swagger 2.0" {
json!({
"swagger":"2.0", "info":{"title":"Matrix probe","version":"1"},
"paths":{"/probe":{"get":{"operationId":"matrixProbe","responses":{
code.to_string(): if has_body {json!({"description":"success","schema":{"type":"object","properties":{"id":{"type":"string"}}}})} else {json!({"description":"success"})}
}}}}
})
} else {
json!({
"openapi": if version == "OpenAPI 3.0" {"3.0.3"} else {"3.1.0"},
"info":{"title":"Matrix probe","version":"1"},
"servers":[{"url":"https://matrix.example.test"}],
"paths":{"/probe":{"get":{"operationId":"matrixProbe","responses":{
code.to_string(): if has_body {json!({"description":"success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}})} else {json!({"description":"success"})}
}}}}
})
};
let source = serde_json::to_string(&source).unwrap();
let ir = normalize(&source)
.unwrap_or_else(|error| panic!("{version} {construct} probe rejected: {error}"));
validate_normalized_ir(&ir).unwrap_or_else(|error| {
panic!("{version} {construct} probe has invalid ledger: {error}")
});
let response = ir.operations[0]
.response_variants
.iter()
.find(|variant| variant.status_code == code)
.unwrap_or_else(|| panic!("{version} {construct} was not preserved"));
assert_eq!(
response.schema.is_some(),
has_body,
"{version} {construct} body contract differs from 204/205 bodyless response semantics"
);
assert!(
!ir.operations[0]
.findings
.iter()
.any(|finding| finding.severity
== crank_import::rest::ImportFindingSeverity::Error),
"{version} {construct} unexpectedly blocked: {:?}",
ir.operations[0].findings
);
probed(&construct);
}
assert!(
unprobed.is_empty(),
"normative {version} rows lack an executed probe: {unprobed:?}"
);
}
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 00",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/0": {
"get": {
"operationId": "corpusOperation00",
"parameters": [
{
"in": "query",
"name": "p00",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 00",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 01",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/{p01}": {
"post": {
"operationId": "corpusOperation01",
"parameters": [
{
"in": "path",
"name": "p01",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 01",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 02",
"version": "1.0"
},
"paths": {
"/items/2": {
"put": {
"operationId": "corpusOperation02",
"parameters": [
{
"in": "header",
"name": "p02",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 02",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 03",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/3": {
"patch": {
"operationId": "corpusOperation03",
"parameters": [
{
"in": "cookie",
"name": "p03",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 03",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 04",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/4": {
"delete": {
"operationId": "corpusOperation04",
"parameters": [
{
"in": "query",
"name": "p04",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 04",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 05",
"version": "1.0"
},
"paths": {
"/items/{p05}": {
"head": {
"operationId": "corpusOperation05",
"parameters": [
{
"in": "path",
"name": "p05",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 05",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 06",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/6": {
"options": {
"operationId": "corpusOperation06",
"parameters": [
{
"in": "header",
"name": "p06",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 06",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 07",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/7": {
"get": {
"operationId": "corpusOperation07",
"parameters": [
{
"in": "cookie",
"name": "p07",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 07",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 08",
"version": "1.0"
},
"paths": {
"/items/8": {
"post": {
"operationId": "corpusOperation08",
"parameters": [
{
"in": "query",
"name": "p08",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 08",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 09",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/{p09}": {
"put": {
"operationId": "corpusOperation09",
"parameters": [
{
"in": "path",
"name": "p09",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 09",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 10",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/10": {
"patch": {
"operationId": "corpusOperation10",
"parameters": [
{
"in": "header",
"name": "p10",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 10",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 11",
"version": "1.0"
},
"paths": {
"/items/11": {
"delete": {
"operationId": "corpusOperation11",
"parameters": [
{
"in": "header",
"name": "p11",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 11",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 12",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/12": {
"head": {
"operationId": "corpusOperation12",
"parameters": [
{
"in": "query",
"name": "p12",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 12",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 13",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/{p13}": {
"options": {
"operationId": "corpusOperation13",
"parameters": [
{
"in": "path",
"name": "p13",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 13",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 14",
"version": "1.0"
},
"paths": {
"/items/14": {
"get": {
"operationId": "corpusOperation14",
"parameters": [
{
"in": "header",
"name": "p14",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"202": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 14",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 15",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/15": {
"post": {
"operationId": "corpusOperation15",
"parameters": [
{
"in": "cookie",
"name": "p15",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 15",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 16",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/16": {
"put": {
"operationId": "corpusOperation16",
"parameters": [
{
"in": "query",
"name": "p16",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 16",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 17",
"version": "1.0"
},
"paths": {
"/items/{p17}": {
"patch": {
"operationId": "corpusOperation17",
"parameters": [
{
"in": "path",
"name": "p17",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 17",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 18",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/18": {
"delete": {
"operationId": "corpusOperation18",
"parameters": [
{
"in": "header",
"name": "p18",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 18",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 19",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/19": {
"head": {
"operationId": "corpusOperation19",
"parameters": [
{
"in": "cookie",
"name": "p19",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 19",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 20",
"version": "1.0"
},
"paths": {
"/items/20": {
"options": {
"operationId": "corpusOperation20",
"parameters": [
{
"in": "query",
"name": "p20",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 20",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 21",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/{p21}": {
"get": {
"operationId": "corpusOperation21",
"parameters": [
{
"in": "path",
"name": "p21",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 21",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 22",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/22": {
"post": {
"operationId": "corpusOperation22",
"parameters": [
{
"in": "header",
"name": "p22",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 22",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 23",
"version": "1.0"
},
"paths": {
"/items/23": {
"put": {
"operationId": "corpusOperation23",
"parameters": [
{
"in": "header",
"name": "p23",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 23",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 24",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/24": {
"patch": {
"operationId": "corpusOperation24",
"parameters": [
{
"in": "query",
"name": "p24",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 24",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 25",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/{p25}": {
"delete": {
"operationId": "corpusOperation25",
"parameters": [
{
"in": "path",
"name": "p25",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 25",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 26",
"version": "1.0"
},
"paths": {
"/items/26": {
"head": {
"operationId": "corpusOperation26",
"parameters": [
{
"in": "header",
"name": "p26",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"202": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 26",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 27",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/27": {
"options": {
"operationId": "corpusOperation27",
"parameters": [
{
"in": "cookie",
"name": "p27",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 27",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 28",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/28": {
"get": {
"operationId": "corpusOperation28",
"parameters": [
{
"in": "query",
"name": "p28",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 28",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 29",
"version": "1.0"
},
"paths": {
"/items/{p29}": {
"post": {
"operationId": "corpusOperation29",
"parameters": [
{
"in": "path",
"name": "p29",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 29",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 30",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/30": {
"put": {
"operationId": "corpusOperation30",
"parameters": [
{
"in": "header",
"name": "p30",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 30",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 31",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/31": {
"patch": {
"operationId": "corpusOperation31",
"parameters": [
{
"in": "cookie",
"name": "p31",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 31",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 32",
"version": "1.0"
},
"paths": {
"/items/32": {
"delete": {
"operationId": "corpusOperation32",
"parameters": [
{
"in": "query",
"name": "p32",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 32",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 33",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/{p33}": {
"head": {
"operationId": "corpusOperation33",
"parameters": [
{
"in": "path",
"name": "p33",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 33",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 34",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/34": {
"options": {
"operationId": "corpusOperation34",
"parameters": [
{
"in": "header",
"name": "p34",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 34",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 35",
"version": "1.0"
},
"paths": {
"/items/35": {
"get": {
"operationId": "corpusOperation35",
"parameters": [
{
"in": "header",
"name": "p35",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 35",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 36",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/36": {
"post": {
"operationId": "corpusOperation36",
"parameters": [
{
"in": "query",
"name": "p36",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 36",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 37",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/{p37}": {
"put": {
"operationId": "corpusOperation37",
"parameters": [
{
"in": "path",
"name": "p37",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 37",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 38",
"version": "1.0"
},
"paths": {
"/items/38": {
"patch": {
"operationId": "corpusOperation38",
"parameters": [
{
"in": "header",
"name": "p38",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"202": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 38",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 39",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/39": {
"delete": {
"operationId": "corpusOperation39",
"parameters": [
{
"in": "cookie",
"name": "p39",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 39",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 40",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/40": {
"head": {
"operationId": "corpusOperation40",
"parameters": [
{
"in": "query",
"name": "p40",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 40",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 41",
"version": "1.0"
},
"paths": {
"/items/{p41}": {
"options": {
"operationId": "corpusOperation41",
"parameters": [
{
"in": "path",
"name": "p41",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 41",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 42",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/42": {
"get": {
"operationId": "corpusOperation42",
"parameters": [
{
"in": "header",
"name": "p42",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 42",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 43",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/43": {
"post": {
"operationId": "corpusOperation43",
"parameters": [
{
"in": "cookie",
"name": "p43",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 43",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 44",
"version": "1.0"
},
"paths": {
"/items/44": {
"put": {
"operationId": "corpusOperation44",
"parameters": [
{
"in": "query",
"name": "p44",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 44",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,65 @@
{
"info": {
"title": "Synthetic corpus 45",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/{p45}": {
"patch": {
"operationId": "corpusOperation45",
"parameters": [
{
"in": "path",
"name": "p45",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 45",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 46",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/46": {
"delete": {
"operationId": "corpusOperation46",
"parameters": [
{
"in": "header",
"name": "p46",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 46",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,52 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "api.example.test",
"info": {
"title": "Synthetic corpus 47",
"version": "1.0"
},
"paths": {
"/items/47": {
"head": {
"operationId": "corpusOperation47",
"parameters": [
{
"in": "header",
"name": "p47",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "synthetic success",
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"summary": "Synthetic operation 47",
"tags": [
"corpus"
]
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0"
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 48",
"version": "1.0"
},
"openapi": "3.0.3",
"paths": {
"/items/48": {
"options": {
"operationId": "corpusOperation48",
"parameters": [
{
"in": "query",
"name": "p48",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 48",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,50 @@
{
"info": {
"title": "Synthetic corpus 49",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/items/{p49}": {
"get": {
"operationId": "corpusOperation49",
"parameters": [
{
"in": "path",
"name": "p49",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "synthetic success"
}
},
"summary": "Synthetic operation 49",
"tags": [
"corpus"
]
}
}
},
"servers": [
{
"url": "https://api.example.test/v1"
}
]
}
@@ -0,0 +1,67 @@
use crank_import::rest::{NormalizationConfig, SourceDigest, normalize_verified_document};
use serde_json::{Value, json};
use sha2::{Digest, Sha256};
#[test]
fn path_item_parameters_are_inherited_and_operation_parameters_override_by_name_and_location() {
for version in ["3.0.3", "3.1.0", "2.0"] {
let parameter = |name: &str, location: &str, kind: &str| {
if version == "2.0" {
json!({"name":name,"in":location,"required":location == "path","type":kind})
} else {
json!({"name":name,"in":location,"required":location == "path","schema":{"type":kind}})
}
};
let mut document = if version == "2.0" {
json!({"swagger":"2.0","info":{"title":"Path parameters","version":"1"}})
} else {
json!({"openapi":version,"info":{"title":"Path parameters","version":"1"},"servers":[{"url":"https://example.test"}]})
};
document["paths"] = json!({
"/items/{id}": {
"parameters": [parameter("id", "path", "string"), parameter("filter", "query", "string")],
"get": {"operationId":"readItem","responses":{"200":{"description":"ok"}}},
"post": {"operationId":"updateItem","parameters":[parameter("filter", "query", "integer")],
"responses":{"200":{"description":"ok"}}}
}
});
let source = serde_json::to_string(&document).unwrap();
let digest =
SourceDigest::parse(format!("{:x}", Sha256::digest(source.as_bytes()))).unwrap();
let ir =
normalize_verified_document(&source, digest, &NormalizationConfig::default()).unwrap();
for (key, expected_kind) in [
("GET /items/{id}", "string"),
("POST /items/{id}", "integer"),
] {
let operation = ir
.operations
.iter()
.find(|operation| operation.key == key)
.unwrap();
assert_eq!(
operation.parameters.len(),
2,
"{version} {key}: {:?}",
operation.parameters
);
let id = operation
.parameters
.iter()
.find(|parameter| parameter.name == "id")
.unwrap();
assert_eq!(id.location, crank_import::rest::RestParameterLocation::Path);
let filter = operation
.parameters
.iter()
.find(|parameter| parameter.name == "filter")
.unwrap();
let schema = serde_json::to_value(filter.schema.as_ref().unwrap()).unwrap();
assert_eq!(
schema["kind"]["scalar_type"],
Value::String(expected_kind.to_owned()),
"{version} {key}: {schema}"
);
}
}
}
+689
View File
@@ -0,0 +1,689 @@
//! Focused regressions for the effective security scope
//! (story 2.14 review findings):
//!
//! - an OR array with an empty requirement object `{}` exposes the public
//! alternative and must keep the affected operation actionable, without
//! touching other operations;
//! - a single non-empty requirement must remain a blocker (regression anchor);
//! - malformed security shapes (non-array value, non-object array item) must
//! produce a source-located operation blocker instead of silently
//! disappearing.
use crank_import::rest::{
ImportFindingSeverity, ImportOperationCandidate, NormalizationConfig, NormalizedFinding,
SourceDigest, normalize_verified_document, preview_from_ir,
};
use serde_json::{Value, json};
use sha2::{Digest, Sha256};
fn hex(bytes: impl AsRef<[u8]>) -> String {
Sha256::digest(bytes)
.iter()
.map(|b| format!("{b:02x}"))
.collect()
}
fn run(
source: &Value,
) -> (
crank_import::rest::NormalizedIr,
crank_import::rest::ImportPreview,
) {
let text = serde_json::to_string(source).unwrap();
let source_digest = SourceDigest::parse(hex(text.as_bytes())).expect("sha256 is valid");
let ir = normalize_verified_document(&text, source_digest, &NormalizationConfig::default())
.expect("security-scope fixture parses");
let preview = preview_from_ir(&ir);
(ir, preview)
}
fn candidate<'a>(
preview: &'a crank_import::rest::ImportPreview,
key: &str,
) -> &'a ImportOperationCandidate {
preview
.groups
.iter()
.flat_map(|group| &group.operations)
.find(|candidate| candidate.key == key)
.unwrap_or_else(|| panic!("{key} candidate missing in {preview:?}"))
}
fn security_findings<'a>(
findings: &'a [NormalizedFinding],
key: &str,
) -> Vec<&'a NormalizedFinding> {
findings
.iter()
.filter(|finding| {
finding.code == "unsupported_security_requirement"
&& finding.severity == ImportFindingSeverity::Error
&& finding.operation_key.as_deref() == Some(key)
})
.collect()
}
#[test]
fn empty_or_alternative_makes_the_operation_public() {
// Document-level OR array: [{"probe": []}, {}] offers an explicit public
// alternative, so the inherited operation must stay actionable.
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"components": {
"securitySchemes": { "probe": { "type": "http", "scheme": "basic" } }
},
"security": [{ "probe": [] }, {}],
"paths": {
"/public": { "get": { "operationId": "publicInherit",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, preview) = run(&source);
let public = candidate(&preview, "GET /public");
assert!(
public
.findings
.iter()
.all(|finding| finding.severity != ImportFindingSeverity::Error),
"empty OR alternative must keep the inherited operation public: {:?}",
public.findings
);
assert!(
security_findings(&ir.findings, "GET /public").is_empty(),
"no security blocker may belong to the public operation: {:?}",
ir.findings
);
assert!(
preview.findings.iter().all(|finding| {
!(finding.severity == ImportFindingSeverity::Error && finding.operation_key.is_none())
}),
"no document-global blocker may be produced: {preview:?}"
);
}
#[test]
fn or_alternative_keeps_only_that_operation_public() {
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"components": {
"securitySchemes": { "probe": { "type": "http", "scheme": "basic" } }
},
"paths": {
"/open": { "get": { "security": [{ "probe": [] }, {}], "operationId": "openOp",
"responses": { "200": { "description": "ok" } } } },
"/closed": { "get": { "security": [{ "probe": [] }], "operationId": "closedOp",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, preview) = run(&source);
let open = candidate(&preview, "GET /open");
assert!(
open.findings
.iter()
.all(|finding| { finding.severity != ImportFindingSeverity::Error }),
"operation with a public OR alternative must stay actionable: {:?}",
open.findings
);
let closed = candidate(&preview, "GET /closed");
assert!(
closed.findings.iter().any(|finding| {
finding.code == "unsupported_security_requirement"
&& finding.severity == ImportFindingSeverity::Error
}),
"non-empty requirement must still block the candidate: {:?}",
closed.findings
);
let ir_blocker = security_findings(&ir.findings, "GET /closed")[0];
assert_eq!(
ir_blocker.location.pointer, "/paths/~1closed/get/security/0",
"blocker must point at the local requirement: {:?}",
ir_blocker
);
assert!(
security_findings(&ir.findings, "GET /closed").len() == 1,
"exactly one blocker for the closed operation: {:?}",
ir.findings
);
assert!(
security_findings(&ir.findings, "GET /open").is_empty(),
"the public alternative must not leak into the open operation: {:?}",
ir.findings
);
}
#[test]
fn nonempty_requirement_still_blocks_with_auth_profile_contract() {
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"components": {
"securitySchemes": { "probe": { "type": "http", "scheme": "basic" } }
},
"security": [{ "probe": [] }],
"paths": {
"/secured": { "get": { "operationId": "securedOp",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, preview) = run(&source);
let blocker = security_findings(&ir.findings, "GET /secured")
.into_iter()
.next()
.cloned()
.unwrap_or_else(|| panic!("non-empty requirement must block: {:?}", ir.findings));
assert_eq!(blocker.location.pointer, "/security/0");
assert_eq!(
blocker.message,
"Требование безопасности должно быть привязано к настроенному Auth Profile перед публикацией этой операции; остальные операции не блокируются.",
"Auth Profile contract message must be stable"
);
let secured = candidate(&preview, "GET /secured");
assert!(
secured.findings.iter().any(|finding| {
finding.code == "unsupported_security_requirement"
&& finding.severity == ImportFindingSeverity::Error
}),
"blocked candidate must expose the blocker: {:?}",
secured.findings
);
}
#[test]
fn malformed_security_shapes_block_the_affected_operation() {
// Non-array security value: both inherited operations are affected.
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"security": "basic",
"paths": {
"/one": { "get": { "operationId": "oneOp",
"responses": { "200": { "description": "ok" } } } },
"/two": { "get": { "operationId": "twoOp",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, preview) = run(&source);
for key in ["GET /one", "GET /two"] {
let blocker = security_findings(&ir.findings, key)
.into_iter()
.next()
.cloned()
.unwrap_or_else(|| panic!("non-array security must block {key}: {:?}", ir.findings));
assert_eq!(
blocker.location.pointer, "/security",
"blocker must point at the malformed root security: {:?}",
blocker
);
assert!(
candidate(&preview, key).findings.iter().any(|finding| {
finding.code == "unsupported_security_requirement"
&& finding.severity == ImportFindingSeverity::Error
}),
"{key} candidate must be blocked"
);
}
// Non-object array item: the item pointer must be preserved.
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"security": ["basic"],
"paths": {
"/one": { "get": { "operationId": "oneOp",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, _) = run(&source);
let blocker = security_findings(&ir.findings, "GET /one")
.into_iter()
.next()
.cloned()
.unwrap_or_else(|| panic!("non-object security item must block: {:?}", ir.findings));
assert_eq!(
blocker.location.pointer, "/security/0",
"blocker must point at the malformed item: {:?}",
blocker
);
// Malformed operation-level security must not affect the neighbour.
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"paths": {
"/bad": { "get": { "security": "basic", "operationId": "badOp",
"responses": { "200": { "description": "ok" } } } },
"/fine": { "get": { "operationId": "fineOp",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, preview) = run(&source);
let blocker = security_findings(&ir.findings, "GET /bad")
.into_iter()
.next()
.cloned()
.unwrap_or_else(|| panic!("malformed local security must block: {:?}", ir.findings));
assert_eq!(
blocker.location.pointer, "/paths/~1bad/get/security",
"blocker must point at the malformed local security: {:?}",
blocker
);
assert!(
security_findings(&ir.findings, "GET /fine").is_empty(),
"the neighbour operation must not inherit a local defect: {:?}",
ir.findings
);
assert!(
candidate(&preview, "GET /fine")
.findings
.iter()
.all(|finding| finding.severity != ImportFindingSeverity::Error),
"neighbour operation must stay actionable"
);
}
#[test]
fn empty_alternative_needs_a_well_formed_array() {
// A malformed item in the same array invalidates the public
// alternative: every alternative is reported, and the operation
// stays blocked instead of silently becoming public.
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"components": {
"securitySchemes": { "probe": { "type": "http", "scheme": "basic" } }
},
"security": [{ "probe": [] }, {}, "basic"],
"paths": {
"/mixed": { "get": { "operationId": "mixedOp",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, preview) = run(&source);
let at_item = |pointer: &str| {
ir.findings
.iter()
.find(|finding| {
finding.code == "unsupported_security_requirement"
&& finding.operation_key.as_deref() == Some("GET /mixed")
&& finding.location.pointer == pointer
})
.unwrap_or_else(|| panic!("blocker at {pointer} missing: {:?}", ir.findings))
};
let secured = at_item("/security/0");
assert_eq!(
secured.message,
"Требование безопасности должно быть привязано к настроенному Auth Profile перед публикацией этой операции; остальные операции не блокируются."
);
let malformed = at_item("/security/2");
assert_eq!(
malformed.message,
"security содержит альтернативу без объекта требований: формат не поддерживается, операция не публикуется."
);
assert!(
candidate(&preview, "GET /mixed")
.findings
.iter()
.any(|finding| finding.severity == ImportFindingSeverity::Error),
"the operation must not become public because of a malformed sibling: {preview:?}"
);
}
fn security_fixture_31() -> serde_json::Map<String, Value> {
security_fixture_openapi("3.1.0")
}
#[test]
fn object_instead_of_security_array_has_scoped_coverage() {
for version in ["3.0.3", "3.1.0", "2.0"] {
for local in [false, true] {
let mut fixture = if version == "2.0" {
security_fixture_swagger2()
} else {
security_fixture_openapi(version)
};
if !local {
fixture.insert("security".to_owned(), json!({}));
}
fixture.insert(
"paths".to_owned(),
json!({
"/bad": get200("badObject", local.then(|| json!({}))),
"/public": get200("publicObject", Some(json!([])))
}),
);
let (ir, preview) = run(&Value::Object(fixture));
let expected = if local {
"/paths/~1bad/get/security"
} else {
"/security"
};
let blocker = security_findings(&ir.findings, "GET /bad");
assert_eq!(blocker.len(), 1, "{version} {local}: {:?}", ir.findings);
assert_eq!(blocker[0].location.pointer, expected);
assert!(security_findings(&ir.findings, "GET /public").is_empty());
assert!(
candidate(&preview, "GET /public")
.findings
.iter()
.all(|finding| finding.severity != ImportFindingSeverity::Error)
);
crank_import::rest::validate_normalized_ir(&ir).unwrap();
}
}
}
fn security_fixture_openapi(version: &str) -> serde_json::Map<String, Value> {
let mut fixture = serde_json::Map::new();
fixture.insert("openapi".to_owned(), json!(version));
fixture.insert(
"info".to_owned(),
json!({ "title": "Security scope regression", "version": "1" }),
);
fixture.insert(
"servers".to_owned(),
json!([{ "url": "https://security-scope.example.test" }]),
);
fixture
}
fn security_fixture_swagger2() -> serde_json::Map<String, Value> {
let mut fixture = serde_json::Map::new();
fixture.insert("swagger".to_owned(), json!("2.0"));
fixture.insert(
"info".to_owned(),
json!({ "title": "Security scope regression" }),
);
fixture.insert("host".to_owned(), json!("security-scope.example.test"));
fixture.insert("schemes".to_owned(), json!(["https"]));
fixture
}
fn get200(operation_id: &str, security: Option<Value>) -> Value {
let mut get = serde_json::Map::from_iter([
("operationId".to_owned(), json!(operation_id)),
(
"responses".to_owned(),
json!({ "200": { "description": "ok" } }),
),
]);
if let Some(security) = security {
get.insert("security".to_owned(), security);
}
let mut path_item = serde_json::Map::new();
path_item.insert("get".to_owned(), Value::Object(get));
Value::Object(path_item)
}
#[test]
fn openapi_31_non_array_root_security_blocks_inherited_operations() {
let mut fixture = security_fixture_31();
fixture.insert("security".to_owned(), json!("basic"));
fixture.insert(
"paths".to_owned(),
json!({
"/one": get200("oneOp31", None),
"/two": get200("twoOp31", None)
}),
);
let (ir, preview) = run(&Value::Object(fixture));
for key in ["GET /one", "GET /two"] {
let blockers = security_findings(&ir.findings, key);
assert_eq!(
blockers.len(),
1,
"exactly one blocker for {key}: {:?}",
ir.findings
);
let blocker = &blockers[0];
assert_eq!(
blocker.code, "unsupported_security_requirement",
"stable finding code: {blocker:?}"
);
assert_eq!(
blocker.severity,
ImportFindingSeverity::Error,
"stable finding severity: {blocker:?}"
);
assert_eq!(
blocker.location.pointer, "/security",
"blocker must point at the malformed root security: {blocker:?}"
);
assert!(
candidate(&preview, key).findings.iter().any(|finding| {
finding.code == "unsupported_security_requirement"
&& finding.severity == ImportFindingSeverity::Error
}),
"{key} candidate must be blocked"
);
}
}
#[test]
fn openapi_31_malformed_local_security_affects_only_that_operation() {
let mut fixture = security_fixture_31();
// A well-formed root requirement proves priority: the malformed local
// security wins for /bad (no root blocker may be added), while /public
// relies on an explicit empty override to stay public.
fixture.insert("security".to_owned(), json!([{ "probe": [] }]));
fixture.insert(
"paths".to_owned(),
json!({
"/bad": get200("badOp31", Some(json!("basic"))),
"/public": get200("publicOp31", Some(json!([])))
}),
);
let (ir, preview) = run(&Value::Object(fixture));
let blockers = security_findings(&ir.findings, "GET /bad");
assert_eq!(blockers.len(), 1, "exactly one blocker: {:?}", ir.findings);
assert_eq!(
blockers[0].code, "unsupported_security_requirement",
"stable finding code"
);
assert_eq!(
blockers[0].severity,
ImportFindingSeverity::Error,
"stable finding severity"
);
assert_eq!(
blockers[0].location.pointer, "/paths/~1bad/get/security",
"blocker must point at the malformed local security: {:?}",
blockers[0]
);
assert!(
security_findings(&ir.findings, "GET /public").is_empty(),
"the public neighbour must not inherit a local defect: {:?}",
ir.findings
);
assert!(
candidate(&preview, "GET /public")
.findings
.iter()
.all(|finding| finding.severity != ImportFindingSeverity::Error),
"public neighbour must stay actionable: {preview:?}"
);
}
#[test]
fn openapi_31_public_alternative_with_malformed_sibling_does_not_go_public() {
let mut fixture = security_fixture_31();
fixture.insert("security".to_owned(), json!([{}, "basic"]));
fixture.insert(
"paths".to_owned(),
json!({ "/mixed": get200("mixedOp31", None) }),
);
let (ir, preview) = run(&Value::Object(fixture));
let blockers = security_findings(&ir.findings, "GET /mixed");
assert_eq!(
blockers.len(),
1,
"only the malformed sibling blocks: {:?}",
ir.findings
);
assert_eq!(
blockers[0].location.pointer, "/security/1",
"blocker must point at the non-object item: {:?}",
blockers[0]
);
assert_eq!(
blockers[0].message,
"security содержит альтернативу без объекта требований: формат не поддерживается, операция не публикуется."
);
assert!(
candidate(&preview, "GET /mixed")
.findings
.iter()
.any(|finding| finding.severity == ImportFindingSeverity::Error),
"the operation must not become public because of a malformed sibling: {preview:?}"
);
}
#[test]
fn swagger2_non_array_root_security_blocks_inherited_operations() {
let mut fixture = security_fixture_swagger2();
fixture.insert("security".to_owned(), json!("apikey"));
fixture.insert(
"paths".to_owned(),
json!({
"/one": get200("oneOpS2", None),
"/two": get200("twoOpS2", None)
}),
);
let (ir, preview) = run(&Value::Object(fixture));
for key in ["GET /one", "GET /two"] {
let blockers = security_findings(&ir.findings, key);
assert_eq!(
blockers.len(),
1,
"exactly one blocker for {key}: {:?}",
ir.findings
);
let blocker = &blockers[0];
assert_eq!(
blocker.code, "unsupported_security_requirement",
"stable finding code: {blocker:?}"
);
assert_eq!(
blocker.severity,
ImportFindingSeverity::Error,
"stable finding severity: {blocker:?}"
);
assert_eq!(
blocker.location.pointer, "/security",
"blocker must point at the malformed root security: {blocker:?}"
);
assert!(
candidate(&preview, key).findings.iter().any(|finding| {
finding.code == "unsupported_security_requirement"
&& finding.severity == ImportFindingSeverity::Error
}),
"{key} candidate must be blocked"
);
}
}
#[test]
fn swagger2_malformed_local_security_affects_only_that_operation() {
let mut fixture = security_fixture_swagger2();
// A well-formed root requirement proves priority: the malformed local
// security wins for /bad (no root blocker may be added), while /public
// relies on an explicit empty override to stay public.
fixture.insert("security".to_owned(), json!([{ "apiKey": [] }]));
fixture.insert(
"paths".to_owned(),
json!({
"/bad": get200("badOpS2", Some(json!("apikey"))),
"/public": get200("publicOpS2", Some(json!([])))
}),
);
let (ir, preview) = run(&Value::Object(fixture));
let blockers = security_findings(&ir.findings, "GET /bad");
assert_eq!(blockers.len(), 1, "exactly one blocker: {:?}", ir.findings);
assert_eq!(blockers[0].code, "unsupported_security_requirement");
assert_eq!(blockers[0].severity, ImportFindingSeverity::Error);
assert_eq!(
blockers[0].location.pointer, "/paths/~1bad/get/security",
"blocker must point at the malformed local security: {:?}",
blockers[0]
);
assert!(
security_findings(&ir.findings, "GET /public").is_empty(),
"the public neighbour must not inherit a local defect: {:?}",
ir.findings
);
assert!(
candidate(&preview, "GET /public")
.findings
.iter()
.all(|finding| finding.severity != ImportFindingSeverity::Error),
"public neighbour must stay actionable: {preview:?}"
);
}
#[test]
fn swagger2_public_alternative_with_malformed_sibling_does_not_go_public() {
let mut fixture = security_fixture_swagger2();
fixture.insert("security".to_owned(), json!([{}, "apikey"]));
fixture.insert(
"paths".to_owned(),
json!({ "/mixed": get200("mixedOpS2", None) }),
);
let (ir, preview) = run(&Value::Object(fixture));
let blockers = security_findings(&ir.findings, "GET /mixed");
assert_eq!(
blockers.len(),
1,
"only the malformed sibling blocks: {:?}",
ir.findings
);
assert_eq!(
blockers[0].location.pointer, "/security/1",
"blocker must point at the non-object item: {:?}",
blockers[0]
);
assert_eq!(
blockers[0].message,
"security содержит альтернативу без объекта требований: формат не поддерживается, операция не публикуется."
);
assert!(
candidate(&preview, "GET /mixed")
.findings
.iter()
.any(|finding| finding.severity == ImportFindingSeverity::Error),
"the operation must not become public because of a malformed sibling: {preview:?}"
);
}
#[test]
fn empty_security_array_stays_public() {
let source = json!({
"openapi": "3.0.3",
"info": { "title": "Security scope regression", "version": "1" },
"servers": [{ "url": "https://security-scope.example.test" }],
"security": [{ "probe": [] }],
"paths": {
"/public": { "get": { "security": [], "operationId": "publicOp",
"responses": { "200": { "description": "ok" } } } }
}
});
let (ir, preview) = run(&source);
assert!(
security_findings(&ir.findings, "GET /public").is_empty(),
"explicit empty override must stay public: {:?}",
ir.findings
);
assert!(
candidate(&preview, "GET /public")
.findings
.iter()
.all(|finding| finding.severity != ImportFindingSeverity::Error),
"overridden operation must remain actionable"
);
}
File diff suppressed because it is too large. Load diff