Repository navigation
fix(release): reject release artifacts that ship development files - #97
Merged
oc-tmueller merged 1 commit intoSep 9, 2026
Merged
Conversation
A release artifact must be the app's packaged output, never the working tree it was built in. ownCloud 11.0.0 shipped 13 bundled apps as build trees: ~102 MB of development material, 16 git repositories, and files_antivirus's EICAR acceptance data, which made anti-virus scans of the release tarball fail at a customer's AV gate. The signature assertion already runs over each published tarball, so extend that loop rather than adding a second `tar tzf` pass. A tarball is now rejected when it holds .git at any depth, or .git, .github, tests, build or vendor-bin at the app's own top level. Anchoring the directory names to the top level means a vendored dependency shipping its own tests/ is unaffected; .git is depth-agnostic because migrate_to_ocis 3.0.0 shipped three of them under vendor/. This has to block publication rather than be cleaned up afterwards: the signature covers the offending files too, so an administrator removing them breaks `occ integrity:check-app`. It complements the ocsign checkout guard, which refuses to sign a staging tree holding .git but accepts tests, build, .github and vendor-bin. Verified by running the step body against real assets: the 11 app releases built by CI all pass (12,947 files, including graphapi's 7,835-file vendor tree), while announcementcenter v1.3.1, files_antivirus v1.3.1, notifications v0.7.1 and migrate_to_ocis v3.0.0 all fail - the last caught only by the depth-agnostic .git rule. Refs: owncloud/core#41824 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
phil-davis
approved these changes
Sep 9, 2026
This was referenced Sep 9, 2026
oc-tmueller
deleted the
fix/reject-development-files-in-release-artifacts
branch
September 9, 2026 13:55
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.
Producer-side half of owncloud/core#41824. The consumer-side guard is owncloud/server-release#54.
Why
ownCloud 11.0.0 shipped 13 bundled apps as the working tree they were built in —
.git/,.github/,tests/,vendor-bin/andbuild/artifacts/. That is ~102 MB of development material, 16 git repositories, andfiles_antivirus's EICAR acceptance data, which made a ClamAV scan of an appliance image reportEicar-Test-Signature FOUNDand rejected the image at a customer's AV gate.The bad tarballs are the apps' own release assets, hand-uploaded before this workflow existed. Nothing on the way to publication looked at what was inside them.
This has to block publication rather than be cleaned up afterwards: the signature assertion in this very step runs over the same tarball, so the development files are code-signed. An administrator deleting them breaks
occ integrity:check-app, which leaves "ship it as-is" or "delete the whole app" as the only options.What
The
Assert artifacts are signedstep already computeslisting=$(tar tzf "$tarball")per tarball, so the check extends that loop rather than adding a secondtar tzfpass. The step is renamed toAssert artifacts are signed and free of development files; the job nameReleaseis unchanged, so no required-check names move.A tarball is rejected when it contains:
.git.git,.github,tests,build,vendor-binAnchoring the directory names to the app's top level means a vendored dependency shipping its own
tests/is unaffected..gitis depth-agnostic becausemigrate_to_ocis3.0.0 shipped three of them undervendor/(ramsey/uuid,brick/math,ramsey/collection).Relationship to the ocsign checkout guard (#93)
Complementary, not duplicated.
ocsignv0.3.0 refuses to sign a staging tree holding a.gitentry; this inspects the finished tarball and also coverstests,build,.githubandvendor-bin, whichocsignaccepts. Every app affected by #41824 has a signedsignature.json, so the ocsign guard alone would not have caught them.Verification
The step body was extracted and run against real published assets, so this is the actual workflow code rather than a paraphrase:
Passes — all 11 app releases that were built by CI, 12,947 files total:
externalv1.5.2,files_antivirusv1.3.2,files_external_dropboxv2.1.2,files_ldap_homev0.6.2,files_primary_s3v1.6.2,firstrunwizardv1.4.2,graphapiv0.3.2 (7,835 files),migrate_to_ocisv3.0.1,openidconnectv2.3.4,twofactor_totpv0.10.2,user_ldapv0.20.3.No false positive, including the two largest vendor trees.
Fails — known-bad hand-uploaded assets:
announcementcenterv1.3.1 (226 entries),files_antivirusv1.3.1 (352),notificationsv0.7.1 (243),migrate_to_ocisv3.0.0 (141, caught only by the depth-agnostic.gitrule).End-to-end on
files_antivirus, showing both checks in sequence:The dirty asset passing the signature check and failing hygiene is exactly the problem: it is validly signed.
bash -nclean on the step body, YAML parses, 14 steps intact, andcalensrenders the changelog fragment.Note on rollout
This lands blocking rather than warn-first. The plan had been to sweep every app with
gh workflow run release.yml -f dry-run=true, but apprelease.ymlfiles are tag-triggered only with noworkflow_dispatch, so that sweep is not dispatchable — hence the asset-based sweep above instead. Only 11 of 44 apps have ever released through this workflow, so for the remaining 33 this check will fire for the first time on their next release. That is the intended behaviour: a trip means the app genuinely ships development files.artifact-globalready points at the packaged artifact in every app repo I checked, and owncloud/server-release#54 catches anything that slips through before it reaches a bundle.🤖 Generated with Claude Code