quality clean.default-value: trusted_repo passes --object-format only when the checkout sets extensions.objectFormat; _old_tip refuses an unsigned HEAD only when HEAD is in the pushed range, without a .get fallback. CodeRabbit: _config_all reads git config -z --get-all and splits on NUL, so one pushurl value with a newline stays one value and url_allowed rejects it; file_url uses Path.as_uri; redact_urls replaces URL userinfo with *** in the GitRunError text of _tgit_run and in every push.py refusal, failure, preview and status line while the argv given to git is unchanged; fetch_heads splits ls-remote records at the TAB; _track sets and reads the upstream of the validated branch. Tests: the mirror fixture drops GIT_DIR, GIT_WORK_TREE and GIT_INDEX_FILE, the planted-after-check test asserts the second check ran, and test_push_trusted_review.py covers each fix.
| 🌿 Branch | 📊 Diff stat | 🎯 Fix | 💥 Break | 💸 Tokens | ⏱️ Velocity | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| fix/push-trusted-gitdir | 5 files +173/-22 | 90 % | 5 % | – | – | 100 % | 86 | ✅ 90/5, tokens and velocity <= 100, security 100 % |
Evidence: tests/unit + tests/integration with PYTHONPATH=src 860 passed; the 33 fake-SSH push fixture tests fail identically on the previous HEAD in the agent sandbox and pass in PR CI, so PR CI is the proof for the push paths; 2 known gpg-in-sandbox failures in test_publish_integration. quality check --staged 0 findings, ruff clean, MEDUSA 100 %, critical 0. Hub review f31edb8114253cb6.
Refs https://github.com/kevinveenbirkenbach/package-manager/pull/18
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quality, 7 findings: _release_impl and release take one frozen ReleaseOptions (new options.py, exported from pkgmgr.actions.release) and split into small private helpers with a frozen _Prepared carrier; the three _release_impl call paths become one plus dataclasses.replace(preview=True) for the interactive preview. cli/commands/release.py and cli/parser/release_cmd.py split into helpers with arguments in the same order, so the CLI surface is unchanged; test_workflow.py uses one with-block instead of five patch decorators. CodeRabbit: with --expect-tree an existing but untracked release input (pyproject, CHANGELOG.md, flake.nix, PKGBUILD, spec, debian/changelog, Cargo files) aborts before any write; the README says the abort comes before any release file is written and the pull is not reverted.
| 🌿 Branch | 📊 Diff stat | 🎯 Fix | 💥 Break | 💸 Tokens | ⏱️ Velocity | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| feature/release-expect-tree | 13 files +457/-342 | 91 % | 4 % | – | – | 100 % | 87 | ✅ 90/5, tokens and velocity <= 100, security 100 % |
Evidence: tests/unit + tests/integration with PYTHONPATH=src 886 passed; 2 known gpg-in-sandbox failures in test_publish_integration. quality check --staged 0 findings, ruff clean, MEDUSA 100 %, critical 0. Hub review e12f7e62ce35b6f5.
Refs https://github.com/kevinveenbirkenbach/package-manager/pull/19
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Critical #60/#61 untrusted checkout: publish-containers.yml prepare runs for workflow_run only when the triggering run succeeded, was a push and came from this repository; build and merge need prepare, so the guard covers both checkouts. Mark stable commit triggers only on push of v* tags, schedule and workflow_dispatch are unchanged. Medium #55/#56: update-flake-lock.yml pins nix-installer-action v23 and update-flake-lock v29 to commit SHAs. High: secret_service_token returns only the token and raises SecretServiceUnavailable with the same reasons, _forge_access builds the token/reason pair (#62); jinja2 select_autoescape for html/htm/xml only, scaffolding output byte-identical (#29); chmod 0o755 to 0o700 for owner-run scripts in ink.py and 7 test sites; exact URL equality in a mirror probe test. Error #33: raise unittest.SkipTest from exc. Notes: empty-except to contextlib.suppress, one import form per module, unused variable, commented-out code, assertNotIn.
| 🌿 Branch | 📊 Diff stat | 🎯 Fix | 💥 Break | 💸 Tokens | ⏱️ Velocity | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| fix/codeql-alerts | 28 files +92/-81 | 90 % | 3 % | – | – | 100 % | 87 | ✅ 90/5, tokens and velocity <= 100, security 100 % |
Evidence: tests/unit + tests/integration 880 passed, 574 subtests; 2 test_publish_integration failures are identical on a clone without these changes (global tag.gpgsign, sandbox blocks gpg). ruff and actionlint clean, MEDUSA 100 % critical 0 (1 accepted keyword false positive). Operator choice 7589a6f1 (swarm), operator review dcc2f461.
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pkgmgr push copies HEAD and tags into a private temporary bare repository and signs (git commit-tree -S) and pushes from there, so the checkout config, hooks, filters, merge drivers, replace refs, bundle URIs, submodule configs and allowed-signers never take part. The checkout is only read via upload-pack and updated by a fetch of the signed commit plus an update-ref guarded by the old HEAD. Push and fetch URLs must be https, ssh or user@host:path. Codacy tightened (D413, Lizard CCN 8, no new defaults, B607 via shutil.which); prose docstrings removed for quality clean.comment.
| 🌿 Branch | 📊 Diff stat | 🎯 Fix | 💥 Break | 💸 Tokens | ⏱️ Velocity | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| fix/push-trusted-gitdir | 4 files +1112/-233 | 90 % | 8 % | – | – | 100 % | 83 | ⛔ break 8 % > 5 |
Evidence: host run 86 tests OK, full unit suite 527 OK, ruff clean, lizard -C 8 clean, MEDUSA 100 % critical 0. Break 8 %: a checkout whose origin fetch URL is a local path or http:// is refused; repository-level http.* and credential.* settings and a GIT_CONFIG_GLOBAL override no longer apply to push. Operator review a41d30aa (re-card of 39022e85).
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pkgmgr release --expect-tree TREE closes the window between an external audit and the fetch pkgmgr runs itself, where a push could ship an unaudited tree (Skills request, req 076). git_ops.ensure_head_tree compares git rev-parse HEAD^{tree} with the given sha and raises RuntimeError on mismatch; _release_impl calls it right after ensure_clean_and_synced and before any file write, release() with --retry before retry_release pushes anything. expect_tree is keyword-only without a default and every caller passes it. README section added; the --force help is reworded (MEDUSA EXA004 false positive on the old text).
| 🌿 Branch | 📊 Diff stat | 🎯 Fix | 💥 Break | 💸 Tokens | ⏱️ Velocity | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| feature/release-expect-tree | 9 files +120/-11 | 93 % | 2 % | – | – | 100 % | 91 | ✅ 90/5, tokens and velocity <= 100, security 100 % |
Evidence: 45 targeted tests OK (5 new expect-tree tests), full unit suite 521 OK, ruff clean, MEDUSA 100 % critical 0. Break 2 %: an external caller of release() or _release_impl() must now pass expect_tree. Operator review 91234f6d (re-card of f538413a).
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An agent that can write a repository's .git/config could make the operator's pkgmgr push, release or branch gc run a program or reroute the push. UNSAFE_CONFIG lists the local keys that do (core.sshCommand, gitProxy, askPass, fsmonitor, alternateRefsCommand, credential helpers, gpg programs, protocol.*, config hooks, gc.recentObjectsHook, http proxy/TLS/cookie keys, remote pack programs and proxy, url rewrites). push and release refuse up front; gc skips its fetch and keeps remote branches. Filter drivers, hooksPath, gpg.format and include stay allowed for git-lfs, husky and per-repo signing.
SCAN_FLAGS add --no-pager and switch off config-defined hooks (hook.<event>.enabled=false), which core.hooksPath does not cover. The signing amend, gc's fetch, delete push and branch -D run under them. Remote and ref names sit behind -- in every push, fetch, ls-remote and remote get-url, fetches and pushes no longer recurse into submodules, and a staged gitlink is no longer folded into the signed HEAD. gc skips a compose project that also has containers outside the worktree.
🎯 Fix: 92 %
💥 Break: 4 %
💸 Cost: 91 %
⏱️ Time: 89 %
🛡️ Security: 100 %
🏆 Score: 100
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pkgmgr push re-signed every unpushed commit with rebase --rebase-merges -S, which rewrote history that mirrors or peers may already hold. It now amends only HEAD with -S (--no-edit --no-verify) and warns about older unsigned commits, which stay as they are; the push check refuses only an unsigned HEAD. The signing base prefers the branch's own remote-tracking ref.
🎯 Fix: 92 %
💥 Break: 3 %
💸 Cost: 100 %
⏱️ Time: 100 %
🛡️ Security: 100 %
🏆 Score: 89
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pkgmgr push --no-sign skips the re-sign rebase and the unsigned-range
refusal, so a checkout without a usable signing key can still sync the
fetch URL and every mirror pushurl. Leases and the git cherry guard
still apply. push_branch takes sign as a required keyword; pkgmgr
release and release --retry pass sign=True, so releases stay signed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pkgmgr push now signs unpushed commits like git-sign-push and pushes
each pushurl with its own --force-with-lease: the fetch URL against the
tracking ref, every mirror against its own fetched tip, each only after
git cherry shows no commit exists only there. --rewrite allows a
deliberate history rewrite. Without a repository selection it pushes
the current checkout, including worktrees outside the base dir.
pkgmgr release and release --retry sign before tagging and push the
branch and tag through the same path.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>