Documentation
¶
Overview ¶
Package workflowpolicy 提供 release 与 native evidence verifier 共用的 YAML AST 安全策略。
Index ¶
- func ContainsSecretReference(node *yaml.Node) bool
- func HasExactMappingKeys(mapping *yaml.Node, keys ...string) bool
- func MappingValue(mapping *yaml.Node, key string) (*yaml.Node, bool)
- func PinnedRustToolchain(target string) (string, bool)
- func RejectAmbiguousYAML(node *yaml.Node) error
- func RequireScalar(mapping *yaml.Node, key, want string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsSecretReference ¶
ContainsSecretReference 递归检查任一 scalar 是否引用 GitHub secrets context。
func HasExactMappingKeys ¶
HasExactMappingKeys 判断 mapping 是否恰好包含给定 allowlist,顺序不影响结果。
func MappingValue ¶
MappingValue 返回 mapping 中指定 key 的值;调用方须先通过 RejectAmbiguousYAML 排除重复键,确保返回首个值不会掩盖歧义。
func PinnedRustToolchain ¶
PinnedRustToolchain 返回 release 与 native evidence 共同审计的目标工具链。 staticlib 的字节身份包含 rustc,因此未知目标必须 fail closed。
func RejectAmbiguousYAML ¶
RejectAmbiguousYAML 在 verifier 读取字段前拒绝有歧义的 YAML 构造。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.