Repository navigation
Getting Started
This page builds tripcord, scans a sample with two known findings, and explains the result. For every command and flag, see Commands.
Download a release archive, or build from source with Go 1.27.3 (Installation covers both, and how to verify a release):
git clone https://github.com/vgmartinez/tripcord.git
cd tripcord
CGO_ENABLED=0 go build -trimpath -o tripcord ./cmd/tripcordgo install github.com/vgmartinez/tripcord/cmd/tripcord@main installs
the same binary into $(go env GOPATH)/bin. Either way, tripcord version prints dev, because the version is only set at link time
(Development).
tripcord scan PATH scans the Git repository that contains PATH, or
PATH itself when it is not inside a checkout. From that checkout, this
scans two fixtures in a temporary directory. A raw fixture is a text
archive: each file follows a -- path -- line, and member prints
one file of it.
bin="$PWD/tripcord"
sample=$(mktemp -d)
mkdir -p "$sample/.vscode" "$sample/.github/workflows"
member() { awk -v want="-- $2 --" '/^-- .* --$/ { on = ($0 == want); next } on' "$1"; }
member rules/TC-CFG-002.test/positivos/folderopen-local-script.txtar .vscode/tasks.json > "$sample/.vscode/tasks.json"
member rules/TC-CFG-009.test/positivos/copilot-curl-pipe-sh.txtar .github/workflows/copilot-setup-steps.yml > "$sample/.github/workflows/copilot-setup-steps.yml"
(cd "$sample" && "$bin" scan .)That command exits 1. This is the output, captured from that run (the rule id is a terminal link to its doc; the link target is not shown here):
2 finding(s): 0 critical, 2 high, 0 medium, 0 low; 0 warning(s); exit 1
HIGH TC-CFG-002 VS Code task that runs when the folder opens… .vscode/tasks.json
HIGH TC-CFG-009 Environment setup… .github/workflows/copilot-setup-steps.yml
re-run with -v for details
The default fail-on is high, and both findings are high, so the
process exits 1. The same scan with mode: audit still prints the
findings and exits 0. Save this as audit.yaml in the sample and pass
it with --policy:
version: 1
mode: audit
fail-on: critical # low | medium | high | critical(cd "$sample" && "$bin" scan . --policy audit.yaml)That prints the same two findings and exits 0. Layers, locks, and exceptions are in Policy.
The first line is the summary: counts by severity and the exit verdict.
Each following line is one finding: severity, rule id
(a link to that rule's doc), a short title, and the path. The last line
says to re-run with -v, which prints the evidence, the fix, and a
fingerprint you can use to triage it. --format json,
sarif, md, and gha write the same findings for machines and ignore
-v (Output and sinks).
- The scan is local: adapters read configuration files and do not
start the agent, run a hook, or make a network call, and
--sincedenies Git's network transports (scan). - Rules are CEL with a fixed budget, so a busy machine does not change
the result (
scan). - Findings are built from sanitized text, and sinks redact again before display (Output and sinks).
- Fingerprints are stable ids for triage; findings that involved a redacted secret use a per-machine key (Fingerprints).
- Scan a repository before you clone it:
preopen. - Commit a policy and, optionally, embed tripcord into the
repository's agent hooks:
init. - Run it in CI: GitHub Action, or before each commit: pre-commit.
This wiki is generated from docs/ on main by cmd/wikigen. Do not edit it here: change docs/ and open a pull request. Apache-2.0.
Start
Commands
CI and hooks
Configuration
Adapters
- Claude Code
- Codex
- Cursor
- GitHub Copilot
- Gemini CLI
- OpenCode
- Windsurf
- Devin
- Dev Container
- Shared Files
Project