Skip to content

fix(policy): treat unreadable security level as unknown - #5

Merged
plusky merged 1 commit into
mainfrom
fix/security-level-unknown
Aug 8, 2026
Merged

fix(policy): treat unreadable security level as unknown#5
plusky merged 1 commit into
mainfrom
fix/security-level-unknown

Conversation

@plusky

@plusky plusky commented Aug 8, 2026

Copy link
Copy Markdown
Owner

IssueMeta::from_jira_issue collapsed "no security level" and "security level present but unreadable" into one None, and has_security_level then treated both as absence — so an embargoed issue whose security object arrived without a readable name could satisfy has_security_level = false and be allowed. That is the fail-open hazard DESIGN.md's visibility section exists to prevent, and it contradicts I4's rule that unreadable metadata never yields more access than readable metadata would.

The parsed security level is now three-state — absent / present(name) / unreadable. Absent still means "no level set"; unreadable is Unknown to the matcher, which denies whenever the rule is consulted (I4). The unknown branch no longer depends on project being unknown. DESIGN.md's visibility section records the three-way distinction.

Invariants: I4, DESIGN.md visibility semantics; strictly tightening (I9-compatible).

Tests: matcher unit tests pin all three states, including the allow-rule-denies-unreadable case; confirmed to fail against the unfixed code.

Process: AI-assisted — implemented and independently adversarially reviewed against docs/DESIGN.md (verdict: approve, with an empirical pre-fix-failure check). Full verification suite green at the commit.

Parse the Jira security field three-valued (SecurityLevel: Absent /
Present / Unreadable) instead of Option<String>, so a security object
without a readable name no longer matches has_security_level = false.
Unreadable is Unknown independent of the project being known and denies
when consulted (I4, DESIGN.md visibility semantics). Tightens behavior on
deployments returning nameless security objects (I9 direction).
@plusky plusky added security Guard, key custody, or disclosure surface ai-assisted Found or drafted with AI assistance; claims verified against source, review independently labels Aug 8, 2026
@plusky
plusky enabled auto-merge (rebase) August 8, 2026 19:39
@plusky
plusky merged commit 25b58f4 into main Aug 8, 2026
11 checks passed
@plusky
plusky deleted the fix/security-level-unknown branch August 8, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Found or drafted with AI assistance; claims verified against source, review independently security Guard, key custody, or disclosure surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant