workflow

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package workflow renders the repository files of the workflow-configured cloud agents (ADR-0034): the Claude Code and Gemini CLI GitHub Actions and Copilot's copilot-setup-steps.yml, SHA-pinned and least-privilege, and checks every rendered file against the security invariants. It imports only policy, so release builds can carry its output.

Index

Constants

View Source
const (
	ClaudeWorkflow  = ".github/workflows/halos-claude.yml"
	GeminiWorkflow  = ".github/workflows/halos-gemini.yml"
	CopilotWorkflow = ".github/workflows/copilot-setup-steps.yml"
)

Rendered workflow paths, relative to a repository root. Copilot's name is fixed by GitHub; the others are Halos-owned, so inventory can tell a governed run from anything else in the repository.

Variables

This section is empty.

Functions

func Check

func Check(f File) error

Check asserts the security invariants on a rendered file by reading its text, not by trusting how it was produced: no permission-bypass token (invariant 1), no literal credential, every action pinned to a full commit SHA, a top-level `permissions: {}` (jobs grant their own, least privilege), no `${{ }}` expression inside a run script (script injection), valid YAML, and every run script one Halos renders verbatim (runScripts), so a policy value reaches a shell only through env (shell and YAML injection).

Types

type File

type File struct {
	Vendor string   `json:"vendor"`
	Path   string   `json:"path"`
	Data   []byte   `json:"-"`
	Repos  []string `json:"repos,omitempty"` // policy repo patterns it is for
}

File is one rendered repository file. Releases carry it signed, for review and for the PR that adds it; halod never writes it to a machine.

func Render

func Render(org *policy.Org) ([]File, []string, error)

Render renders the repository files of every enabled workflow-configured vendor (claude, gemini, copilot), with a warning for each control it cannot render (invariant 2). Every file passes Check. The org must validate.

Jump to

Keyboard shortcuts

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