From d7afa4b4105287f6f2e46178ebfc002a310972ca Mon Sep 17 00:00:00 2001 From: Nathan Nutter Date: Tue, 3 Nov 2026 11:44:11 -0600 Subject: [PATCH 1/2] Take Python at latest and keep the pypi uv lock sidecar Python here runs the agentskills CLI and the release scripts; no source file is Python, so the supported range belongs to the tools and latest applies, as it does for every tool except hk. mise.lock records only the path and digest of the uv lock that pins the pypi tool's dependencies, so mise reads that sidecar back from .mise/locks/ at install time. Ignoring it broke every fresh checkout, CI included, with "dependency sidecar ... No such file or directory". The sidecar stays tracked; the rest of .mise/ stays ignored. Change-Id: I36ff83bb95d8f247502cd65a6a018a9f8f1539c1 --- .gitignore | 3 +++ mise.lock | 2 +- mise.toml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 57d10fc..ac71780 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ coverage.html coverage.out tmp/ +# mise scaffolding, except the uv lock sidecars that mise.lock never embeds. +/.mise/* +!/.mise/locks/ diff --git a/mise.lock b/mise.lock index d2842e7..9fbfcd1 100644 --- a/mise.lock +++ b/mise.lock @@ -433,7 +433,7 @@ uv = { path = ".mise/locks/pypi-agentskills-tools/0.8.0", digest = "sha256:ea4b8 [[tools.python]] version = "3.13.18" backend = "core:python" -specifiers = ["3.13"] +specifiers = ["latest"] [tools.python."platforms.linux-arm64"] checksum = "sha256:578d9da1983463ffb0c8c98ab0da2f18177f44069328eb0af847860c1eb05c3e" diff --git a/mise.toml b/mise.toml index 0b3551d..d8e26d6 100644 --- a/mise.toml +++ b/mise.toml @@ -17,7 +17,7 @@ gofumpt = "latest" hk = "2.10.0" pkl = "latest" "pypi:agentskills-tools" = "latest" -python = "3.13" +python = "latest" staticcheck = "latest" tombi = "latest" uv = "latest" From 8f322ee8e6fcdf7a71af25761df15155b33a563b Mon Sep 17 00:00:00 2001 From: Nathan Nutter Date: Tue, 3 Nov 2026 11:44:11 -0600 Subject: [PATCH 2/2] Scan staged bytes for secrets before a commit gitleaks ran through the implicit pre-commit hook, which scans the working tree. A staged file whose diff is binary, or whose worktree copy differs from the index, could carry a secret into the commit without the scan seeing it. The explicit hook scans the staged diff and the staged bytes. --- hk.pkl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hk.pkl b/hk.pkl index 0aa1f2f..ac78e79 100644 --- a/hk.pkl +++ b/hk.pkl @@ -45,4 +45,20 @@ hooks { ["change-id"] = Extra.timber_commit_msg } } + ["pre-commit"] { + fix = true + stage = true + stash = "git" + steps { + // No file filter: scan every staged change, including arbitrary types, + // binary files, deletions, and commits without Go or Markdown changes. + // The git-mode scan only sees text diffs, so staged binary bytes are + // checked out to a temporary directory and scanned explicitly. + ["gitleaks"] = (Hk.gitleaks) { + scan = "staged" + check = + "gitleaks git --redact --pre-commit --staged --verbose --no-banner && tmp=$(mktemp -d) || exit $?; trap 'rm -rf \"$tmp\"' EXIT INT TERM; git diff --cached --name-only -z --diff-filter=ACMRT > \"$tmp/list\" || exit $?; git checkout-index -z --stdin --prefix=\"$tmp/tree/\" < \"$tmp/list\" || exit $?; mkdir -p \"$tmp/tree\" || exit $?; gitleaks dir --redact --verbose --no-banner \"$tmp/tree\" || exit $?" + } + } + } }