Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Weekly automated dependency-update PRs.
# gomod — Go modules in go.mod (direct + indirect)
# github-actions — action versions used in .github/workflows
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
with:
go-version-file: go.mod

- name: go.mod tidy check
run: |
go mod tidy
git diff --exit-code go.mod go.sum

- name: Vet
run: go vet ./...

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module github.com/vars-cli/vars

go 1.25.0
go 1.25.11

require (
filippo.io/age v1.3.1
github.com/spf13/cobra v1.10.2
golang.org/x/crypto v0.46.0
golang.org/x/term v0.41.0
golang.org/x/crypto v0.53.0
golang.org/x/term v0.44.0
gopkg.in/yaml.v3 v3.0.1
)

require (
filippo.io/hpke v0.4.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/pflag v1.0.9 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/sys v0.46.0 // indirect
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiT
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU=
golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A=
golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto=
golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio=
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ lint:
[group('dev')]
check: vet lint test

# Scan for known vulnerabilities that are actually reachable (govulncheck)
[group('dev')]
audit:
go run golang.org/x/vuln/cmd/govulncheck@latest ./...

# Run unit tests
[group('test')]
test:
Expand Down
19 changes: 17 additions & 2 deletions scripts/smoke.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env bash
# End-to-end smoke test for the ssh-v1 (v0.6) vars. Uses a dedicated SSH key so
# it's deterministic and needs no ssh-agent. git versioning is best-effort: the
# log/version check is skipped where the store isn't a git repo.
# encryption is deterministic and needs no ssh-agent. git versioning is a soft
# dependency: checks that need it are skipped when the store isn't a git repo —
# but if it IS one, an early gate fails fast when commits aren't landing (e.g. a
# global signed-commit config with the signing key not in ssh-agent) instead of
# masking it and dying confusingly at the end.
set -euo pipefail

BIN="${1:-./vars}"
Expand All @@ -21,6 +24,18 @@ $BIN set RPC_URL https://rpc.example.com
$BIN set PRIVATE_KEY 0xTESTKEY
$BIN set ETHERSCAN_API abc123

# vars auto-commits are best-effort: a failed commit only warns and still exits
# 0, so the rest of this suite would silently run against an unversioned store.
# If the store is a git repo, the sets above MUST have produced a commit — an
# unborn HEAD means versioning is broken (commonly a global commit.gpgsign=true
# with the signing key not loaded in ssh-agent). Detect it now and quit clearly.
if [ -d "$VARS_STORE_DIR/.git" ] && ! git -C "$VARS_STORE_DIR" rev-parse --verify -q HEAD >/dev/null; then
echo "SMOKE FAIL: the store is a git repo but no commit was created — git versioning is broken." >&2
echo " Likely a global signed-commit config (commit.gpgsign=true) with the signing key not in" >&2
echo " ssh-agent. Load it with 'ssh-add', or disable signing for this run, then retry." >&2
exit 1
fi

echo "--- get ---"
test "$($BIN get RPC_URL)" = "https://rpc.example.com"

Expand Down
Loading