Repository navigation
Releases
Tripcord v0.1.0
The first tagged release of Tripcord. preopen fails closed with exit 3
on a configuration it cannot fully read; the scan is reported as incomplete.
Release archives
Each release has tripcord for linux, darwin, and windows on amd64
and arm64, as .tar.gz (.zip on Windows) archives that also hold
LICENSE, NOTICE, and THIRD_PARTY_NOTICES, plus a SHA256SUMS
file. The release workflow builds them reproducibly from the tagged
commit and attests their build provenance. Check an archive with
sha256sum -c SHA256SUMS and
gh attestation verify <file> --repo vgmartinez/tripcord
(Installation). go install and building a
checkout still work.
tripcord --versionandtripcord versionprint the tag and the
commit of a release build,v0.1.0 (commit <sha>). Any other build
printsdev(Commands).NOTICEandTHIRD_PARTY_NOTICEScover every Go module linked into
the binary, with each module's license, andNOTICEreproduces the
go.yaml.in/yaml/v3NOTICE. A test fails when the module graph and
the notices disagree.
Marketplace action
The repository root has an action.yml, listed on the Marketplace as
Tripcord Security. uses: vgmartinez/tripcord@v0.1.0 runs the
composite action at the commit the root action pins, with the same
inputs and outputs (GitHub Action).
The reusable workflows are unchanged.
Report-only mode: fail-on: none
fail-on: none in the action, the root action, and the reusable
workflows still uploads SARIF and posts the pull request comment, but
does not fail the job on findings. Exit 1 (findings) and a TC-CFG-014
denial from pr-context become a ::warning:: with the finding
count. Exit 3 (configuration), exit 4 (internal error), an invalid
path, and an unknown fail-on value still fail the job. The default
is unchanged, and the CLI's --fail-on does not take none
(Report-only mode,
#62).
Bootstrap and embed check hardening
bootstrap.sh hookruns the cached binary without re-hashing it only
when this user owns it, and no mode verifies a binary another user
owns: that user could rewrite it in place.- The
verifiedrecord must be exactly its one line and a newline.
Anything after it, and a record without the newline, makeshook
exit 2 and run nothing. - The cache root,
${XDG_CACHE_HOME:-$HOME/.cache}, gets the checks
every cache directory gets, on the verified hook path too: not a
symlink, owned by this user, and not group- or world-writable. A
group-writable~/.cache(umask 0002) needschmod go-w; see
Init. - TC-CFG-016 reports an entry under an event Tripcord wires (pre-tool
or session-start) that is neither Tripcord's nor the oneembed.json
records:changed, high, reasonunregistered-entry.init --embed
keeps such an entry when it merges and does not register it.
It warns on stderr, naming the harness, file, event, and command,
thattripcord scanwill report it as TC-CFG-016 HIGH, and exits
as it did before. v0 known gap: there is no supported way yet to
keep a user's own hook next to the guard. Remove the entry, or run
it from outside the guarded config. See Init. - TC-CFG-016 reports an event Tripcord wires that holds more than one
copy of Tripcord's entry, or of the entryembed.jsonrecords, even
byte for byte the same:changed, high, reasonduplicate-entry.
The harness runs every copy. - TC-CFG-012 reads more of a
curlorwgetheader that can carry a
local secret: an unquoted header ends at a stdin redirect
(< .env,0<.env), so a dotenv read there is a warning; a glued
value such as-H Authorization:$(cat .env)or
Authorization:"$(cat .env)"is read up to the substitution;
-H @.envsends the file as headers; and a$(...)or backtick in
the command that reads a local path counts as a read. - TC-CFG-016 reports a
tripcord.ymlthat gives a key twice in one
mapping, or holds a second YAML document, asunreadable, high,
instead of reading the first one, which could leave itunverified,
low, in CI. - The
bootstrap.shtemplate changed, so this needs a new
WorkflowPin(TestTemplateChangeNeedsRepin). TestVersionSkewCIScannerruns on every pull request, in the
version-skew e2ejob ofci.yml(TRIPCORD_VERSION_SKEW_E2E=1),
as well as undermake release-gate
(#119).
TC-CFG-016 version skew: an older scanner no longer fails a newer embed
The scanner CI runs is the one tripcord-pr.yml@WorkflowPin pins,
built from that commit's source, so it can be older than the init
that wrote the embed. It reported six highs ("written by an older
Tripcord") on a fresh embed. TC-CFG-016 now holds an embed it did not
write to invariants every Tripcord version keeps, instead of to its
own templates (design):
- A render that matches
embed.jsonand keeps every invariant, but
that this scanner never compiled, isunverified, low, not high. A
render an earlierinitunder a known pin wrote isoutdated, low. - A loosened guard is still high in any scan, however high
embed.json'sversionis:onFailure: continue, a narrowed
matcher,failClosed: false, a disabled checksum gate,fail-on: critical,install || true,-text, a removed guard, or anything
removed relative to the base. - A render this scanner never compiled, under a pin it knows, is
changed, high (the writer witness).
TestTemplateChangeNeedsRepinkeeps that sound on every pull
request: a template change needs a newWorkflowPin. - The
tripcord.ymlpin is checked on its own. A pin that is not
tripcord-pr.ymlat a full SHA ispin-malformed, high. An unknown
pin ispin-unknown, high, in a local or pre-commit scan, unless the
scanner is a release older thanembed.json's version and
tripcord.ymlmatches its digest; in CI it isunverified, low. A
pin change relative to the base isrepinned, high, always. KnownWorkflowPins(internal/embedded/pins.go) starts empty and
only grows. Each repin appends the pin it replaces, guarded by the
release gate.8b33b1band6e1d5dbare never in it.scan --executing-workflownames the reusable workflow a CI scan
runs inside, and the composite action passes it. Under
pull_requestthe pull request's owntripcord.ymlpicks that
workflow, so it attests only to itself: it accepts only a pin the
base already has.- A release
initrefuses a--versionolder than itself (exit 3).
Formerly main@277066a was the WorkflowPin, so an embed it wrote was
a current pin: a local scan did not report it pin-unknown. Embeds
pinned to the earlier, unregistered workflow pin showed a temporary
pin-unknown high on a local or pre-commit scan until PR 3 appended
that pin to KnownWorkflowPins. Those pins ran an action without the
embed check, so CI kept failing until two repins landed: the action pin
in tripcord-pr.yml, then WorkflowPin, followed by
init --embed --force. Until then make release-gate failed
TestVersionSkewCIScanner with seven highs:
the six "written by an older Tripcord", plus copilot-setup-steps.yml,
which init writes only with --cloud-setup and that action reports
missing. By the end of PR 3 that test must report 0 high, including
copilot-setup-steps.yml on an embed written without --cloud-setup.
Moving it from the release gate into per-pull-request CI, passing, is
#119.
The first time a pull request adds an embed, the base has no
tripcord.yml. In CI a pin equal to --executing-workflow is
self-attested and stays low. The workflow shape is still an invariant,
so an extra job, a broader permission, secrets: inherit, or
pull_request_target is high there too, including when embed.json's
version is newer than the scanner. A git describe version such as
0.1.0-12-gdeadbeef is not a release, so it does not get the
older-release exception.
Known gap, not addressed in v0: CI still builds the scanner from the
pinned action's source, so any template change ships an embed that the
previously pinned scanner can only report as unverified. Two future
options remain open:
tripcord-pr.ymlchecks out and buildsref: ${{ job.workflow_sha }}.- CI runs the published release the embed pins, verified by digest.
Distribution is not decided here.
More secret shapes are redacted, in evidence keys too
JSON and JSONL output carry the evidence key of a finding, which
includes the full command of a hook or setup step, and some secrets
stayed in it. These are now redacted in every format (text, JSON, JSONL,
SARIF, Markdown, annotations): a YAML value that continues on later
lines (a quoted value, a comment, then a more-indented line; a quoted
scalar that closes on a later line; a commented-out key followed by its
value), a netrc line (machine h login u password X, also in a
copilot-setup-steps run: block), the word after password, and -p X
in a command that names a user. The sink also decodes the key and
redacts each string in it, instead of the JSON text, which hid the
shapes behind \n and \".
Fingerprints change only for an entry whose command carried one of these
shapes. Its key and fingerprint are built from the sanitized command,
which before still held the secret, so the finge...