Home / Docs / Diagnostics
U3024: Call into a boundary module from which a release is reachable
A call goes into a boundary module, and a release is reachable from it.
Why Una rejects it
In edition 0.3, a boundary module (ADR 0093) never declassifies. A call into a boundary, from which a release is reachable, is an error: a call of a policy (spec/07 §5), through the callee's body, the functions it calls, the handlers it may run, and the functional arguments granted at the call. The primary span is the call, and the related span is the release.
Releases stay in the trusted modules (spec/07 §6), and a boundary module is never one of them. A vendored library or a plug-in that lowers a label would release information with the consumer's authority, outside the code the consumer trusts.
How to fix it
The repair is to move the release into a trusted module of the consumer, before or after the call into the boundary. una fix never applies one.
The repair at a glance
module demo.vendor
- import demo.release (reveal)
-
- pub count(n: secret Int) -> Int = reveal(n) + 1
+ pub count(n: Int) -> Int = n + 1 module demo.app
+ import demo.release (reveal)
import demo.vendor (count)
- pub total(n: secret Int) -> Int = count(n)
+ pub total(n: secret Int) -> Int = count(reveal(n))Failing example
[package]
name = "demo"
version = "0.1.0"
edition = "0.3"
[boundaries]
"demo.vendor" = []
[trusted]
modules = ["demo.release"]trusted module demo.release
pub policy reveal
from secret Int
to public Int
via open
purpose "count"
owner ops
open(n: secret Int) -> public Int = nmodule demo.vendor
import demo.release (reveal)
pub count(n: secret Int) -> Int = reveal(n) + 1module demo.app
import demo.vendor (count)
pub total(n: secret Int) -> Int = count(n)Fixed example
[package]
name = "demo"
version = "0.1.0"
edition = "0.3"
[boundaries]
"demo.vendor" = []
[trusted]
modules = ["demo.release"]trusted module demo.release
pub policy reveal
from secret Int
to public Int
via open
purpose "count"
owner ops
open(n: secret Int) -> public Int = nmodule demo.vendor
pub count(n: Int) -> Int = n + 1module demo.app
import demo.release (reveal)
import demo.vendor (count)
pub total(n: secret Int) -> Int = count(reveal(n))