File size: 3,961 Bytes
ddf04fa
1
2
{"id": "swe_rl_cybersecurity_task_02", "benchmark": "cyber-operations", "family": "executable", "task_version": 2, "prompt": "We are seeing the mesh certificate validator accept unsafe chains once a hierarchy gets deeper, an intermediate is cross-signed, or revocation data is partitioned. Please harden PathValidationEngine.validate so it evaluates complete candidate paths to an installed CA trust anchor and accepts a certificate only when at least one whole path passes. Discover viable issuers by subject DN and, when present, AKID/SKID; use the existing ca_issuers AIA lookup when an intermediate is not local; prevent cycles; and backtrack when one branch fails signature, validity, CA/key-usage, name, policy, or revocation checks. Apply path_len_constraint with RFC 5280 semantics, including the treatment of self-issued intermediates.\n\nName constraints need to accumulate from the trust anchor through every intermediate and apply to every subordinate CA and leaf. Each ancestor's permitted subtrees add another condition, while any excluded match rejects that path. DNS comparisons must be case-insensitive and respect label boundaries. IP SAN values may be IPv4 or IPv6 hosts or CIDR networks and must use real address or subnet containment. URI comparisons should treat scheme and authority case-insensitively and respect path-segment boundaries. If an end-entity certificate has no SAN, enforce DNS constraints against its subject CN.\n\nProcess certificate policies across the full path. Preserve transitive and one-to-many mappings, reject mappings on an intermediate with no certificate-policies extension and mappings to or from anyPolicy, and honor explicit-policy, policy-mapping, and any-policy inhibit state from both the validation configuration and the certificates, including their skip counters. An inhibited critical mapping must invalidate that path. When explicit policy is required, the surviving tree must reach the leaf and agree with the initial policy set; return the accepted set in authorities_constrained_policies.\n\nTreat CRL state as scoped by issuer DN and AKID. Reject any non-increasing CRL number for that scope even when the reason mask changes. A delta CRL needs a registered base and must be newer than it. New base partitions must replace superseded historical state, and only current partitions may contribute reason coverage. Preserve the existing no-CRL behavior, but once matching CRL state exists its active partitions must jointly cover ALL_REASONS or validation must fail closed. Stored revocations take effect only once their revocation date is reached; correctly scoped indirect entries must be enforced; and a delta REMOVE_FROM_CRL must release only the matching hold in the same issuer/key scope without affecting another CA that happens to use the same DN or serial.\n\nContinue rejecting unhandled critical OIDs unless they are explicitly allowed. Trust-store mutations must invalidate cached validation decisions through the store epoch, while repeated identical validations and clear_cache retain their established behavior. Keep the public models and method signatures, deterministic crypto helpers, JSON persistence, store operations, result shape and useful errors, and ordinary direct and two-tier validation working as they do now.", "patch_policy": {"allowed_paths": ["src/**"], "forbidden_paths": ["tests/**", "requirements.lock", "pyproject.toml"]}, "manifest_profile": "python_standard_1m_v0.1", "manifest_scoring_policy": null, "image_kind": "swe", "calibrated_hidden_total": 60, "files": {"manifest.yaml": "e92fe8ed5135302bc2f370dce4af45de3322d9b65befb7b33c92823c8e41d740", "repository.zip": "1e14841c5546682e9bbbd6886b15105a172a0aacd9bf945e8393aef62a0c1898", "hidden_tests.zip": "c1604193fbfea16d1be7eb6eb4139e8d6748dad13c6f63a426d43433fb747690", "gold.diff": "0a482685a0754709d77ead55d03d59a4a7e014ee01415f6ab46aa7b8ce5262ba"}, "reference_revision": "samples-cache-policy-flags-v1"}