Repository navigation
CyberBoar 1.0, the first stable release. The v1 compatibility contract starts here:
the policy format (cyberboar.dev/v1), the CLI, the console protocol, the audit
event schema and the Go packages under pkg/ change only by adding to them until
v2. Fixes that make CyberBoar deny or refuse more are not breaking changes. See
CLI compatibility.
CyberBoar checks the file, shell and MCP tool calls of Claude Code, Codex CLI,
GitHub Copilot CLI and Copilot in VS Code, Cursor and opencode against a YAML
policy, on Linux, macOS and Windows. It writes an audit log of its decisions and
can enroll with a console to pull signed policies and ship that log.
Since rc.3, audit events have an id, and ship sends running totals of lost
logs and skipped lines, so a console can tell when it is missing events. v1.0.0
also closes policy bypasses found in final reviews; upgrade from any release
candidate. Users of rc.3 don't need to re-run apply. A console must accept the
new stats field in event batches, and an endpoint version with a leading v.
Added
- Audit events: a shell action has
shell: powershellwhen its command is read as
PowerShell. Codex names its shell toolBashon Windows too, sotoolalone can't
tell them apart. explain --shelland a policy test'sshell:acceptbash, the default, by name.- Audit events have an
id, a version 7 UUID, so a console can drop an event it
already stored when a batch is sent again. shipfinishes a rotated audit log: when the log was renamed (audit.jsonl.1) or
copied and truncated, it sends the rest of the old log first, found next to the new
one by its file or by how it starts, then any logs rotated in and out since (the log
rotated more than once between runs), then the new log. It finishes the old log also
before the hook has written a new one. Before, lines the old log got after the last
run were lost. A compressed log, whichshipcan't read, is counted lost, once, also
when a failed run is retried.- Protocol: event batches carry
stats, running totals of logs lost to rotation (the
old log gone) and of invalid lines skipped, so a console can see lost events.
Consoles must accept the field; older endpoints don't send it.
Changed
- Errors from the packages under
pkg/wrap their cause, soerrors.Isand
errors.Asreach it. bundle.Sourceno longer has aPolicyfield, whose type was internal and so not
something the v1 compatibility promise could cover. ParseSource.Datainstead.- A release binary reports its version as its tag does (
v1.0.0), as one built with
go installdoes; release binaries reported it without thev. A policy's
minimumVersionaccepts either.
Fixed
- Audit events: a Codex command the adapter refuses (another shell on Windows, a
terminal, another environment, a call missing from the transcript) is listed in
actions, which were empty before. - A
cdwhose..leaves a symbolic link (cd link/../other) is followed as the
shell follows it, to the directory holding the link, and also as the kernel and
cd -Pfollow it, to the target's parent. - Globs match with bash's grammar, including character classes (
token[[:digit:]].txt),
and by byte as in the C locale. A glob that the analysis can't match, with a collating
symbol ([[.1.]]) or a bracket expression for a name that isn't ASCII, counts as any path. - A
file:URL is checked as the path curl opens:%XXdecoded, the scheme in any case,
file:/path, and without its query and fragment. Before,file:///…/%74oken.txt
could read a deniedtoken.txt. - PowerShell:
Start-Process -Environmentis checked as$env:assignments are, so
a variable that makes a program run code (GIT_CONFIG_*,GIT_SSH_COMMAND) is
inline code; a map known only at run time is treated as inline code too. - PowerShell: secrets are looked for in the strings as PowerShell reads them, so an
escape (gh`p_…) or strings joined with+,-joinor-fno longer hide a
token from the check or from the audit log's redaction. - PowerShell:
Invoke-WebRequestandInvoke-RestMethodcheck a-Urithat names a
local file, afile:URL or a drive path, which Windows PowerShell 5.1 reads. A
-Formvalue that may be a file object (Get-ChildItem's output, a variable) asks
about the file it uploads. - PowerShell:
New-Itemchecks a link's target (-Value,-Target) with what it
holds, asln's target is, so a link made and read in one command can't reach a
protected file. - PowerShell: a variable name given to
-OutVariable,-ErrorVariableand the other
parameters that name one is checked as a variable written:env:sets an environment
variable and a drive path writes a file. - A glob that matches nothing is read as any other word, so an unquoted
file:///…/token.txt?xis checked as the file curl opens. git grepwith no path searches the work tree (or, with--no-index, the
directory), asgrep -rdoes, sogit grep KEYno longer reads a denied.env.- On Windows and macOS a program named in other capitals is the program (
RM -rf .claude,Git grep KEY), as their filesystems find it; what it does is checked as
for the lower-case name. xcopyandrobocopyare checked as copies: the files they write in the
destination, and withrobocopy /MOVEthe source, so they can't replace a guarded
file.- PowerShell on Windows: an unquoted wildcard given to a program (
findstr KEY *,
each element ofa,*) is matched as the program matches it, without case and with
names that start with a dot. Before, it was taken as a name. - PowerShell on Windows: an unquoted
~,~\…or~/…given to a program is the
home folder, as PowerShell 7.6 passes it, and a program run as& ~\…is in the
home folder. When older versions' reading, a folder named~, may be another file,
the command asks. - PowerShell: a wildcard path under
~(Get-Content ~\.ssh\I*) is matched in the
home folder. - Deny and ask rules match an option after operands (
git push origin main --force
forgit push --force), and short options however they are split or ordered
(rm -r -fandrm -frforrm -rf). - PowerShell: command rules match a cmdlet's parameters however the call abbreviates
them, sori -recand-Recurse:$truematchRemove-Item -Recurse. - The hook protects the audit log's rotated copies as it protects the log
(builtin.self): the files beside it whose names start with its name, whichship
sends. An agent could read, change or delete a rotated log before it was sent, or
plant one. - PowerShell: wildcards are matched by PowerShell's rules. A set has no negation, so
[!a]and[^a]matchaand could name a denied file; a backtick escapes the
next character, so-Path '.env'reads.env`. - Words a command never opens aren't checked as paths: grep's and ripgrep's pattern,
tr's sets, and the field delimiters of cut, awk and sort.grep -v /andcut -d/
were denied as reading the root directory, andgrep .env README.mdas reading
.env. A first operand counts as the pattern only when every option before or
after it is known, sogrep --reg=KEY .envstill reads.env.
Known limitations
- CyberBoar is a policy hook, not an OS sandbox. Programs an agent starts,
network traffic, and anything outside the agent's hooks are not controlled. - What CyberBoar sees depends on each agent's hooks: review the
capability matrix. For example, Claude Code's own
Read/Editdenies, whichapplyinstalls, leave no audit line. - On native Windows, Claude Code and Codex CLI are supported; Copilot CLI, Cursor
and opencode are denied. PowerShell is read as a checked subset,
and Windows PowerShell 5.1 commands are read with PowerShell 7's grammar. - Codex on Windows: the hook's program path can't contain spaces (use an 8.3 short
name), and only the user and managed scopes are available. - A command rule matches the options it names, not their other spellings: a deny
rule forrm -rfdoesn't matchrm --recursive --force. Add a rule for each
spelling that matters. - Claude Code skills in folders below the project, and folders added with
--add-dir, are not guarded against shell writes. - macOS Keychain and Secure Enclave key storage, Apple notarization and Windows
Authenticode signing are not implemented. See
system requirements.