Skip to content

Expose governance_scope/crypto_enforced in evidence, harden normalization, and include governance flags in run summary - #277

Merged
SDL-HQ merged 1 commit into
devfrom
codex/create-phase-1-implementation-plan
Jun 24, 2026
Merged

Expose governance_scope/crypto_enforced in evidence, harden normalization, and include governance flags in run summary#277
SDL-HQ merged 1 commit into
devfrom
codex/create-phase-1-implementation-plan

Conversation

@SDL-HQ

@SDL-HQ SDL-HQ commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Ensure governance metadata is captured and verifiable in certificates and evidence artifacts for SIR v2.2 semantics.
  • Harden obfuscation/normalization to detect additional encoded attack markers (hex markers and more base64 gate phrases).
  • Surface policy flags and observed governance context in run summaries so generated certificates and downstream tooling can rely on the governance state.

Description

  • Added governance_scope and crypto_enforced to the evidence contract schema in spec/evidence_contract.v1.json and included them in generated certificates in tools/generate_certificate.py.
  • Extended normalization in src/sir_firewall/core.py to recover additional base64 gate keywords and to decode bounded hex: markers and \xNN escape sequences while avoiding decoding arbitrary hex runs.
  • Populated governance_context in validate_sir with default governance_scope and crypto_enforced fields and allowed pack identity to enrich that context.
  • Updated red_team_suite.py to observe governance_context from validate_sir, compute summary_flags, and include governance_scope and crypto_enforced in the run summary JSON.
  • Added release notes docs/release-notes-2.2.md describing highlights and semantics changes.
  • Added and adjusted unit tests in tests/test_normalization_hardening.py and tests/test_pack_binding.py to cover hex decoding, hex-escape decoding, base64 gating, and summary/certificate flag behavior, and updated imports/mocks to ensure load_domain_pack is used consistently.

Testing

  • Ran unit tests with pytest -q targeting the changed modules, including tests/test_normalization_hardening.py and tests/test_pack_binding.py, and they passed.
  • Verified red_team_suite produces a proofs/run_summary.json containing flags, governance_scope, and crypto_enforced in test scenarios via the updated tests.
  • No failing automated tests were observed for the modified code paths.

Codex Task

@SDL-HQ
SDL-HQ merged commit e51e056 into dev Jun 24, 2026
1 check passed
@SDL-HQ
SDL-HQ deleted the codex/create-phase-1-implementation-plan branch June 24, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant