workflowpolicy

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package workflowpolicy 提供 release 与 native evidence verifier 共用的 YAML AST 安全策略。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsSecretReference

func ContainsSecretReference(node *yaml.Node) bool

ContainsSecretReference 递归检查任一 scalar 是否引用 GitHub secrets context。

func HasExactMappingKeys

func HasExactMappingKeys(mapping *yaml.Node, keys ...string) bool

HasExactMappingKeys 判断 mapping 是否恰好包含给定 allowlist,顺序不影响结果。

func MappingValue

func MappingValue(mapping *yaml.Node, key string) (*yaml.Node, bool)

MappingValue 返回 mapping 中指定 key 的值;调用方须先通过 RejectAmbiguousYAML 排除重复键,确保返回首个值不会掩盖歧义。

func PinnedRustToolchain

func PinnedRustToolchain(target string) (string, bool)

PinnedRustToolchain 返回 release 与 native evidence 共同审计的目标工具链。 staticlib 的字节身份包含 rustc,因此未知目标必须 fail closed。

func RejectAmbiguousYAML

func RejectAmbiguousYAML(node *yaml.Node) error

RejectAmbiguousYAML 在 verifier 读取字段前拒绝有歧义的 YAML 构造。

func RequireScalar

func RequireScalar(mapping *yaml.Node, key, want string) error

RequireScalar 要求 mapping 的指定字段为精确 scalar 值,并保留 verifier 既有错误文本。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL