Repository navigation
Conversation
…to nu tasks The image job ran pull request code with packages, id-token and attestations write. It now builds and smoke-tests with contents: read and hands the index, package cache and SBOMs to image-publish, which only tags run and which alone holds the write permissions. The release job downloads only the dist-* archives, so the image artifact never becomes a release asset. The tag check, the archive smoke test and the Action workflow's release pin are nu tasks (release:check-tag, release:smoke, action:pin-release) instead of inline bash.
The action kept fallbacks for releases up to 0.4.0, which took --cache as the SQLite file, and for releases without patchula cache schema, which it keyed by version. 0.9.0 is the first release with cache schema; the action now fails the step with a clear error for an older version or binary and always passes the cache directory.
The threat model said a repository never runs code, while the lockfile guide said Bundler, dotnet, uv, Poetry, Yarn and npm do. The threat model now names those tools, what triggers them, what their code can reach and which guards still hold, and the lockfiles guide points to it.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 69f0355 | Commit Preview URL Branch Preview URL |
Nov 16 2026, 02:12 AM |
…hange Running repository code is not something the threat model makes an exception for; the tools that would do it are changed instead, in a separate PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three CI and action fixes.
Release image job: write permissions only on tags
The
imagejob also ran on pull requests that touch the image, withpackages: write,id-token: writeandattestations: write, while it ran the PR'simage:buildandimage:smoke. Now:image(still named "Container image") builds and smoke-tests withcontents: readonly. On a tag it uploads whatimage:pushneeds as theimageartifact:image.tar(the index the smoke test ran), the apk cache, the local packages and the SBOMs.image-publishruns only on push (tags). It downloads that artifact, logs in to GHCR, runsimage:pushand attests. It is the only job with the package, OIDC and attestation write permissions.image:pushstill refuses to publish an index other than the tested one.releasenow needsimage-publishand downloads only thedist-*artifacts, so the image artifact never ends up as a release asset.No new actions, so
actions.lockneeds no change.Workflow shell moved into nu tasks
release:check-tag <tag>reads patchula-cli's version fromcargo metadata --lockedinstead of picking apartcargo pkgidoutput.release:smoke <platform>unpacks the platform's archive and checks thatpatchula --versionmatches the archive's version exactly (before, it only checked for some semver). The smoke job now checks out the repo and installs nu through mise to run it.action:pin-releaselooks up the latest release, writes its schema over thetests/action/PatchulaConfig.pklsymlink and setsversioninGITHUB_OUTPUT. It clearsMISE_ENABLE_TOOLSfor its ownmise exec, and the workflow sets that variable only on the steps that need it, so the composite action'smise execnever inherits it.The composite
action.ymlkeeps its bashrun:steps, because it runs in other repositories where this repo's tasks don't exist.Tested locally:
release:check-tagpasses on v0.9.0 and fails on v0.8.0.release:smokepasses on the real v0.9.0 linux-x64-musl archive and fails when the archive is missing.action:pin-releasewith stand-in env vars pinned 0.9.0, wrote the schema in place of the symlink and left the rootPatchulaConfig.pkluntouched. nu-lint, jactionlint and zizmor are clean.action.yml: hard cutover to 0.9.0+
I removed the fallback that passed
--cacheas the SQLite file (releases up to 0.4.0) and the one that keyed the cache by version for releases withoutpatchula cache schema. 0.9.0 is the first release withcache schema(#325). If the installed binary has no workingcache schema, whether it came fromversionorbinary, the action now fails the step with an error that names the binary and asks for 0.9.0 or later. The cache key format (…-s<schema>-…) is unchanged, so existing caches still restore. The inputs' descriptions and guide/github-actions.md now give the minimum version.Follow-ups (not in this PR)
github_token()), not a repository-scoped one. It runs no repository code, but the "credential no wider than its reach" rule may call for a scoped token there, as gh-actions-lock gets.