Skip to content

fix: exclude task-signing-tool folder from tarball, not signer-tool#174

Open
memosr wants to merge 1 commit into
base:mainfrom
memosr:fix/tarball-exclusion-correct-folder-name
Open

fix: exclude task-signing-tool folder from tarball, not signer-tool#174
memosr wants to merge 1 commit into
base:mainfrom
memosr:fix/tarball-exclusion-correct-folder-name

Conversation

@memosr

@memosr memosr commented Jun 6, 2026

Copy link
Copy Markdown

Summary

The tarball exclusion list in task-origin-validate.ts referenced signer-tool, but the documented and actual repo directory name is task-signing-tool. When the tool ends up nested under a task folder, the wrong exclusion name silently changes tarball hashes.

The bug

src/lib/task-origin-validate.ts:38 — current exclusion list:

const excludedFolders = ['cache', 'out', 'signer-tool'];

README.md:39 — clone instructions:

git clone https://github.com/base/task-signing-tool.git

The actual GitHub repo name is task-signing-tool (this repo).

There is no signer-tool directory anywhere in the documented workflow.

When it breaks

If the signing tool lives as a subdirectory inside a task folder — e.g.:

  • Added as a git submodule for reproducible task validation
  • Cloned alongside the task for convenience
  • Installed via a nested setup script

…then its source files get included in the tarball that the validator hashes. The hash is computed deterministically from the task files; including the tool itself makes the hash depend on the tool version too.

The result: signers running the same task on different machines get different hashes, the validation step fails, and the error message just says "validation failed" with no hint that the tarball content drifted.

The fix

- const excludedFolders = ['cache', 'out', 'signer-tool'];
+ const excludedFolders = ['cache', 'out', 'task-signing-tool']; // matches documented clone directory name in README.md

Single string change. Added an inline comment explaining the why, so future maintainers don't "fix" it back to signer-tool.

Verification

  • ✅ One file modified: src/lib/task-origin-validate.ts
  • ✅ Inline comment references the README for context
  • cache and out (the existing valid exclusions) untouched

The excludedFolders array in src/lib/task-origin-validate.ts:38 listed
"signer-tool", but the README at line 39 instructs users to clone this
repo as task-signing-tool/ — which is also the actual GitHub repo name.

If the signing tool is installed as a subdirectory of a task folder
(via git submodule, nested install, or just convenience), the current
exclusion does not match its directory name. The tarball generator then
includes the entire tool source in the tarball, changing the hash
deterministically computed from the task files alone.

Signers comparing hashes between machines or against a published
expected hash see a mismatch. The error surfaces as "validation failed"
with no indication that the cause is tarball content drift from an
incorrectly named exclusion.

Updated the exclusion to match the documented and actual repo name.
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants